org.apache.cayenne.tx

## Class TransactionFilter

- java.lang.Object
- - org.apache.cayenne.tx.TransactionFilter

- All Implemented Interfaces:
    DataChannelSyncFilter

      public class TransactionFilter
      extends Object
      implements DataChannelSyncFilter

  A `DataChannelSyncFilter` that provides transactions.
  Since:
    4.0

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected TransactionManager` | `transactionManager`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TransactionFilter()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `GraphDiff` | `onSync(ObjectContext originatingContext, GraphDiff changes, int syncType, DataChannelSyncFilterChain filterChain)`

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

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

- - ### Field Detail

    - #### transactionManager

          protected TransactionManager transactionManager

  - ### Constructor Detail

    - #### TransactionFilter

          public TransactionFilter()

  - ### Method Detail

    - #### onSync

          public GraphDiff onSync(ObjectContext originatingContext,
                                  GraphDiff changes,
                                  int syncType,
                                  DataChannelSyncFilterChain filterChain)

      Specified by:
        `onSync` in interface `DataChannelSyncFilter`
      Parameters:
        `originatingContext` - originating context of changes
        `changes` - diff that is being processed
        `syncType` - type of sync; possible values: `DataChannel.FLUSH_NOCASCADE_SYNC`, `DataChannel.FLUSH_CASCADE_SYNC`, `DataChannel.ROLLBACK_CASCADE_SYNC`
        `filterChain` - chain of sync filters to invoke after this filter
      Returns:
        final context diff
      See Also:
        `DataChannel.FLUSH_NOCASCADE_SYNC`, `DataChannel.FLUSH_CASCADE_SYNC`, `DataChannel.ROLLBACK_CASCADE_SYNC`

Copyright © 2001–2021 Apache Cayenne. All rights reserved.