Package org.apache.cayenne

## Interface DataChannelFilter

- All Superinterfaces:
    `DataChannelQueryFilter`, `DataChannelSyncFilter`

      @Deprecated
      public interface DataChannelFilter
      extends DataChannelSyncFilter, DataChannelQueryFilter

  Deprecated.
  since 4.1 use `DataChannelQueryFilter` and `DataChannelSyncFilter`
  An interface of a filter that allows to intercept DataChannel operations. Filters allow to implement chains of custom processors around a DataChannel, that can be used for security, monitoring, business logic, providing context to lifecycle event listeners, etc.
  Since:
    3.1

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `init​(DataChannel channel)` | Deprecated.
    `QueryResponse` | `onQuery​(ObjectContext originatingContext, Query query, DataChannelFilterChain filterChain)` | Deprecated.
    `default QueryResponse` | `onQuery​(ObjectContext originatingContext, Query query, DataChannelQueryFilterChain filterChain)` | Deprecated. Adapter method that allows to use old DataChannelFilter as new query filter
    `GraphDiff` | `onSync​(ObjectContext originatingContext, GraphDiff changes, int syncType, DataChannelFilterChain filterChain)` | Deprecated.
    `default GraphDiff` | `onSync​(ObjectContext originatingContext, GraphDiff changes, int syncType, DataChannelSyncFilterChain filterChain)` | Deprecated. Adapter method that allows to use old DataChannelFilter as new sync filter

- - ### Method Detail

    - #### init

          void init​(DataChannel channel)

      Deprecated.

    - #### onQuery

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

      Deprecated.

    - #### onSync

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

      Deprecated.

    - #### onQuery

          default QueryResponse onQuery​(ObjectContext originatingContext,
                                        Query query,
                                        DataChannelQueryFilterChain filterChain)

      Deprecated.
      Adapter method that allows to use old DataChannelFilter as new query filter
      Specified by:
        `onQuery` in interface `DataChannelQueryFilter`
      Parameters:
        `originatingContext` - originating context of query
        `query` - that is processed
        `filterChain` - chain of query filters to invoke after this filter
      Returns:
        query response

    - #### onSync

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

      Deprecated.
      Adapter method that allows to use old DataChannelFilter as new sync filter
      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`