Package org.eclipse.emf.cdo.transaction
Class CDOTransactionCommentator
java.lang.Object
org.eclipse.emf.cdo.transaction.CDOTransactionCommentator
- All Implemented Interfaces:
org.eclipse.net4j.util.collection.Closeable
public class CDOTransactionCommentator
extends Object
implements org.eclipse.net4j.util.collection.Closeable
A utility class that, when associated with a
transaction
, automatically updates the
commit comment
according to local model modifications.- Since:
- 4.2
- Author:
- Eike Stepper
-
Field Summary
-
Constructor Summary
ConstructorDescriptionCDOTransactionCommentator
(CDOTransaction transaction) CDOTransactionCommentator
(CDOTransaction transaction, boolean showMerges) -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
appendBranchPoint
(StringBuilder builder, CDOBranchPoint branchPoint) static boolean
appendMerge
(StringBuilder builder, CDOBranchPoint mergeSource) static void
appendSummary
(StringBuilder builder, CDOCommitContext commitContext) static boolean
appendSummary
(StringBuilder builder, CDOCommitContext commitContext, boolean showMerges) void
close()
protected String
createComment
(CDOCommitContext commitContext) final CDOTransaction
final boolean
isClosed()
final boolean
static boolean
setRevertComment
(CDOTransaction transaction, CDOBranchPoint revertTo) final void
setShowMerges
(boolean showMerges)
-
Field Details
-
MERGE_PREFIX
- Since:
- 4.6
- See Also:
-
-
Constructor Details
-
CDOTransactionCommentator
-
CDOTransactionCommentator
- Since:
- 4.6
-
-
Method Details
-
getTransaction
-
isShowMerges
public final boolean isShowMerges()- Since:
- 4.6
-
setShowMerges
public final void setShowMerges(boolean showMerges) - Since:
- 4.6
-
isClosed
public final boolean isClosed()- Specified by:
isClosed
in interfaceorg.eclipse.net4j.util.collection.Closeable
-
close
public void close()- Specified by:
close
in interfaceorg.eclipse.net4j.util.collection.Closeable
-
createComment
-
setRevertComment
- Since:
- 4.16
-
appendMerge
- Since:
- 4.6
-
appendBranchPoint
- Since:
- 4.15
-
appendSummary
- Since:
- 4.2
-
appendSummary
public static boolean appendSummary(StringBuilder builder, CDOCommitContext commitContext, boolean showMerges) - Since:
- 4.6
-