org.neodatis.odb.impl.core.query.criteria
Class CollectionQueryResultAction

java.lang.Object
  extended by org.neodatis.odb.impl.core.query.criteria.CollectionQueryResultAction
All Implemented Interfaces:
IMatchingObjectAction

public class CollectionQueryResultAction
extends java.lang.Object
implements IMatchingObjectAction

Class that manage normal query. Query that return a list of objects. For each object That matches the query criteria, the objectMatch method is called and it keeps the objects in the 'objects' instance.

Author:
olivier

Field Summary
protected  IInstanceBuilder instanceBuilder
          An object to build instances
 
Constructor Summary
CollectionQueryResultAction(IQuery query, boolean inMemory, IStorageEngine storageEngine, boolean returnObjects, IInstanceBuilder instanceBuilder)
           
 
Method Summary
 void end()
          Called at the end of the query execution - used to clean or finish some task
 java.lang.Object getCurrentInstance(NonNativeObjectInfo nnoi)
           
 Objects<java.lang.Object> getObjects()
          Returns the resulting objects
 void objectMatch(OID oid, java.lang.Object object, OdbComparable orderByKey)
          Called (by the GenericQueryExecutor) when an object matches the query
 void objectMatch(OID oid, OdbComparable orderByKey)
          Called (by the GenericQueryExecutor) when an object matches with lazy loading, only stores the OID
 void start()
          Called at the beginning of the query execution - used to prepare result object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instanceBuilder

protected IInstanceBuilder instanceBuilder
An object to build instances

Constructor Detail

CollectionQueryResultAction

public CollectionQueryResultAction(IQuery query,
                                   boolean inMemory,
                                   IStorageEngine storageEngine,
                                   boolean returnObjects,
                                   IInstanceBuilder instanceBuilder)
Method Detail

objectMatch

public void objectMatch(OID oid,
                        OdbComparable orderByKey)
Description copied from interface: IMatchingObjectAction
Called (by the GenericQueryExecutor) when an object matches with lazy loading, only stores the OID

Specified by:
objectMatch in interface IMatchingObjectAction

objectMatch

public void objectMatch(OID oid,
                        java.lang.Object object,
                        OdbComparable orderByKey)
Description copied from interface: IMatchingObjectAction
Called (by the GenericQueryExecutor) when an object matches the query

Specified by:
objectMatch in interface IMatchingObjectAction

start

public void start()
Description copied from interface: IMatchingObjectAction
Called at the beginning of the query execution - used to prepare result object

Specified by:
start in interface IMatchingObjectAction

end

public void end()
Description copied from interface: IMatchingObjectAction
Called at the end of the query execution - used to clean or finish some task

Specified by:
end in interface IMatchingObjectAction

getCurrentInstance

public java.lang.Object getCurrentInstance(NonNativeObjectInfo nnoi)

getObjects

public Objects<java.lang.Object> getObjects()
Description copied from interface: IMatchingObjectAction
Returns the resulting objects

Specified by:
getObjects in interface IMatchingObjectAction