Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2013-02-15 10:27:38 -0500
committerEike Stepper2013-02-15 10:27:38 -0500
commitcf49b7c79567c2428ecfca6d42867eda592cefca (patch)
tree7547d05146077b619a16e7f56d95fb1038df269b
parent526b5d4c657fc404f21085d3130f048bb57e39ba (diff)
downloadcdo-cf49b7c79567c2428ecfca6d42867eda592cefca.tar.gz
cdo-cf49b7c79567c2428ecfca6d42867eda592cefca.tar.xz
cdo-cf49b7c79567c2428ecfca6d42867eda592cefca.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.java47
1 files changed, 47 insertions, 0 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 bfc90069d9..497fbfb2b7 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
@@ -974,6 +974,53 @@ public class CDOObjectImpl extends MinimalEStoreEObjectImpl implements InternalC
return false;
}
+ @Override
+ protected final Adapter[] eContainerAdapterArray()
+ {
+ if (FSMUtil.isTransient(this))
+ {
+ return super.eContainerAdapterArray();
+ }
+
+ InternalCDOView view = cdoView();
+ if (view.isClosed())
+ {
+ return null;
+ }
+
+ CDOObject container;
+
+ InternalCDORevision revision = cdoRevision();
+ if (revision != null)
+ {
+ Object containerID = revision.getContainerID();
+
+ if (containerID instanceof CDOID)
+ {
+ container = view.getObject((CDOID)containerID, false);
+ }
+ else
+ {
+ container = (CDOObject)containerID;
+ }
+
+ if (container != null)
+ {
+ if (container instanceof CDOObjectImpl)
+ {
+ return ((CDOObjectImpl)container).eBasicAdapterArray();
+ }
+
+ if (container instanceof BasicEObjectImpl)
+ {
+ return super.eContainerAdapterArray();
+ }
+ }
+ }
+
+ return null;
+ }
+
/**
* This method is not called by the MinimalEStoreEObjectImpl in CDO's ecore.minimal (retrofitting) fragment
* but it is called by the normal MinimalEObjectImpl as of EMF 2.9.

Back to the top