Class SqlSort.SqlOrder
java.lang.Object
org.springframework.data.domain.Sort.Order
org.springframework.data.relational.domain.SqlSort.SqlOrder
- All Implemented Interfaces:
Serializable
- Enclosing class:
SqlSort
Custom
Sort.Order that keeps a flag to indicate unsafe property handling, i.e. the String provided is not
necessarily a property but can be an arbitrary expression piped into the query execution. We also keep an
additional ignoreCase flag around as the constructor of the superclass is private currently.- Since:
- 3.1
- Author:
- Christoph Strobl, Oliver Gierke
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic SqlSort.SqlOrderCreates a newSqlSort.SqlOrderinstance.static SqlSort.SqlOrderCreates a newSqlSort.SqlOrderinstance.static SqlSort.SqlOrderCreates a newSqlSort.SqlOrderinstance.booleanisUnsafe()with(Sort.Direction order) with(Sort.NullHandling nullHandling) Methods inherited from class Sort.Order
equals, getDirection, getNullHandling, getProperty, hashCode, isAscending, isDescending, isIgnoreCase, nullsFirst, nullsLast, nullsNative, reverse, toString, withProperties, withProperty
-
Method Details
-
by
Creates a newSqlSort.SqlOrderinstance. Takes a single property. Direction defaults toSort.DEFAULT_DIRECTION.- Parameters:
property- must not be null or empty.
-
asc
Creates a newSqlSort.SqlOrderinstance. Takes a single property. Direction isSort.Direction.ASCand NullHandlingSort.NullHandling.NATIVE.- Parameters:
property- must not be null or empty.
-
desc
Creates a newSqlSort.SqlOrderinstance. Takes a single property. Direction isSort.Direction.DESCand NullHandlingSort.NullHandling.NATIVE.- Parameters:
property- must not be null or empty.
-
with
- Overrides:
within classSort.Order
-
with
- Overrides:
within classSort.Order
-
withUnsafe
-
ignoreCase
- Overrides:
ignoreCasein classSort.Order
-
isUnsafe
public boolean isUnsafe()- Returns:
- true if
SqlSort.SqlOrdershould not be validated automatically. The validation should be done by the developer using this.
-