org.apache.cayenne.intercept
Class DataChannelDecorator
java.lang.Object
org.apache.cayenne.intercept.DataChannelDecorator
- All Implemented Interfaces:
- DataChannel
- Direct Known Subclasses:
- DataChannelCallbackInterceptor
public class DataChannelDecorator
- extends Object
- implements DataChannel
A helper DataChannel
implementation that passes all requests to the underlying
decorated channel for execution. Intended for subclassing.
- Since:
- 3.0
- Author:
- Andrus Adamchik
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
channel
protected DataChannel channel
DataChannelDecorator
protected DataChannelDecorator()
DataChannelDecorator
public DataChannelDecorator(DataChannel channel)
getEntityResolver
public EntityResolver getEntityResolver()
- Description copied from interface:
DataChannel
- Returns an EntityResolver instance that contains runtime mapping information.
- Specified by:
getEntityResolver
in interface DataChannel
getEventManager
public EventManager getEventManager()
- Description copied from interface:
DataChannel
- Returns an EventManager associated with this channel. Channel may return null if
EventManager is not available for any reason.
- Specified by:
getEventManager
in interface DataChannel
onQuery
public QueryResponse onQuery(ObjectContext originatingContext,
Query query)
- Description copied from interface:
DataChannel
- Executes a query, using provided context to register persistent objects
if query returns any objects.
- Specified by:
onQuery
in interface DataChannel
- Parameters:
originatingContext
- an ObjectContext that originated the query, used to
register result objects.
- Returns:
- a generic response object that encapsulates result of the execution.
onSync
public GraphDiff onSync(ObjectContext originatingContext,
GraphDiff changes,
int syncType)
- Description copied from interface:
DataChannel
- Processes synchronization request from a child ObjectContext, returning a GraphDiff
that describes changes to objects made on the receiving end as a result of
syncronization.
- Specified by:
onSync
in interface DataChannel
- Parameters:
originatingContext
- an ObjectContext that initiated the sync. Can be null.changes
- diff from the context that initiated the sync.syncType
- One of DataChannel.FLUSH_NOCASCADE_SYNC
, DataChannel.FLUSH_CASCADE_SYNC
,
DataChannel.ROLLBACK_CASCADE_SYNC
.
getChannel
public DataChannel getChannel()
setChannel
public void setChannel(DataChannel channel)
Copyright © 2001-2007 Apache Cayenne. All Rights Reserved.