Class OrderBy<T>
java.lang.Object
io.ebean.OrderBy<T>
- All Implemented Interfaces:
Serializable
Represents an Order By for a Query.
Is an ordered list of OrderBy.Property objects each specifying a property and whether it is ascending or descending order.
Typically, you will not construct an OrderBy yourself but use one that exists on the Query object.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceAppend the order by clause.static classA property and its ascending descending order. -
Constructor Summary
ConstructorsConstructorDescriptionOrderBy()Deprecated, for removal: This API element is subject to removal in a future version.This method will be removed from public API.Deprecated, for removal: This API element is subject to removal in a future version.This method will be removed from public API.Deprecated, for removal: This API element is subject to removal in a future version.migrate toof(String). -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a property to the order by.voidAdd to the order by by parsing a raw expression.Add a property with ascending order to this OrderBy.Add a property with ascending order to this OrderBy.clear()Clear the orderBy removing any current order by properties.booleancontainsProperty(String propertyName) Return true if the property is known to be contained in the order by clause.copy()Return a copy of the OrderBy.copyWithTrim(String path) Deprecated, for removal: This API element is subject to removal in a future version.This method will become internal only API.Add a property with descending order to this OrderBy.Add a property with descending order to this OrderBy.booleanReturn the properties for this OrderBy.getQuery()Return the associated query if there is one.inthashCode()Return a hash value for this OrderBy.booleanisEmpty()Return true if this OrderBy does not have any properties.static <P> OrderBy<P> Create an OrderBy parsing the given order by clause.voidreverse()Reverse the ascending/descending order on all the properties.voidAssociate this OrderBy with a query.toString()Returns the OrderBy in string format.
-
Constructor Details
-
OrderBy
Deprecated, for removal: This API element is subject to removal in a future version.This method will be removed from public API.Create an empty OrderBy with no associated query.
-
OrderBy
Deprecated, for removal: This API element is subject to removal in a future version.migrate toof(String). -
OrderBy
Deprecated, for removal: This API element is subject to removal in a future version.This method will be removed from public API.
-
-
Method Details
-
of
-
reverse
public void reverse()Reverse the ascending/descending order on all the properties. -
asc
-
asc
-
desc
-
desc
-
containsProperty
Return true if the property is known to be contained in the order by clause. -
copyWithTrim
Deprecated, for removal: This API element is subject to removal in a future version.This method will become internal only API.Return a copy of this OrderBy with the path trimmed.
-
getProperties
Return the properties for this OrderBy. -
isEmpty
public boolean isEmpty()Return true if this OrderBy does not have any properties. -
getQuery
-
setQuery
-
copy
-
add
Add to the order by by parsing a raw expression. -
add
Add a property to the order by. -
toString
-
toStringFormat
Returns the OrderBy in string format. -
equals
-
hashCode
-
clear
-