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 java.lang.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

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static java.lang.String` | `MERGE_PREFIX` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `CDOTransactionCommentator​(CDOTransaction transaction)` |
    `CDOTransactionCommentator​(CDOTransaction transaction, boolean showMerges)` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static boolean` | `appendMerge​(java.lang.StringBuilder builder, CDOBranchPoint mergeSource)` |
    `static void` | `appendSummary​(java.lang.StringBuilder builder, CDOCommitContext commitContext)` |
    `static boolean` | `appendSummary​(java.lang.StringBuilder builder, CDOCommitContext commitContext, boolean showMerges)` |
    `void` | `close()` |
    `protected java.lang.String` | `createComment​(CDOCommitContext commitContext)` |
    `CDOTransaction` | `getTransaction()` |
    `boolean` | `isClosed()` |
    `boolean` | `isShowMerges()` |
    `void` | `setShowMerges​(boolean showMerges)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### MERGE_PREFIX

          public static final java.lang.String MERGE_PREFIX

      Since:
        4.6
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### CDOTransactionCommentator

          public CDOTransactionCommentator​(CDOTransaction transaction)

    - #### CDOTransactionCommentator

          public CDOTransactionCommentator​(CDOTransaction transaction,
                                           boolean showMerges)

      Since:
        4.6

  - ### Method Detail

    - #### getTransaction

          public final CDOTransaction 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 interface `org.eclipse.net4j.util.collection.Closeable`

    - #### close

          public void close()

      Specified by:
        `close` in interface `org.eclipse.net4j.util.collection.Closeable`

    - #### createComment

          protected java.lang.String createComment​(CDOCommitContext commitContext)

    - #### appendMerge

          public static boolean appendMerge​(java.lang.StringBuilder builder,
                                            CDOBranchPoint mergeSource)

      Since:
        4.6

    - #### appendSummary

          public static void appendSummary​(java.lang.StringBuilder builder,
                                           CDOCommitContext commitContext)

      Since:
        4.2

    - #### appendSummary

          public static boolean appendSummary​(java.lang.StringBuilder builder,
                                              CDOCommitContext commitContext,
                                              boolean showMerges)

      Since:
        4.6