com.mobixess.jodb.core.query
Class QueryNode

java.lang.Object
  extended by com.mobixess.jodb.core.query.QueryNode
All Implemented Interfaces:
Query

public class QueryNode
extends java.lang.Object
implements Query


Constructor Summary
QueryNode(java.lang.Object pattern, java.util.Collection defaultIgnoreValues, JODBSession session, QueryNode masterNode)
           
QueryNode(java.lang.String name, JODBSession session, QueryNode masterNode)
           
 
Method Summary
 Constraint constrain(java.lang.Object constraint)
          adds a constraint to this node.
 Constraints constraints()
          returns a Constraints object that holds an array of all constraints on this node.
 Query descend(java.lang.String fieldName)
          returns a reference to a descendant node in the query graph.
 ObjectSet execute()
          executes the Query.
 com.mobixess.jodb.core.query.QueryNode.CONSTRAINT_EVALUATION_STATUS getCumulativeStatus()
           
 int getNextMasterNodeSortCounter()
           
 void initSortDataCache(SortDataCache sortDataCache, java.lang.StringBuffer path)
           
 void markAsUnreachable()
           
 Query orderAscending()
          adds an ascending ordering criteria to this node of the query graph.
 Query orderDescending()
          adds a descending order criteria to this node of the query graph.
 void refillSortData(long objectID, SortDataCache sortDataCache, JODBOperationContext context)
           
 void resetStateOfConstraints()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryNode

public QueryNode(java.lang.String name,
                 JODBSession session,
                 QueryNode masterNode)

QueryNode

public QueryNode(java.lang.Object pattern,
                 java.util.Collection defaultIgnoreValues,
                 JODBSession session,
                 QueryNode masterNode)
Method Detail

constrain

public Constraint constrain(java.lang.Object constraint)
Description copied from interface: Query
adds a constraint to this node.

If the constraint contains attributes that are not yet present in the query graph, the query graph is extended accordingly.

Special behaviour for:

Specified by:
constrain in interface Query
Parameters:
constraint - the constraint to be added to this Query.
Returns:
Constraint a new Constraint for this query node or null for objects implementing the Evaluation interface.

constraints

public Constraints constraints()
Description copied from interface: Query
returns a Constraints object that holds an array of all constraints on this node.

Specified by:
constraints in interface Query
Returns:
Constraints on this query node.

descend

public Query descend(java.lang.String fieldName)
Description copied from interface: Query
returns a reference to a descendant node in the query graph.

If the node does not exist, it will be created.

All classes represented in the query node are tested, whether they contain a field with the specified field name. The descendant Query node will be created from all possible candidate classes.

Specified by:
descend in interface Query
Returns:
descendant Query node

getNextMasterNodeSortCounter

public int getNextMasterNodeSortCounter()

execute

public ObjectSet execute()
                  throws java.io.IOException,
                         IllegalClassTypeException
Description copied from interface: Query
executes the Query.

Specified by:
execute in interface Query
Returns:
ObjectSet - the result of the Query.
Throws:
java.io.IOException
IllegalClassTypeException

getCumulativeStatus

public com.mobixess.jodb.core.query.QueryNode.CONSTRAINT_EVALUATION_STATUS getCumulativeStatus()

markAsUnreachable

public void markAsUnreachable()

orderAscending

public Query orderAscending()
Description copied from interface: Query
adds an ascending ordering criteria to this node of the query graph. Multiple ordering criteria will be applied in the order they were called.

Specified by:
orderAscending in interface Query
Returns:
this Query object to allow the chaining of method calls.

orderDescending

public Query orderDescending()
Description copied from interface: Query
adds a descending order criteria to this node of the query graph. Multiple ordering criteria will be applied in the order they were called.

Specified by:
orderDescending in interface Query
Returns:
this Query object to allow the chaining of method calls.

resetStateOfConstraints

public void resetStateOfConstraints()

refillSortData

public void refillSortData(long objectID,
                           SortDataCache sortDataCache,
                           JODBOperationContext context)
                    throws java.io.IOException
Throws:
java.io.IOException

initSortDataCache

public void initSortDataCache(SortDataCache sortDataCache,
                              java.lang.StringBuffer path)


Copyright © Mobixess Inc. All Rights Reserved.