summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2008-01-19 04:22:38 (EST)
committerEike Stepper2008-01-19 04:22:38 (EST)
commit63fbd2c4667d1b84af96983082161bbe9fde047b (patch)
tree5ecd3938e4d8b0cd947cd2214712f74714c6ef36
parente7396df662bb5b466410ce590dae0ebb2943a5ae (diff)
downloadcdo-63fbd2c4667d1b84af96983082161bbe9fde047b.zip
cdo-63fbd2c4667d1b84af96983082161bbe9fde047b.tar.gz
cdo-63fbd2c4667d1b84af96983082161bbe9fde047b.tar.bz2
[215688] Create save points
https://bugs.eclipse.org/bugs/show_bug.cgi?id=215688
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectDeltaApplier.java36
1 files changed, 36 insertions, 0 deletions
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/CDOObjectDeltaApplier.java
new file mode 100644
index 0000000..2a0a2ff
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectDeltaApplier.java
@@ -0,0 +1,36 @@
+/***************************************************************************
+ * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Simon McDuff - initial API and implementation
+ * Eike Stepper - maintenance
+ **************************************************************************/
+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.protocol.revision.delta.CDORevisionDelta;
+
+/**
+ * @author Simon McDuff
+ */
+public class CDOObjectDeltaApplier extends CDORevisionDeltaApplier
+{
+ public CDOObjectDeltaApplier()
+ {
+ }
+
+ public void apply(InternalCDOObject object, CDORevisionDelta delta)
+ {
+ CDORevisionImpl revision = new CDORevisionImpl((CDORevisionImpl)object.cdoRevision());
+ revision.increaseVersion();
+ object.cdoInternalSetRevision(revision);
+ object.cdoInternalSetState(CDOState.DIRTY);
+ apply(revision, delta);
+ }
+}