Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2013-02-10 06:32:37 -0500
committerEike Stepper2013-02-13 14:58:12 -0500
commit1de2ed6f432205d8b65580eb54594f34b433b6a3 (patch)
tree760af8092501ddfcf3efd2e6468b7c30a73fc932
parent554a4a177bd6a182a8fd8081969f9d3426732b6f (diff)
downloadcdo-1de2ed6f432205d8b65580eb54594f34b433b6a3.tar.gz
cdo-1de2ed6f432205d8b65580eb54594f34b433b6a3.tar.xz
cdo-1de2ed6f432205d8b65580eb54594f34b433b6a3.zip
[400388] Integrate the new MinimalEStoreEObjectImpl
https://bugs.eclipse.org/bugs/show_bug.cgi?id=400388
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java43
1 files changed, 16 insertions, 27 deletions
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java
index 5722af5cca..10dfc8c031 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java
@@ -377,22 +377,10 @@ public class CDOObjectImpl extends MinimalEStoreEObjectImpl implements InternalC
int index = classInfo.getSettingsFeatureIndex(i);
if (index != CDOClassInfo.NO_SETTING)
{
- EStructuralFeature eFeature = eClass.getEStructuralFeature(i);
- if (EMFUtil.isPersistent(eFeature))
+ Object value = eSettings[index];
+ if (value instanceof InternalCDOLoadable)
{
- Object value = eSettings[index];
- if (value instanceof InternalCDOLoadable)
- {
- ((InternalCDOLoadable)value).cdoInternalPostLoad();
- }
- }
- }
- else
- {
- EStructuralFeature eFeature = eClass.getEStructuralFeature(i);
- if (EMFUtil.isPersistent(eFeature))
- {
- System.out.println(eFeature);
+ ((InternalCDOLoadable)value).cdoInternalPostLoad();
}
}
}
@@ -603,13 +591,12 @@ public class CDOObjectImpl extends MinimalEStoreEObjectImpl implements InternalC
@Override
public Object dynamicGet(int dynamicFeatureID)
{
- EStructuralFeature eStructuralFeature = eDynamicFeature(dynamicFeatureID);
-
int index = getClassInfo().getSettingsFeatureIndex(dynamicFeatureID);
if (index == CDOClassInfo.NO_SETTING)
{
// The feature has no slot in eSettings, i.e., it's persistent or single-valued.
// Delegate to the store. TransientStore delegates back to eSettings.
+ EStructuralFeature eStructuralFeature = eDynamicFeature(dynamicFeatureID);
EStore eStore = eStore();
return eStore.get(this, eStructuralFeature, EStore.NO_INDEX);
}
@@ -619,13 +606,17 @@ public class CDOObjectImpl extends MinimalEStoreEObjectImpl implements InternalC
Object result = eSettings[index];
if (result == null)
{
- if (FeatureMapUtil.isFeatureMap(eStructuralFeature))
+ EStructuralFeature eStructuralFeature = eDynamicFeature(dynamicFeatureID);
+ if (EMFUtil.isPersistent(eStructuralFeature))
{
- eSettings[index] = result = createFeatureMap(eStructuralFeature);
- }
- else if (eStructuralFeature.isMany())
- {
- eSettings[index] = result = createList(eStructuralFeature);
+ if (FeatureMapUtil.isFeatureMap(eStructuralFeature))
+ {
+ eSettings[index] = result = createFeatureMap(eStructuralFeature);
+ }
+ else if (eStructuralFeature.isMany())
+ {
+ eSettings[index] = result = createList(eStructuralFeature);
+ }
}
}
@@ -635,13 +626,12 @@ public class CDOObjectImpl extends MinimalEStoreEObjectImpl implements InternalC
@Override
public void dynamicSet(int dynamicFeatureID, Object value)
{
- EStructuralFeature eStructuralFeature = eDynamicFeature(dynamicFeatureID);
-
int index = getClassInfo().getSettingsFeatureIndex(dynamicFeatureID);
if (index == CDOClassInfo.NO_SETTING)
{
// The feature has no slot in eSettings, i.e., it's persistent or single-valued.
// Delegate to the store. TransientStore delegates back to eSettings.
+ EStructuralFeature eStructuralFeature = eDynamicFeature(dynamicFeatureID);
EStore eStore = eStore();
eStore.set(this, eStructuralFeature, EStore.NO_INDEX, value);
}
@@ -655,13 +645,12 @@ public class CDOObjectImpl extends MinimalEStoreEObjectImpl implements InternalC
@Override
public void dynamicUnset(int dynamicFeatureID)
{
- EStructuralFeature eStructuralFeature = eDynamicFeature(dynamicFeatureID);
-
int index = getClassInfo().getSettingsFeatureIndex(dynamicFeatureID);
if (index == CDOClassInfo.NO_SETTING)
{
// The feature has no slot in eSettings, i.e., it's persistent or single-valued.
// Delegate to the store. TransientStore delegates back to eSettings.
+ EStructuralFeature eStructuralFeature = eDynamicFeature(dynamicFeatureID);
EStore eStore = eStore();
eStore.unset(this, eStructuralFeature);
}

Back to the top