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

java.lang.Object
  extended by org.neodatis.odb.impl.core.query.criteria.CriteriaQueryExecutionPlan
All Implemented Interfaces:
java.io.Serializable, IQueryExecutionPlan

public class CriteriaQueryExecutionPlan
extends java.lang.Object
implements IQueryExecutionPlan

A simple Criteria execution plan Check if the query can use index and tries to find the best index to be used

Author:
osmadja
See Also:
Serialized Form

Field Summary
protected  ClassInfo classInfo
           
protected  ClassInfoIndex classInfoIndex
           
protected  java.lang.String details
          To keep the execution detail
protected  long end
          to keep track of the end date time of the plan
protected  CriteriaQuery query
           
protected  long start
          to keep track of the start date time of the plan
protected  boolean useIndex
           
 
Constructor Summary
CriteriaQueryExecutionPlan()
           
CriteriaQueryExecutionPlan(ClassInfo classInfo, CriteriaQuery query)
           
 
Method Summary
 void end()
           
protected  int[] getAllInvolvedFieldIds(IOdbList<java.lang.String> fields)
          Transform a list of field names into a list of field ids
 java.lang.String getDetails()
           
 long getDuration()
           
 ClassInfoIndex getIndex()
           
protected  void init()
           
 void start()
           
 boolean useIndex()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

classInfo

protected transient ClassInfo classInfo

query

protected transient CriteriaQuery query

useIndex

protected boolean useIndex

classInfoIndex

protected transient ClassInfoIndex classInfoIndex

start

protected long start
to keep track of the start date time of the plan


end

protected long end
to keep track of the end date time of the plan


details

protected java.lang.String details
To keep the execution detail

Constructor Detail

CriteriaQueryExecutionPlan

public CriteriaQueryExecutionPlan()

CriteriaQueryExecutionPlan

public CriteriaQueryExecutionPlan(ClassInfo classInfo,
                                  CriteriaQuery query)
Method Detail

init

protected void init()

getAllInvolvedFieldIds

protected int[] getAllInvolvedFieldIds(IOdbList<java.lang.String> fields)
Transform a list of field names into a list of field ids

Parameters:
fields -
Returns:
The array of field ids

getIndex

public ClassInfoIndex getIndex()
Specified by:
getIndex in interface IQueryExecutionPlan

useIndex

public boolean useIndex()
Specified by:
useIndex in interface IQueryExecutionPlan

getDetails

public java.lang.String getDetails()
Specified by:
getDetails in interface IQueryExecutionPlan

end

public void end()
Specified by:
end in interface IQueryExecutionPlan

getDuration

public long getDuration()
Specified by:
getDuration in interface IQueryExecutionPlan

start

public void start()
Specified by:
start in interface IQueryExecutionPlan