summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-08-03 12:10:55 (EDT)
committerEike Stepper2007-08-03 12:10:55 (EDT)
commit9e5549bd614b531c1a5e6f9664361c7b287030c5 (patch)
treecddcf09d633b18e045ef27a328cb30ec1fe7c964
parentd5425b6b911709f42f4c1b630400032d1385ae4c (diff)
downloadcdo-9e5549bd614b531c1a5e6f9664361c7b287030c5.zip
cdo-9e5549bd614b531c1a5e6f9664361c7b287030c5.tar.gz
cdo-9e5549bd614b531c1a5e6f9664361c7b287030c5.tar.bz2
*** empty log message ***
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java10
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Session.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/store/Store.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IRepository.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IStore.java5
5 files changed, 20 insertions, 9 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java
index 98bbc2f..67875b2 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java
@@ -12,10 +12,10 @@ package org.eclipse.emf.cdo.internal.server;
import org.eclipse.emf.cdo.internal.protocol.CDOIDImpl;
import org.eclipse.emf.cdo.internal.protocol.CDOIDRangeImpl;
+import org.eclipse.emf.cdo.internal.protocol.model.CDOClassRefImpl;
import org.eclipse.emf.cdo.internal.server.store.Store;
import org.eclipse.emf.cdo.protocol.CDOID;
import org.eclipse.emf.cdo.protocol.CDOIDRange;
-import org.eclipse.emf.cdo.protocol.model.CDOClassRef;
import org.eclipse.emf.cdo.server.IRepository;
import org.eclipse.net4j.internal.util.lifecycle.Lifecycle;
@@ -52,7 +52,7 @@ public class Repository extends Lifecycle implements IRepository
private long nextMetaIDValue = INITIAL_META_ID_VALUE;
- private ConcurrentMap<CDOID, CDOClassRef> types = new ConcurrentHashMap();
+ private ConcurrentMap<CDOID, CDOClassRefImpl> types = new ConcurrentHashMap();
public Repository(String name, Store store)
{
@@ -119,9 +119,9 @@ public class Repository extends Lifecycle implements IRepository
return id;
}
- public CDOClassRef getObjectType(CDOID id)
+ public CDOClassRefImpl getObjectType(CDOID id)
{
- CDOClassRef type = types.get(id);
+ CDOClassRefImpl type = types.get(id);
if (type == null)
{
type = store.queryObjectType(id);
@@ -136,7 +136,7 @@ public class Repository extends Lifecycle implements IRepository
return type;
}
- public void setObjectType(CDOID id, CDOClassRef type)
+ public void setObjectType(CDOID id, CDOClassRefImpl type)
{
types.putIfAbsent(id, type);
}
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 22baaad..956f118 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
@@ -73,8 +73,14 @@ public class Session implements ISession, CDOIDProvider
public CDOID provideCDOID(Object idObject)
{
CDOID id = (CDOID)idObject;
+ if (id.isNull())
+ {
+ return id;
+ }
+
if (knownObjects.contains(id))
{
+ // TODO On client-side add a check if the id is really known!
return id;
}
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/store/Store.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/store/Store.java
index aa83b9f..c7a8c41 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/store/Store.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/store/Store.java
@@ -10,11 +10,11 @@
**************************************************************************/
package org.eclipse.emf.cdo.internal.server.store;
+import org.eclipse.emf.cdo.internal.protocol.model.CDOClassRefImpl;
import org.eclipse.emf.cdo.internal.protocol.revision.CDORevisionImpl;
import org.eclipse.emf.cdo.internal.server.Repository;
import org.eclipse.emf.cdo.internal.server.RevisionManager;
import org.eclipse.emf.cdo.protocol.CDOID;
-import org.eclipse.emf.cdo.protocol.model.CDOClassRef;
import org.eclipse.emf.cdo.server.IStore;
import org.eclipse.net4j.util.transaction.TX;
@@ -80,7 +80,7 @@ public abstract class Store implements IStore
return (CDORevisionImpl)TX.execute(createLoadHistoricalRevisionOperation(id, timeStamp));
}
- public CDOClassRef queryObjectType(CDOID id)
+ public CDOClassRefImpl queryObjectType(CDOID id)
{
// TODO Implement method Store.queryObjectType()
throw new UnsupportedOperationException("Not yet implemented");
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IRepository.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IRepository.java
index 06086ef..1065b1c 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IRepository.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IRepository.java
@@ -10,6 +10,8 @@
**************************************************************************/
package org.eclipse.emf.cdo.server;
+import org.eclipse.emf.cdo.protocol.CDOID;
+import org.eclipse.emf.cdo.protocol.model.CDOClassRef;
import org.eclipse.emf.cdo.protocol.model.CDOPackageManager;
/**
@@ -30,4 +32,6 @@ public interface IRepository
public IResourceManager getResourceManager();
public IRevisionManager getRevisionManager();
+
+ public CDOClassRef getObjectType(CDOID id);
}
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IStore.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IStore.java
index 1a2a21c..2cbe4fb 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IStore.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IStore.java
@@ -14,6 +14,7 @@ import org.eclipse.emf.cdo.internal.protocol.revision.CDORevisionImpl;
import org.eclipse.emf.cdo.internal.server.RevisionManager;
import org.eclipse.emf.cdo.protocol.CDOID;
import org.eclipse.emf.cdo.protocol.model.CDOClassRef;
+import org.eclipse.emf.cdo.protocol.revision.CDORevision;
import org.eclipse.net4j.util.transaction.ITransaction;
@@ -38,9 +39,9 @@ public interface IStore
public void addRevision(RevisionManager revisionManager, CDORevisionImpl revision);
- public CDORevisionImpl loadRevision(CDOID id);
+ public CDORevision loadRevision(CDOID id);
- public CDORevisionImpl loadHistoricalRevision(CDOID id, long timeStamp);
+ public CDORevision loadHistoricalRevision(CDOID id, long timeStamp);
public CDOClassRef queryObjectType(CDOID id);
}