org.neodatis.odb.core.query
Class AbstractQuery
- java.lang.Object
-
- org.neodatis.odb.core.query.AbstractQuery
-
- All Implemented Interfaces:
- java.io.Serializable, IQuery
- Direct Known Subclasses:
- CriteriaQuery, NativeQuery, SimpleNativeQuery
public abstract class AbstractQuery extends java.lang.Object implements IQuery
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description AbstractQuery()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description IQueryExecutionPlangetExecutionPlan()OIDgetOidOfObjectToQuery()used with isForSingleOid == true, to indicate we are working on a single object with a specific oidjava.lang.String[]getOrderByFieldNames()Returns the field names of the order byOrderByConstantsgetOrderByType()IStorageEnginegetStorageEngine()booleanhasOrderBy()Returns true if the query has an order by clausebooleanisForSingleOid()Returns true is query must apply on a single object OIDbooleanisPolymorphic()booleanoptimizeObjectComparison()IQueryorderByAsc(java.lang.String fields)To order by the result of a query in ascendent orderIQueryorderByDesc(java.lang.String fields)To order by the result of a query in descendent ordervoidsetExecutionPlan(IQueryExecutionPlan plan)voidsetOidOfObjectToQuery(OID oidOfObjectToQuery)IQuerysetOptimizeObjectComparison(boolean yesNo)voidsetOrderByFields(java.lang.String[] orderByFields)voidsetOrderByType(OrderByConstants orderByType)IQuerysetPolymorphic(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.voidsetStorageEngine(IStorageEngine storageEngine)
-
-
-
Method Detail
-
orderByDesc
public IQuery orderByDesc(java.lang.String fields)
Description copied from interface:IQueryTo order by the result of a query in descendent order- Specified by:
orderByDescin interfaceIQuery- Parameters:
fields- A comma separated field list- Returns:
- this
-
orderByAsc
public IQuery orderByAsc(java.lang.String fields)
Description copied from interface:IQueryTo order by the result of a query in ascendent order- Specified by:
orderByAscin interfaceIQuery- Parameters:
fields- A comma separated field list- Returns:
- this
-
getOrderByFieldNames
public java.lang.String[] getOrderByFieldNames()
Description copied from interface:IQueryReturns the field names of the order by- Specified by:
getOrderByFieldNamesin interfaceIQuery- Returns:
- The array of fields of the order by
-
setOrderByFields
public void setOrderByFields(java.lang.String[] orderByFields)
-
getOrderByType
public OrderByConstants getOrderByType()
- Specified by:
getOrderByTypein interfaceIQuery- Returns:
- the type of the order by - ORDER_BY_NONE,ORDER_BY_DESC,ORDER_BY_ASC
-
setOrderByType
public void setOrderByType(OrderByConstants orderByType)
-
hasOrderBy
public boolean hasOrderBy()
Description copied from interface:IQueryReturns true if the query has an order by clause- Specified by:
hasOrderByin interfaceIQuery- Returns:
- true if has an order by flag
-
getStorageEngine
public IStorageEngine getStorageEngine()
- Specified by:
getStorageEnginein interfaceIQuery
-
setStorageEngine
public void setStorageEngine(IStorageEngine storageEngine)
- Specified by:
setStorageEnginein interfaceIQuery
-
getExecutionPlan
public IQueryExecutionPlan getExecutionPlan()
- Specified by:
getExecutionPlanin interfaceIQuery
-
setExecutionPlan
public void setExecutionPlan(IQueryExecutionPlan plan)
- Specified by:
setExecutionPlanin interfaceIQuery
-
isPolymorphic
public boolean isPolymorphic()
- Specified by:
isPolymorphicin interfaceIQuery
-
setPolymorphic
public IQuery setPolymorphic(boolean yes)
Description copied from interface:IQueryTo 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.- Specified by:
setPolymorphicin interfaceIQuery
-
getOidOfObjectToQuery
public OID getOidOfObjectToQuery()
Description copied from interface:IQueryused with isForSingleOid == true, to indicate we are working on a single object with a specific oid- Specified by:
getOidOfObjectToQueryin interfaceIQuery- Returns:
-
setOidOfObjectToQuery
public void setOidOfObjectToQuery(OID oidOfObjectToQuery)
-
isForSingleOid
public boolean isForSingleOid()
Returns true is query must apply on a single object OID- Specified by:
isForSingleOidin interfaceIQuery- Returns:
-
optimizeObjectComparison
public boolean optimizeObjectComparison()
- Specified by:
optimizeObjectComparisonin interfaceIQuery- Returns:
-
setOptimizeObjectComparison
public IQuery setOptimizeObjectComparison(boolean yesNo)
- Specified by:
setOptimizeObjectComparisonin interfaceIQuery
-
-
DataMelt 3.0 © DataMelt by jWork.ORG