org.apache.cayenne.util
Class ObjectContextQueryAction

java.lang.Object
  extended by org.apache.cayenne.util.ObjectContextQueryAction

public class ObjectContextQueryAction
extends java.lang.Object

A helper class that implements DataChannel.onQuery(ObjectContext, Query) logic on behalf of an ObjectContext.

Intended for internal use only.

Since:
1.2
Author:
Andrus Adamchik

Field Summary
protected  ObjectContext actingContext
           
protected static boolean DONE
           
protected  QueryMetadata metadata
           
protected  Query query
           
protected  QueryResponse response
           
protected  ObjectContext targetContext
           
 
Constructor Summary
ObjectContextQueryAction(ObjectContext actingContext, ObjectContext targetContext, Query query)
           
 
Method Summary
 QueryResponse execute()
          Worker method that perfomrs internal query.
protected  void interceptObjectConversion()
          Transfers fetched objects into the target context if it is different from "acting" context.
protected  boolean interceptOIDQuery()
           
protected  boolean interceptRelationshipQuery()
           
protected  void runQuery()
          Fetches data from the channel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DONE

protected static final boolean DONE
See Also:
Constant Field Values

targetContext

protected ObjectContext targetContext

actingContext

protected ObjectContext actingContext

query

protected Query query

metadata

protected QueryMetadata metadata

response

protected transient QueryResponse response
Constructor Detail

ObjectContextQueryAction

public ObjectContextQueryAction(ObjectContext actingContext,
                                ObjectContext targetContext,
                                Query query)
Method Detail

execute

public QueryResponse execute()
Worker method that perfomrs internal query.


interceptObjectConversion

protected 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.


interceptOIDQuery

protected boolean interceptOIDQuery()

interceptRelationshipQuery

protected boolean interceptRelationshipQuery()

runQuery

protected void runQuery()
Fetches data from the channel.



Copyright © 2001-2006 Apache.org All Rights Reserved.