Class Order
java.lang.Object
de.digitalcollections.model.list.sorting.Order
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Order.OrderBuilder<C extends Order,
B extends Order.OrderBuilder<C, B>> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the order the property shall be sorted for.Returns the usedNullHandling
hint, which can but may not be respected by the used datastore.Returns the property to order for.Returns the optional sub property to order for.int
hashCode()
protected void
init()
boolean
Returns whether sorting for this property shall be ascending.boolean
Returns whether sorting for this property shall be descending.boolean
Returns whether or not the sort will be case sensitive.void
setDirection
(Direction direction) void
setIgnoreCase
(boolean ignoreCase) void
setNullHandling
(NullHandling nullHandling) void
setProperty
(String property) void
setSubProperty
(String property) toString()
-
Constructor Details
-
Order
public Order() -
Order
-
Order
Creates a newOrder
instance. if order is null then order defaults toSorting.DEFAULT_DIRECTION
- Parameters:
direction
- can be null, will default toSorting.DEFAULT_DIRECTION
property
- must not be null or empty.
-
Order
Creates a newOrder
instance. if order is null then order defaults toSorting.DEFAULT_DIRECTION
- Parameters:
direction
- can be null, will default toSorting.DEFAULT_DIRECTION
property
- must not be null or empty.nullHandlingHint
- can be null, will default toNullHandling.NATIVE
.
-
Order
Creates a newOrder
instance. Takes a single property. Direction defaults toSorting.DEFAULT_DIRECTION
.- Parameters:
property
- must not be null or empty.
-
-
Method Details
-
equals
-
getDirection
Returns the order the property shall be sorted for.- Returns:
- the order the property shall be sorted for
-
getNullHandling
Returns the usedNullHandling
hint, which can but may not be respected by the used datastore.- Returns:
- the used NullHandling hint, which can but may not be respected by the used datastore.
-
getProperty
Returns the property to order for.- Returns:
- the property to order for
-
getSubProperty
Returns the optional sub property to order for.A sub property is always related to the main property.
- Returns:
- the optional sub property to order for
-
hashCode
public int hashCode() -
init
protected void init() -
isAscending
public boolean isAscending()Returns whether sorting for this property shall be ascending.- Returns:
- whether sorting for this property shall be ascending
-
isDescending
public boolean isDescending()Returns whether sorting for this property shall be descending.- Returns:
- whether sorting for this property shall be descending
-
isIgnoreCase
public boolean isIgnoreCase()Returns whether or not the sort will be case sensitive.- Returns:
- whether or not the sort will be case sensitive
-
setDirection
-
setIgnoreCase
public void setIgnoreCase(boolean ignoreCase) -
setNullHandling
-
setProperty
-
setSubProperty
-
toString
-