public static class Sort.Order
extends java.lang.Object
implements java.io.Serializable
Sort.Direction and a property. It is used to provide input for
Sort| 构造器和说明 |
|---|
Order(Sort.Direction direction,
java.lang.String property)
Creates a new
Sort.Order instance. if order is null then order defaults to
Sort.DEFAULT_DIRECTION |
Order(Sort.Direction direction,
java.lang.String property,
Sort.NullHandling nullHandlingHint)
Creates a new
Sort.Order instance. if order is null then order defaults to
Sort.DEFAULT_DIRECTION |
Order(java.lang.String property)
Creates a new
Sort.Order instance. |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
equals(java.lang.Object obj) |
Sort.Direction |
getDirection()
Returns the order the property shall be sorted for.
|
Sort.NullHandling |
getNullHandling()
Returns the used
Sort.NullHandling hint, which can but may not be respected by the used datastore. |
java.lang.String |
getProperty()
Returns the property to order for.
|
int |
hashCode() |
Sort.Order |
ignoreCase()
Returns a new
Sort.Order with case insensitive sorting enabled. |
boolean |
isAscending()
Returns whether sorting for this property shall be ascending.
|
boolean |
isDescending()
Returns whether sorting for this property shall be descending.
|
boolean |
isIgnoreCase()
Returns whether or not the sort will be case sensitive.
|
Sort.Order |
nullsFirst()
Returns a
Sort.Order with Sort.NullHandling.NULLS_FIRST as null handling hint. |
Sort.Order |
nullsLast()
Returns a
Sort.Order with Sort.NullHandling.NULLS_LAST as null handling hint. |
Sort.Order |
nullsNative()
Returns a
Sort.Order with Sort.NullHandling.NATIVE as null handling hint. |
java.lang.String |
toString() |
Sort.Order |
with(Sort.Direction direction)
Returns a new
Sort.Order with the given Sort.Direction. |
Sort.Order |
with(Sort.NullHandling nullHandling)
Returns a
Sort.Order with the given Sort.NullHandling. |
Sort |
withProperties(java.lang.String... properties)
Returns a new
Sort instance for the given properties. |
Sort.Order |
withProperty(java.lang.String property)
Returns a new
Sort.Order |
public Order(Sort.Direction direction, java.lang.String property)
Sort.Order instance. if order is null then order defaults to
Sort.DEFAULT_DIRECTIONdirection - can be null, will default to Sort.DEFAULT_DIRECTIONproperty - must not be null or empty.public Order(Sort.Direction direction, java.lang.String property, Sort.NullHandling nullHandlingHint)
Sort.Order instance. if order is null then order defaults to
Sort.DEFAULT_DIRECTIONdirection - can be null, will default to Sort.DEFAULT_DIRECTIONproperty - must not be null or empty.nullHandling - can be null, will default to Sort.NullHandling.NATIVE.public Order(java.lang.String property)
Sort.Order instance. Takes a single property. Direction defaults to
Sort.DEFAULT_DIRECTION.property - must not be null or empty.public Sort.Direction getDirection()
public java.lang.String getProperty()
public boolean isAscending()
public boolean isDescending()
public boolean isIgnoreCase()
public Sort.Order with(Sort.Direction direction)
Sort.Order with the given Sort.Direction.direction - public Sort.Order withProperty(java.lang.String property)
Sort.Orderproperty - must not be null or empty.public Sort withProperties(java.lang.String... properties)
Sort instance for the given properties.properties - public Sort.Order ignoreCase()
Sort.Order with case insensitive sorting enabled.public Sort.Order with(Sort.NullHandling nullHandling)
Sort.Order with the given Sort.NullHandling.nullHandling - can be null.public Sort.Order nullsFirst()
Sort.Order with Sort.NullHandling.NULLS_FIRST as null handling hint.public Sort.Order nullsLast()
Sort.Order with Sort.NullHandling.NULLS_LAST as null handling hint.public Sort.Order nullsNative()
Sort.Order with Sort.NullHandling.NATIVE as null handling hint.public Sort.NullHandling getNullHandling()
Sort.NullHandling hint, which can but may not be respected by the used datastore.public int hashCode()
hashCode 在类中 java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals 在类中 java.lang.Objectpublic java.lang.String toString()
toString 在类中 java.lang.ObjectCopyright © 2020. All Rights Reserved.