summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-08-03 15:29:18 (EDT)
committerEike Stepper2007-08-03 15:29:18 (EDT)
commitd69607dabdd32b5daa907fb77559d9607ce226da (patch)
tree6eaa6c9fea72cb3827be4cc7f5311be12318e4a3
parentc6fb86067f07d5c766b411e09dd97fbf21c6766d (diff)
downloadcdo-d69607dabdd32b5daa907fb77559d9607ce226da.zip
cdo-d69607dabdd32b5daa907fb77559d9607ce226da.tar.gz
cdo-d69607dabdd32b5daa907fb77559d9607ce226da.tar.bz2
*** empty log message ***
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOAdapterImpl.java9
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOCallbackImpl.java4
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOLegacyImpl.java18
3 files changed, 25 insertions, 6 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 a0501f3..8e4f192 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,6 +11,7 @@
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;
@@ -129,13 +130,15 @@ public class CDOAdapterImpl extends CDOLegacyImpl implements Adapter.Internal
/**
* 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). TODO Investigate the use of proxies here
+ * whole subtree (i.e. resource).
+ * <p>
+ * TODO Investigate the use of proxies here
*
* @see CDOCallbackImpl
*/
@Override
- protected Object convertPotentialID(CDOViewImpl view, Object potentialID)
+ protected Object convertID(CDOViewImpl view, CDOID id)
{
- return view.convertIDToObject(potentialID);
+ 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 6764143..55b64ab 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
@@ -37,9 +37,9 @@ public class CDOCallbackImpl extends CDOLegacyImpl implements CDOCallback
}
@Override
- protected Object convertPotentialID(CDOViewImpl view, Object id)
+ protected Object convertID(CDOViewImpl view, CDOID id)
{
- InternalCDOObject object = view.getObject((CDOID)id, false);
+ 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 479838a..19d37ee 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,23 @@ public abstract class CDOLegacyImpl extends CDOWrapperImpl
}
}
- protected abstract Object convertPotentialID(CDOViewImpl view, Object potentialID);
+ protected Object convertPotentialID(CDOViewImpl view, Object potentialID)
+ {
+ if (potentialID instanceof CDOID)
+ {
+ CDOID id = (CDOID)potentialID;
+ if (id.isNull())
+ {
+ return null;
+ }
+
+ return convertID(view, id);
+ }
+
+ return potentialID;
+ }
+
+ protected abstract Object convertID(CDOViewImpl view, CDOID id);
protected Object getInstanceValue(InternalEObject instance, CDOFeatureImpl feature)
{