summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-08-03 15:45:05 (EDT)
committerEike Stepper2007-08-03 15:45:05 (EDT)
commit18833dbb303c2d93a91c5782ff0884a716459b22 (patch)
treef17500b13f90faec5380934091e31f9c16d83e9a
parentd69607dabdd32b5daa907fb77559d9607ce226da (diff)
downloadcdo-18833dbb303c2d93a91c5782ff0884a716459b22.zip
cdo-18833dbb303c2d93a91c5782ff0884a716459b22.tar.gz
cdo-18833dbb303c2d93a91c5782ff0884a716459b22.tar.bz2
*** empty log message ***
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOAdapterImpl.java30
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOCallbackImpl.java14
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOLegacyImpl.java20
3 files changed, 38 insertions, 26 deletions
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOAdapterImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOAdapterImpl.java
index 8e4f192..c6160a6 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOAdapterImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOAdapterImpl.java
@@ -11,7 +11,6 @@
package org.eclipse.emf.internal.cdo;
import org.eclipse.emf.cdo.CDOState;
-import org.eclipse.emf.cdo.protocol.CDOID;
import org.eclipse.emf.cdo.protocol.CDOProtocolConstants;
import org.eclipse.net4j.internal.util.om.trace.ContextTracer;
@@ -127,18 +126,19 @@ public class CDOAdapterImpl extends CDOLegacyImpl implements Adapter.Internal
return oldState;
}
- /**
- * This implementation simply asks the view to convert the ID which can result
- * in a LoadObjectRequest being sent. Basically this leads to loading the
- * whole subtree (i.e. resource).
- * <p>
- * TODO Investigate the use of proxies here
- *
- * @see CDOCallbackImpl
- */
- @Override
- protected Object convertID(CDOViewImpl view, CDOID id)
- {
- return view.convertIDToObject(id);
- }
+ // /**
+ // * This implementation simply asks the view to convert the ID which can
+ // result
+ // * in a LoadObjectRequest being sent. Basically this leads to loading the
+ // * whole subtree (i.e. resource).
+ // * <p>
+ // * TODO Investigate the use of proxies here
+ // *
+ // * @see CDOCallbackImpl
+ // */
+ // @Override
+ // protected Object convertID(CDOViewImpl view, CDOID id)
+ // {
+ // return view.convertIDToObject(id);
+ // }
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOCallbackImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOCallbackImpl.java
index 55b64ab..ff35c32 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOCallbackImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOCallbackImpl.java
@@ -10,8 +10,6 @@
**************************************************************************/
package org.eclipse.emf.internal.cdo;
-import org.eclipse.emf.cdo.protocol.CDOID;
-
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.CDOCallback;
import org.eclipse.emf.ecore.impl.EObjectImpl;
@@ -36,10 +34,10 @@ public class CDOCallbackImpl extends CDOLegacyImpl implements CDOCallback
CDOStateMachine.INSTANCE.write(this);
}
- @Override
- protected Object convertID(CDOViewImpl view, CDOID id)
- {
- InternalCDOObject object = view.getObject(id, false);
- return object.cdoInternalInstance();
- }
+ // @Override
+ // protected InternalEObject convertID(CDOViewImpl view, CDOID id)
+ // {
+ // InternalCDOObject object = view.getObject(id, false);
+ // return object.cdoInternalInstance();
+ // }
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOLegacyImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOLegacyImpl.java
index 19d37ee..ae5677c 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOLegacyImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOLegacyImpl.java
@@ -346,7 +346,7 @@ public abstract class CDOLegacyImpl extends CDOWrapperImpl
}
}
- protected Object convertPotentialID(CDOViewImpl view, Object potentialID)
+ protected InternalEObject convertPotentialID(CDOViewImpl view, Object potentialID)
{
if (potentialID instanceof CDOID)
{
@@ -359,10 +359,24 @@ public abstract class CDOLegacyImpl extends CDOWrapperImpl
return convertID(view, id);
}
- return potentialID;
+ if (potentialID instanceof InternalCDOObject)
+ {
+ potentialID = ((InternalCDOObject)potentialID).cdoInternalInstance();
+ }
+
+ if (potentialID instanceof InternalEObject)
+ {
+ return (InternalEObject)potentialID;
+ }
+
+ throw new ImplementationError();
}
- protected abstract Object convertID(CDOViewImpl view, CDOID id);
+ protected InternalEObject convertID(CDOViewImpl view, CDOID id)
+ {
+ InternalCDOObject object = view.getObject(id, false);
+ return object.cdoInternalInstance();
+ }
protected Object getInstanceValue(InternalEObject instance, CDOFeatureImpl feature)
{