org.apache.cayenne.tx

## Class TransactionFilter

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

- All Implemented Interfaces:
    DataChannelFilter

      public class TransactionFilter
      extends Object
      implements DataChannelFilter

  A `DataChannelFilter` 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
    --- | ---
    `void` | `init(DataChannel channel)`
    `QueryResponse` | `onQuery(ObjectContext originatingContext, Query query, DataChannelFilterChain filterChain)`
    `GraphDiff` | `onSync(ObjectContext originatingContext, GraphDiff changes, int syncType, DataChannelFilterChain 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

    - #### init

          public void init(DataChannel channel)

      Specified by:
        `init` in interface `DataChannelFilter`

    - #### onQuery

          public QueryResponse onQuery(ObjectContext originatingContext,
                                       Query query,
                                       DataChannelFilterChain filterChain)

      Specified by:
        `onQuery` in interface `DataChannelFilter`

    - #### onSync

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

      Specified by:
        `onSync` in interface `DataChannelFilter`

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