summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-07-07 06:39:49 (EDT)
committerEike Stepper2007-07-07 06:39:49 (EDT)
commit8990c2dce9e1133bfd45cef92ffa3c9983641c80 (patch)
treeeb35749c357fc6ef2e3ac87a187771762a6f895d
parent7ed99801715e435108708ddf721820ccf576af00 (diff)
downloadcdo-8990c2dce9e1133bfd45cef92ffa3c9983641c80.zip
cdo-8990c2dce9e1133bfd45cef92ffa3c9983641c80.tar.gz
cdo-8990c2dce9e1133bfd45cef92ffa3c9983641c80.tar.bz2
task 1: Develop 0.8.0
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/CDODBTransaction.java16
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/EmptyStoreTransaction.java16
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/ResourceManager.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/RevisionManager.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/ITransaction.java12
5 files changed, 38 insertions, 16 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/CDODBTransaction.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/CDODBTransaction.java
index 13c9795..f299881 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/CDODBTransaction.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/CDODBTransaction.java
@@ -30,22 +30,30 @@ public class CDODBTransaction extends DBStoreTransaction implements ITransaction
super(storeManager, connection);
}
- public CDOID loadResourceID(String path)
+ public void registerResource(CDOID id, String path)
+ {
+ }
+
+ public CDOID getResourceID(String path)
{
return null;
}
- public String loadResourcePath(CDOID id)
+ public String getResourcePath(CDOID id)
{
return null;
}
- public CDORevisionImpl loadRevision(CDOID id)
+ public void addRevision(CDORevisionImpl revision)
+ {
+ }
+
+ public CDORevisionImpl getRevision(CDOID id)
{
return null;
}
- public CDORevisionImpl loadRevision(CDOID id, long timeStamp)
+ public CDORevisionImpl getRevision(CDOID id, long timeStamp)
{
return null;
}
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/EmptyStoreTransaction.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/EmptyStoreTransaction.java
index 20f86e9..a3e2ebe 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/EmptyStoreTransaction.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/EmptyStoreTransaction.java
@@ -27,22 +27,30 @@ public class EmptyStoreTransaction extends StoreTransaction implements ITransact
super(storeManager);
}
- public CDOID loadResourceID(String path)
+ public void registerResource(CDOID id, String path)
+ {
+ }
+
+ public CDOID getResourceID(String path)
{
return null;
}
- public String loadResourcePath(CDOID id)
+ public String getResourcePath(CDOID id)
{
return null;
}
- public CDORevisionImpl loadRevision(CDOID id, long timeStamp)
+ public void addRevision(CDORevisionImpl revision)
+ {
+ }
+
+ public CDORevisionImpl getRevision(CDOID id, long timeStamp)
{
return null;
}
- public CDORevisionImpl loadRevision(CDOID id)
+ public CDORevisionImpl getRevision(CDOID id)
{
return null;
}
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/ResourceManager.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/ResourceManager.java
index 124f7a8..07c7bbd 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/ResourceManager.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/ResourceManager.java
@@ -77,17 +77,18 @@ public class ResourceManager implements IResourceManager
TRACER.format("Registering resource: {0} --> {1}", id, path);
}
+ StoreUtil.getTransaction().registerResource(id, path);
pathToIDMap.put(path, id);
}
}
private CDOID loadID(String path)
{
- return StoreUtil.getTransaction().loadResourceID(path);
+ return StoreUtil.getTransaction().getResourceID(path);
}
private String loadPath(CDOID id)
{
- return StoreUtil.getTransaction().loadResourcePath(id);
+ return StoreUtil.getTransaction().getResourcePath(id);
}
}
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/RevisionManager.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/RevisionManager.java
index 71d6115..a8ffc9a 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/RevisionManager.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/RevisionManager.java
@@ -37,6 +37,7 @@ public class RevisionManager extends CDORevisionResolverImpl implements IRevisio
@Override
public void addRevision(CDORevisionImpl revision)
{
+ StoreUtil.getTransaction().addRevision(revision);
super.addRevision(revision);
if (revision.isResource())
{
@@ -48,12 +49,12 @@ public class RevisionManager extends CDORevisionResolverImpl implements IRevisio
@Override
protected CDORevisionImpl loadRevision(CDOID id)
{
- return StoreUtil.getTransaction().loadRevision(id);
+ return StoreUtil.getTransaction().getRevision(id);
}
@Override
protected CDORevisionImpl loadRevision(CDOID id, long timeStamp)
{
- return StoreUtil.getTransaction().loadRevision(id, timeStamp);
+ return StoreUtil.getTransaction().getRevision(id, timeStamp);
}
}
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/ITransaction.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/ITransaction.java
index aed298a..c0f6bad 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/ITransaction.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/ITransaction.java
@@ -20,11 +20,15 @@ import org.eclipse.net4j.util.store.IStoreTransaction;
*/
public interface ITransaction extends IStoreTransaction
{
- public CDOID loadResourceID(String path);
+ public void registerResource(CDOID id, String path);
- public String loadResourcePath(CDOID id);
+ public CDOID getResourceID(String path);
- public CDORevisionImpl loadRevision(CDOID id);
+ public String getResourcePath(CDOID id);
- public CDORevisionImpl loadRevision(CDOID id, long timeStamp);
+ public void addRevision(CDORevisionImpl revision);
+
+ public CDORevisionImpl getRevision(CDOID id);
+
+ public CDORevisionImpl getRevision(CDOID id, long timeStamp);
}