org.neodatis.odb.core.query
Interface IQuery

All Superinterfaces:
java.io.Serializable
All Known Subinterfaces:
IValuesQuery
All Known Implementing Classes:
AbstractQuery, CriteriaQuery, NativeQuery, SimpleNativeQuery, ValuesCriteriaQuery

public interface IQuery
extends java.io.Serializable


Method Summary
 IQueryExecutionPlan getExecutionPlan()
           
 OID getOidOfObjectToQuery()
          used with isForSingleOid == true, to indicate we are working on a single object with a specific oid
 java.lang.String[] getOrderByFieldNames()
          Returns the field names of the order by
 OrderByConstants getOrderByType()
           
 IStorageEngine getStorageEngine()
           
 boolean hasOrderBy()
          Returns true if the query has an order by clause
 boolean isForSingleOid()
          To indicate if a query must be executed on a single object with the specific OID.
 boolean isPolymorphic()
           
 boolean optimizeObjectComparison()
           
 IQuery orderByAsc(java.lang.String fields)
          To order by the result of a query in ascendent order
 IQuery orderByDesc(java.lang.String fields)
          To order by the result of a query in descendent order
 void setExecutionPlan(IQueryExecutionPlan plan)
           
 IQuery setOptimizeObjectComparison(boolean b)
           
 IQuery setPolymorphic(boolean yes)
          To specify that instances of subclass of the query class must not be load if true, when querying objects of class Class1, only direct instances of Class1 will be loaded.
 void setStorageEngine(IStorageEngine storageEngine)
           
 

Method Detail

orderByDesc

IQuery orderByDesc(java.lang.String fields)
To order by the result of a query in descendent order

Parameters:
fields - A comma separated field list
Returns:
this

orderByAsc

IQuery orderByAsc(java.lang.String fields)
To order by the result of a query in ascendent order

Parameters:
fields - A comma separated field list
Returns:
this

hasOrderBy

boolean hasOrderBy()
Returns true if the query has an order by clause

Returns:
true if has an order by flag

getOrderByFieldNames

java.lang.String[] getOrderByFieldNames()
Returns the field names of the order by

Returns:
The array of fields of the order by

getOrderByType

OrderByConstants getOrderByType()
Returns:
the type of the order by - ORDER_BY_NONE,ORDER_BY_DESC,ORDER_BY_ASC

getStorageEngine

IStorageEngine getStorageEngine()

setStorageEngine

void setStorageEngine(IStorageEngine storageEngine)

getExecutionPlan

IQueryExecutionPlan getExecutionPlan()

setExecutionPlan

void setExecutionPlan(IQueryExecutionPlan plan)

setPolymorphic

IQuery setPolymorphic(boolean yes)
To specify that instances of subclass of the query class must not be load if true, when querying objects of class Class1, only direct instances of Class1 will be loaded. If false, when querying objects of class Class1, direct instances of Class1 will be loaded and all instances of subclasses of Class1.


isPolymorphic

boolean isPolymorphic()

isForSingleOid

boolean isForSingleOid()
To indicate if a query must be executed on a single object with the specific OID. Used for ValuesQeuries

Returns:

getOidOfObjectToQuery

OID getOidOfObjectToQuery()
used with isForSingleOid == true, to indicate we are working on a single object with a specific oid

Returns:

setOptimizeObjectComparison

IQuery setOptimizeObjectComparison(boolean b)
Parameters:
b -

optimizeObjectComparison

boolean optimizeObjectComparison()