summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-08-24 04:40:41 (EDT)
committerEike Stepper2007-08-24 04:40:41 (EDT)
commit527ea600787729a420a2628316bb2150fdf5fe0f (patch)
tree71015ecdb00a08cf187828e7b3cd00442ec6ef59
parent82fcff9abc38b2a106e525be77f6ae9ec9b8f66e (diff)
downloadcdo-527ea600787729a420a2628316bb2150fdf5fe0f.zip
cdo-527ea600787729a420a2628316bb2150fdf5fe0f.tar.gz
cdo-527ea600787729a420a2628316bb2150fdf5fe0f.tar.bz2
*** empty log message ***
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Session.java23
1 files changed, 15 insertions, 8 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Session.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Session.java
index 3c03402..fc0c97f 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Session.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Session.java
@@ -18,6 +18,7 @@ import org.eclipse.emf.cdo.internal.server.protocol.CDOServerProtocol;
import org.eclipse.emf.cdo.internal.server.protocol.InvalidationRequest;
import org.eclipse.emf.cdo.protocol.CDOID;
import org.eclipse.emf.cdo.protocol.CDOProtocolConstants;
+import org.eclipse.emf.cdo.protocol.model.CDOClass;
import org.eclipse.emf.cdo.protocol.model.CDOClassRef;
import org.eclipse.emf.cdo.server.ISession;
import org.eclipse.emf.cdo.server.IStoreReader;
@@ -175,15 +176,8 @@ public class Session extends Container<IView> implements ISession, CDOIDProvider
return id;
}
- RevisionManager revisionManager = sessionManager.getRepository().getRevisionManager();
- CDOClassRef type = revisionManager.getObjectType(id).createClassRef();
- if (type == null)
- {
- IStoreReader storeReader = StoreUtil.getReader();
- type = storeReader.readObjectType(id);
- }
-
knownObjects.add(id);
+ CDOClassRef type = getObjectType(id);
return CDOIDImpl.create(id.getValue(), type);
}
@@ -200,4 +194,17 @@ public class Session extends Container<IView> implements ISession, CDOIDProvider
sessionManager.sessionClosed(this);
super.doDeactivate();
}
+
+ protected CDOClassRef getObjectType(CDOID id)
+ {
+ RevisionManager revisionManager = sessionManager.getRepository().getRevisionManager();
+ CDOClass cdoClass = revisionManager.getObjectType(id);
+ if (cdoClass != null)
+ {
+ return cdoClass.createClassRef();
+ }
+
+ IStoreReader storeReader = StoreUtil.getReader();
+ return storeReader.readObjectType(id);
+ }
}