org.neodatis.odb.impl.core.query.nq
Class NativeQueryExecutor

java.lang.Object
  extended by org.neodatis.odb.core.query.execution.GenericQueryExecutor
      extended by org.neodatis.odb.impl.core.query.nq.NativeQueryExecutor
All Implemented Interfaces:
IMultiClassQueryExecutor, IQueryExecutor

public class NativeQueryExecutor
extends GenericQueryExecutor


Field Summary
 
Fields inherited from class org.neodatis.odb.core.query.execution.GenericQueryExecutor
callback, classInfo, currentNnoi, currentOid, executeStartAndEndOfQueryAction, LOG_ID, nextOID, objectReader, query, session, storageEngine
 
Constructor Summary
NativeQueryExecutor(IQuery query, IStorageEngine engine, IInstanceBuilder instanceBuilder)
           
 
Method Summary
 java.lang.Comparable buildOrderByKey()
           
 java.lang.Comparable computeIndexKey(ClassInfo ci, ClassInfoIndex index)
           
 java.lang.Object getCurrentInstance()
           
 java.lang.Object getCurrentObjectMetaRepresentation()
          This can be a NonNAtiveObjectInf or AttributeValuesMap
 IQueryExecutionPlan getExecutionPlan()
           
 java.lang.String getFullClassName(IQuery query)
           
 boolean matchObjectWithOid(OID oid, boolean loadObjectInfo, boolean inMemory)
          Check if the object at position currentPosition matches the query, returns true This method must compute the next object position and the orderBy key if it exists!
 void prepareQuery()
           
 
Methods inherited from class org.neodatis.odb.core.query.execution.GenericQueryExecutor
buildOrderByKey, buildOrderByKey, buildOrderByKey, execute, executeStartAndEndOfQueryAction, getQuery, getStorageEngine, setClassInfo, setExecuteStartAndEndOfQueryAction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NativeQueryExecutor

public NativeQueryExecutor(IQuery query,
                           IStorageEngine engine,
                           IInstanceBuilder instanceBuilder)
Method Detail

getExecutionPlan

public IQueryExecutionPlan getExecutionPlan()
Specified by:
getExecutionPlan in class GenericQueryExecutor

prepareQuery

public void prepareQuery()
Specified by:
prepareQuery in class GenericQueryExecutor

matchObjectWithOid

public boolean matchObjectWithOid(OID oid,
                                  boolean loadObjectInfo,
                                  boolean inMemory)
Check if the object at position currentPosition matches the query, returns true This method must compute the next object position and the orderBy key if it exists!

Specified by:
matchObjectWithOid in class GenericQueryExecutor
Parameters:
oid - The object position
loadObjectInfo - To indicate if object must loaded (when the query indicator 'in memory' is false, we do not need to load object, only ids)
inMemory - To indicate if object must be actually loaded to memory

computeIndexKey

public java.lang.Comparable computeIndexKey(ClassInfo ci,
                                            ClassInfoIndex index)
Specified by:
computeIndexKey in class GenericQueryExecutor

buildOrderByKey

public java.lang.Comparable buildOrderByKey()

getCurrentInstance

public java.lang.Object getCurrentInstance()
                                    throws java.lang.Exception
Throws:
java.lang.Exception

getCurrentObjectMetaRepresentation

public java.lang.Object getCurrentObjectMetaRepresentation()
Description copied from class: GenericQueryExecutor
This can be a NonNAtiveObjectInf or AttributeValuesMap

Specified by:
getCurrentObjectMetaRepresentation in class GenericQueryExecutor
Returns:

getFullClassName

public java.lang.String getFullClassName(IQuery query)
Specified by:
getFullClassName in interface IQueryExecutor
Specified by:
getFullClassName in class GenericQueryExecutor