Package org.apache.cayenne.util
Class ObjectContextQueryAction
java.lang.Object
org.apache.cayenne.util.ObjectContextQueryAction
public abstract class ObjectContextQueryAction extends Object
A helper class that implements
 
DataChannel.onQuery(ObjectContext, Query) logic on behalf of
 an ObjectContext.
 Intended for internal use only.
- Since:
- 1.2
- 
Field SummaryFields Modifier and Type Field Description protected ObjectContextactingContextprotected static booleanDONEprotected QueryMetadatametadataprotected Queryqueryprotected booleanqueryOriginatorprotected QueryResponseresponseprotected ObjectContexttargetContext
- 
Constructor SummaryConstructors Constructor Description ObjectContextQueryAction(ObjectContext actingContext, ObjectContext targetContext, Query query)
- 
Method SummaryModifier and Type Method Description QueryResponseexecute()Worker method that performs internal query.protected QueryCacheEntryFactorygetCacheObjectFactory()protected QueryCachegetQueryCache()protected booleaninterceptInternalQuery()protected booleaninterceptLocalCache()protected voidinterceptObjectConversion()Transfers fetched objects into the target context if it is different from "acting" context.protected booleaninterceptOIDQuery()protected abstract booleaninterceptPaginatedQuery()protected abstract booleaninterceptRefreshQuery()protected booleaninterceptRelationshipQuery()protected ObjectpolymorphicObjectFromCache(ObjectId superOid)protected voidrunQuery()Fetches data from the channel.
- 
Field Details- 
DONEprotected static final boolean DONE- See Also:
- Constant Field Values
 
- 
targetContext
- 
actingContext
- 
query
- 
metadata
- 
queryOriginatorprotected boolean queryOriginator
- 
response
 
- 
- 
Constructor Details- 
ObjectContextQueryActionpublic ObjectContextQueryAction(ObjectContext actingContext, ObjectContext targetContext, Query query)
 
- 
- 
Method Details- 
executeWorker method that performs internal query.
- 
interceptObjectConversionprotected void interceptObjectConversion()Transfers fetched objects into the target context if it is different from "acting" context. Note that when this method is invoked, result objects are already registered with acting context by the parent channel.
- 
interceptInternalQueryprotected boolean interceptInternalQuery()
- 
interceptOIDQueryprotected boolean interceptOIDQuery()
- 
polymorphicObjectFromCache
- 
interceptRelationshipQueryprotected boolean interceptRelationshipQuery()
- 
interceptPaginatedQueryprotected abstract boolean interceptPaginatedQuery()- Since:
- 3.0
 
- 
interceptRefreshQueryprotected abstract boolean interceptRefreshQuery()- Since:
- 3.0
 
- 
interceptLocalCacheprotected boolean interceptLocalCache()- Since:
- 3.0
 
- 
getQueryCache- Since:
- 3.0
 
- 
getCacheObjectFactory- Since:
- 3.0
 
- 
runQueryprotected void runQuery()Fetches data from the channel.
 
-