org.eclipse.emf.cdo.transaction

## Class CDOTransactionCommentator

- java.lang.Object
- - org.eclipse.emf.cdo.transaction.CDOTransactionCommentator

- All Implemented Interfaces:
    Closeable

      public class CDOTransactionCommentator
      extends java.lang.Object
      implements 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 and Description
    --- | ---
    `static java.lang.String` | `MERGE_PREFIX`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CDOTransactionCommentator(CDOTransaction transaction)`
    `CDOTransactionCommentator(CDOTransaction transaction, boolean showMerges)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and 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 `Closeable`

    - #### close

          public void close()

      Specified by:
        `close` in interface `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

Copyright (c) 2004-2019 Eike Stepper (Loehne, Germany) and others.
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