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.- Author:
- Christoph Strobl, Oliver Gierke
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic SqlSort.SqlOrder
Creates a newSqlSort.SqlOrder
instance.static SqlSort.SqlOrder
Creates a newSqlSort.SqlOrder
instance.static SqlSort.SqlOrder
Creates a newSqlSort.SqlOrder
instance.boolean
isUnsafe()
with
(Sort.Direction order) with
(Sort.NullHandling nullHandling) Methods inherited from class org.springframework.data.domain.Sort.Order
equals, getDirection, getNullHandling, getProperty, hashCode, isAscending, isDescending, isIgnoreCase, nullsFirst, nullsLast, nullsNative, reverse, toString, withProperties, withProperty
-
Method Details
-
by
Creates a newSqlSort.SqlOrder
instance. Takes a single property. Direction defaults toSort.DEFAULT_DIRECTION
.- Parameters:
property
- must not be null or empty.
-
asc
Creates a newSqlSort.SqlOrder
instance. Takes a single property. Direction isSort.Direction.ASC
and NullHandlingSort.NullHandling.NATIVE
.- Parameters:
property
- must not be null or empty.
-
desc
Creates a newSqlSort.SqlOrder
instance. Takes a single property. Direction isSort.Direction.DESC
and NullHandlingSort.NullHandling.NATIVE
.- Parameters:
property
- must not be null or empty.
-
with
- Overrides:
with
in classSort.Order
-
with
- Overrides:
with
in classSort.Order
-
withUnsafe
-
ignoreCase
- Overrides:
ignoreCase
in classSort.Order
-
isUnsafe
public boolean isUnsafe()- Returns:
- true if
SqlSort.SqlOrder
should not be validated automatically. The validation should be done by the developer using this.
-