Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2011-07-28 03:13:39 -0400
committerEike Stepper2011-07-28 03:13:39 -0400
commit940c7aca1ace873a557671437f04473052cf9e09 (patch)
tree2333e949b9120bbcded5af37af1ff2d2b8af63d8
parente993f7385a908dbe204eb5d8ed326e7d68d9f721 (diff)
downloadcdo-940c7aca1ace873a557671437f04473052cf9e09.tar.gz
cdo-940c7aca1ace873a557671437f04473052cf9e09.tar.xz
cdo-940c7aca1ace873a557671437f04473052cf9e09.zip
[352977] Dirty Objects of CDOTransaction with CDOSavepoint
https://bugs.eclipse.org/bugs/show_bug.cgi?id=352977
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/transaction/CDOUserSavepoint.java5
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOUserSavepointImpl.java20
2 files changed, 25 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/transaction/CDOUserSavepoint.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/transaction/CDOUserSavepoint.java
index 837963b5cf..acd326f5a3 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/transaction/CDOUserSavepoint.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/transaction/CDOUserSavepoint.java
@@ -30,6 +30,11 @@ public interface CDOUserSavepoint
public CDOUserSavepoint getPreviousSavepoint();
+ /**
+ * @since 4.1
+ */
+ public int getNumber();
+
public boolean isValid();
public void rollback();
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOUserSavepointImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOUserSavepointImpl.java
index 283de4bc21..2fcf36de9f 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOUserSavepointImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOUserSavepointImpl.java
@@ -11,6 +11,8 @@
**************************************************************************/
package org.eclipse.emf.internal.cdo.transaction;
+import org.eclipse.emf.cdo.transaction.CDOUserSavepoint;
+
import org.eclipse.emf.spi.cdo.InternalCDOUserSavepoint;
import org.eclipse.emf.spi.cdo.InternalCDOUserTransaction;
@@ -80,4 +82,22 @@ public abstract class CDOUserSavepointImpl implements InternalCDOUserSavepoint
return false;
}
+
+ public int getNumber()
+ {
+ int number = 1;
+ CDOUserSavepoint savepoint = this;
+ while ((savepoint = savepoint.getPreviousSavepoint()) != null)
+ {
+ ++number;
+ }
+
+ return number;
+ }
+
+ @Override
+ public String toString()
+ {
+ return "Savepoint #" + getNumber();
+ }
}

Back to the top