summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2008-01-19 04:37:35 (EST)
committerEike Stepper2008-01-19 04:37:35 (EST)
commit144506ef94ddd04cd485402c7cacab12abbbf0a4 (patch)
tree8bbfaf13d08a30af65a8f021bfded594f2a29083
parent63fbd2c4667d1b84af96983082161bbe9fde047b (diff)
downloadcdo-144506ef94ddd04cd485402c7cacab12abbbf0a4.zip
cdo-144506ef94ddd04cd485402c7cacab12abbbf0a4.tar.gz
cdo-144506ef94ddd04cd485402c7cacab12abbbf0a4.tar.bz2
[215688] Create save points
https://bugs.eclipse.org/bugs/show_bug.cgi?id=215688
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/ClassMapping.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RevisionDeltaTest.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RevisionHolderTest.java7
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOLegacyImpl.java6
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java4
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectMerger.java (renamed from plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectDeltaApplier.java)10
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStore.java2
7 files changed, 21 insertions, 16 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/ClassMapping.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/ClassMapping.java
index 0ffc365..32e452c 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/ClassMapping.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/ClassMapping.java
@@ -579,7 +579,7 @@ public abstract class ClassMapping implements IClassMapping
revision.setRevised(resultSet.getLong(i++));
revision.setResourceID(CDOIDImpl.create(resultSet.getLong(i++)));
revision.setContainerID(CDOIDImpl.create(resultSet.getLong(i++)));
- revision.setContainingFeature(resultSet.getInt(i++));
+ revision.setContainingFeatureID(resultSet.getInt(i++));
}
if (attributeMappings != null)
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RevisionDeltaTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RevisionDeltaTest.java
index 19fd347..fdf23ed 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RevisionDeltaTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RevisionDeltaTest.java
@@ -62,7 +62,7 @@ public class RevisionDeltaTest extends AbstractCDOTest
company1.setName("TEST3");
CDORevisionImpl rev2 = getCopyCDORevision(company1);
- CDORevisionDelta revisionDelta = rev2.createDelta(rev1);
+ CDORevisionDelta revisionDelta = rev2.compare(rev1);
assertEquals(1, revisionDelta.getFeatureDeltas().size());
CDOSetFeatureDelta setDelta = (CDOSetFeatureDelta)revisionDelta.getFeatureDeltas().get(0);
assertEquals("TEST3", setDelta.getValue());
@@ -71,7 +71,7 @@ public class RevisionDeltaTest extends AbstractCDOTest
company1.getCategories().clear();
CDORevisionImpl rev3 = getCopyCDORevision(company1);
- CDORevisionDelta revisionDelta3 = rev3.createDelta(rev2);
+ CDORevisionDelta revisionDelta3 = rev3.compare(rev2);
assertEquals(1, revisionDelta3.getFeatureDeltas().size());
CDOListFeatureDeltaImpl delta3List = (CDOListFeatureDeltaImpl)revisionDelta3.getFeatureDeltas().get(0);
@@ -86,7 +86,7 @@ public class RevisionDeltaTest extends AbstractCDOTest
}
CDORevisionImpl rev4 = getCopyCDORevision(company1);
- CDORevisionDelta revisionDelta4 = rev4.createDelta(rev3);
+ CDORevisionDelta revisionDelta4 = rev4.compare(rev3);
assertEquals(1, revisionDelta4.getFeatureDeltas().size());
CDOListFeatureDeltaImpl delta4List = (CDOListFeatureDeltaImpl)revisionDelta4.getFeatureDeltas().get(0);
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RevisionHolderTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RevisionHolderTest.java
index 621e0fb..3b14cfa 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RevisionHolderTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RevisionHolderTest.java
@@ -192,11 +192,16 @@ public class RevisionHolderTest extends AbstractOMTest
this.id = CDOIDImpl.create(id);
}
- public CDORevisionDelta createDelta(CDORevision origin)
+ public CDORevisionDelta compare(CDORevision origin)
{
return null;
}
+ public void merge(CDORevisionDelta delta)
+ {
+ throw new UnsupportedOperationException();
+ }
+
public CDOClass getCDOClass()
{
return null;
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 ac06dcf..0034da3 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
@@ -171,7 +171,7 @@ public abstract class CDOLegacyImpl extends CDOWrapperImpl implements Adapter.In
revision.getVersion() - 1, false);
CDOTransactionImpl transaction = cdoView().toTransaction();
- transaction.registerRevisionDelta(cdoRevision().createDelta(originRevision));
+ transaction.registerRevisionDelta(cdoRevision().compare(originRevision));
}
public void cdoInternalPostLoad()
@@ -243,7 +243,7 @@ public abstract class CDOLegacyImpl extends CDOWrapperImpl implements Adapter.In
{
revision.setResourceID(((CDOResource)container).cdoID());
revision.setContainerID(CDOID.NULL);
- revision.setContainingFeature(0);
+ revision.setContainingFeatureID(0);
}
else
{
@@ -257,7 +257,7 @@ public abstract class CDOLegacyImpl extends CDOWrapperImpl implements Adapter.In
int containerFeatureID = instance.eContainerFeatureID();// containER???
revision.setContainerID(containerID);
- revision.setContainingFeature(containerFeatureID);
+ revision.setContainingFeatureID(containerFeatureID);
}
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java
index a281b89..f5ff62a 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java
@@ -197,7 +197,7 @@ public class CDOObjectImpl extends EStoreEObjectImpl implements InternalCDOObjec
CDOViewImpl view = cdoView();
revision.setContainerID(eContainer == null ? CDOID.NULL : ((CDOObjectImpl)eContainer).cdoID());
- revision.setContainingFeature(eContainerFeatureID);
+ revision.setContainingFeatureID(eContainerFeatureID);
if (eSettings != null)
{
@@ -499,7 +499,7 @@ public class CDOObjectImpl extends EStoreEObjectImpl implements InternalCDOObjec
CDORevisionImpl revision = (CDORevisionImpl)cdoObject.cdoRevision();
revision.setVersion(1);
revision.setContainerID(eContainer == null ? CDOID.NULL : ((CDOObjectImpl)eContainer).cdoID());
- revision.setContainingFeature(eContainerFeatureID);
+ revision.setContainingFeatureID(eContainerFeatureID);
if (eSettings != null)
{
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectDeltaApplier.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectMerger.java
index 2a0a2ff..7904374 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectDeltaApplier.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectMerger.java
@@ -13,24 +13,24 @@ package org.eclipse.emf.internal.cdo;
import org.eclipse.emf.cdo.CDOState;
import org.eclipse.emf.cdo.internal.protocol.revision.CDORevisionImpl;
-import org.eclipse.emf.cdo.internal.protocol.revision.delta.CDORevisionDeltaApplier;
+import org.eclipse.emf.cdo.internal.protocol.revision.delta.CDORevisionMerger;
import org.eclipse.emf.cdo.protocol.revision.delta.CDORevisionDelta;
/**
* @author Simon McDuff
*/
-public class CDOObjectDeltaApplier extends CDORevisionDeltaApplier
+public class CDOObjectMerger extends CDORevisionMerger
{
- public CDOObjectDeltaApplier()
+ public CDOObjectMerger()
{
}
- public void apply(InternalCDOObject object, CDORevisionDelta delta)
+ public void merge(InternalCDOObject object, CDORevisionDelta delta)
{
CDORevisionImpl revision = new CDORevisionImpl((CDORevisionImpl)object.cdoRevision());
revision.increaseVersion();
object.cdoInternalSetRevision(revision);
object.cdoInternalSetState(CDOState.DIRTY);
- apply(revision, delta);
+ merge(revision, delta);
}
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStore.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStore.java
index 29e0407..62a6fe7 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStore.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStore.java
@@ -74,7 +74,7 @@ public final class CDOStore implements EStore
CDOContainerFeatureDeltaImpl delta = new CDOContainerFeatureDeltaImpl(containerID, newContainerFeatureID);
CDORevisionImpl revision = getRevisionForWriting(cdoObject, delta);
revision.setContainerID(containerID);
- revision.setContainingFeature(newContainerFeatureID);
+ revision.setContainingFeatureID(newContainerFeatureID);
}
public InternalEObject getContainer(InternalEObject eObject)