|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sap.ip.me.api.persist.query.QueryRuntime
QueryRuntime creates Query instances and components of Query instances which the application programmer can then use to obtain entities from persistence by query. A Query instance consists of a Condition and (optionally) of a SortOrder instance. The application programmer will use QueryRuntime to first create a Condition instance, then optionally create a SortOrder instance and finally with these two (or only * with condition) create a Query instance. Condition instances as well as SortOrder instances can be nested.
Method Summary | |
Condition |
createCondition(AttributeDescriptor attribute,
RelationalOperatorType relationalOperator,
java.lang.Object value)
Creates a Condition which is used to create a Query. |
Condition |
createCondition(Condition[] conditions,
LogicalOperatorType logicalOperator)
Creates a Condition which is used to create a Query. |
Query |
createQuery(java.lang.String classtype,
Condition condition)
Creates a Query out of a classtype (represented as a String) and a Condition |
Query |
createQuery(java.lang.String classtype,
Condition condition,
int maxCount)
Creates a Query out of a classtype (represented as a String), a Condition and a size-limitation of the result set. |
Query |
createQuery(java.lang.String classtype,
Condition condition,
SortOrder sortOrder)
Creates a Query out of a classtype (represented as a String), a Condition and a SortOrder |
Query |
createQuery(java.lang.String classtype,
Condition condition,
SortOrder sortOrder,
int maxCount)
Creates a Query out of a classtype (represented as a String), a Condition and a size-limitation of the result set. |
Query |
createQuery(java.lang.String classtype,
Condition condition,
SortOrder sortOrder,
int startIdx,
int maxCount)
Creates a Query out of a classtype (represented as a String), a Condition and a size-limitation of the result set. |
Query |
createQuery(java.lang.String classtype,
SortOrder sortOrder,
int startIdx,
int maxCount)
Creates a Query out of a classtype (represented as a String), a Condition and a size-limitation of the result set. |
SortOrder |
createSortOrder(AttributeDescriptor attrib,
boolean isAscending)
Creates a SortOrder instance. |
SortOrder |
createSortOrder(SortOrder[] sortOrders)
Creates a SortOrder instance out of multiple SingleSortOrder and / or MultipleSortOrder instances. |
static QueryRuntime |
getInstance()
Returns the QueryRuntime singleton |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static QueryRuntime getInstance()
public Condition createCondition(AttributeDescriptor attribute, RelationalOperatorType relationalOperator, java.lang.Object value)
createCondition
in interface InternalQueryRuntime
relationalOperator
- operator for comparison to a valuevalue
- the value to compareattribute
- the attribute to compare
public Condition createCondition(Condition[] conditions, LogicalOperatorType logicalOperator)
createCondition
in interface InternalQueryRuntime
conditions
- a Condition arraylogicalOperator
- to combine the delivered conditions
public SortOrder createSortOrder(AttributeDescriptor attrib, boolean isAscending)
Make sure you haven marked the AttributeDescriptor as index for best performance!
createSortOrder
in interface InternalQueryRuntime
isAscending
- set true for ascending sort order (default)attrib
- the attribute to sort by (should be indexed!)
public SortOrder createSortOrder(SortOrder[] sortOrders)
createSortOrder
in interface InternalQueryRuntime
sortOrders
- a multiple SortOrder
public Query createQuery(java.lang.String classtype, Condition condition) throws PersistenceException
createQuery
in interface InternalQueryRuntime
condition
- Condition instanceclasstype
- Classtype to which this Query belongs
PersistenceException
- on errorspublic Query createQuery(java.lang.String classtype, Condition condition, SortOrder sortOrder) throws PersistenceException
createQuery
in interface InternalQueryRuntime
condition
- Condition instancesortOrder
- SortOrder instanceclasstype
- Classtype to which this Query belongs
PersistenceException
- on errorspublic Query createQuery(java.lang.String classtype, Condition condition, int maxCount) throws PersistenceException
createQuery
in interface InternalQueryRuntime
condition
- Condition instancemaxCount
- maximum number of returned resultsclasstype
- Classtype to which this Query belongs
PersistenceException
- on errorspublic Query createQuery(java.lang.String classtype, SortOrder sortOrder, int startIdx, int maxCount) throws PersistenceException
createQuery
in interface InternalQueryRuntime
sortOrder
- SortOrder instancestartIdx
- Offset of the returned resultsmaxCount
- maximum number of returned resultsclasstype
- Classtype to which this Query belongs
PersistenceException
- on errorspublic Query createQuery(java.lang.String classtype, Condition condition, SortOrder sortOrder, int maxCount) throws PersistenceException
createQuery
in interface InternalQueryRuntime
condition
- Condition instancesortOrder
- SortOrder instancemaxCount
- maximum number of returned resultsclasstype
- Classtype to which this Query belongs
PersistenceException
- on errorspublic Query createQuery(java.lang.String classtype, Condition condition, SortOrder sortOrder, int startIdx, int maxCount) throws PersistenceException
createQuery
in interface InternalQueryRuntime
condition
- Condition instancesortOrder
- SortOrder instancestartIdx
- Offset of the returned resultsmaxCount
- maximum number of returned resultsclasstype
- Classtype to which this Query belongs
PersistenceException
- on errors
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |