Class AbstractOrderableQuery
java.lang.Object
ch.tocco.nice2.persist.core.spi.entity.query.ql.AbstractOrderableQuery
- All Implemented Interfaces:
- Query
- Direct Known Subclasses:
- AbstractHibernateQueryAdapter,- AbstractRelationQueryAdapter
Base implementation for 
Query which handles the ordering aspects.- 
Nested Class SummaryNested classes/interfaces inherited from interface ch.tocco.nice2.persist.core.api.query.QueryQuery.Mode
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionappendOrder(Ordering order) Append the givenOrderingpolicy to the existing ordering policy of this query.Get a reference to theOrderingpolicy of this query.booleanCheck whether this query has an ordering policy already.prependOrder(Ordering order) Prepend the givenOrderingpolicy to the existing ordering policy of this query.Replace theOrderingpolicy of this query with the given ordering policy.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ch.tocco.nice2.persist.core.api.query.Querycount, execute, execute, execute, execute, execute, execute, firstResult, firstResultOrNull, getKeys, getKeys, getManager, getOnlyResult, getOnlyResult, getOnlyResultOrNull, getOnlyResultOrNull, setParameter, toQueryDefinition, uniqueResult, uniqueResultOrNull
- 
Field Details- 
ordering
 
- 
- 
Constructor Details- 
AbstractOrderableQuerypublic AbstractOrderableQuery()
 
- 
- 
Method Details- 
getOrderingDescription copied from interface:QueryGet a reference to theOrderingpolicy of this query. If there currently is no ordering policy, one will be created.- Specified by:
- getOrderingin interface- Query
- Returns:
- The ordering policy of this query.
 
- 
hasOrderingpublic boolean hasOrdering()Description copied from interface:QueryCheck whether this query has an ordering policy already.- Specified by:
- hasOrderingin interface- Query
- Returns:
- true, if this query has an ordering policy with at least one rule,- falseif none or one without rules (which may mean that getOrdering() will make one up on the fly).
 
- 
withOrderDescription copied from interface:QueryReplace theOrderingpolicy of this query with the given ordering policy. If the given ordering policy is null or empty, it will be ignored and the existing ordering policy of the query will be preserved.
- 
prependOrderDescription copied from interface:QueryPrepend the givenOrderingpolicy to the existing ordering policy of this query.- Specified by:
- prependOrderin interface- Query
- Parameters:
- order- the ordering policy to prepend.
- Returns:
- this query.
 
- 
appendOrderDescription copied from interface:QueryAppend the givenOrderingpolicy to the existing ordering policy of this query.- Specified by:
- appendOrderin interface- Query
- Parameters:
- order- the ordering policy to append.
- Returns:
- this query.
 
 
-