public class JpaSort extends Sort
Attributes for sorting.| Modifier and Type | Class and Description |
|---|---|
static class |
JpaSort.JpaOrder
Custom
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. |
static class |
JpaSort.Path<T,S>
Value object to abstract a collection of
Attributes. |
Sort.Direction, Sort.NullHandling, Sort.Order, Sort.TypedSort<T>DEFAULT_DIRECTION| Constructor and Description |
|---|
JpaSort(javax.persistence.metamodel.Attribute<?,?>... attributes)
Deprecated.
since 2.3, use
of(Attribute...) instead. |
JpaSort(JpaSort.Path<?,?>... paths)
Deprecated.
since 2.3, use
JpaSort#of(Path...)) instead. |
JpaSort(Sort.Direction direction,
javax.persistence.metamodel.Attribute<?,?>... attributes)
Deprecated.
since 2.3, use
JpaSort#of(Direction, Attribute...) instead. |
JpaSort(Sort.Direction direction,
JpaSort.Path<?,?>... paths)
Deprecated.
since 2.3, use
JpaSort#of(Direction, Path...) instead. |
| Modifier and Type | Method and Description |
|---|---|
JpaSort |
and(Sort.Direction direction,
javax.persistence.metamodel.Attribute<?,?>... attributes)
Returns a new
JpaSort with the given sorting criteria added to the current one. |
JpaSort |
and(Sort.Direction direction,
JpaSort.Path<?,?>... paths)
Returns a new
JpaSort with the given sorting criteria added to the current one. |
JpaSort |
andUnsafe(Sort.Direction direction,
String... properties)
Returns a new
JpaSort with the given sorting criteria added to the current one. |
static JpaSort |
of(javax.persistence.metamodel.Attribute<?,?>... attributes)
Creates a new
JpaSort for the given attributes with the default sort direction. |
static JpaSort |
of(JpaSort.Path<?,?>... paths)
Creates a new
JpaSort instance with the given JpaSort.Paths. |
static JpaSort |
of(Sort.Direction direction,
javax.persistence.metamodel.Attribute<?,?>... attributes)
Creates a new
JpaSort for the given direction and attributes. |
static JpaSort |
of(Sort.Direction direction,
JpaSort.Path<?,?>... paths)
Creates a new
JpaSort for the given direction and JpaSort.Paths. |
static <A extends javax.persistence.metamodel.Attribute<T,S>,T,S> |
path(A attribute)
Creates a new
JpaSort.Path for the given Attribute. |
static <P extends javax.persistence.metamodel.PluralAttribute<T,?,S>,T,S> |
path(P attribute)
Creates a new
JpaSort.Path for the given PluralAttribute. |
static JpaSort |
unsafe(Sort.Direction direction,
List<String> properties)
Creates new unsafe
JpaSort based on given Direction and properties. |
static JpaSort |
unsafe(Sort.Direction direction,
String... properties)
Creates new unsafe
JpaSort based on given Direction and properties. |
static JpaSort |
unsafe(String... properties)
Creates new unsafe
JpaSort based on given properties. |
and, ascending, by, by, by, by, descending, equals, getOrderFor, hashCode, isSorted, isUnsorted, iterator, sort, toString, unsortedclone, finalize, getClass, notify, notifyAll, wait, wait, waitand, and, and, and, empty, filter, flatMap, get, isEmpty, map, of, of, of, stream, toList, toSet, toStreamable, toStreamableforEach, spliterator@Deprecated public JpaSort(javax.persistence.metamodel.Attribute<?,?>... attributes)
of(Attribute...) instead.JpaSort for the given attributes with the default sort direction.attributes - must not be null or empty.@Deprecated public JpaSort(JpaSort.Path<?,?>... paths)
JpaSort#of(Path...)) instead.JpaSort instance with the given JpaSort.Paths.paths - must not be null or empty.@Deprecated public JpaSort(Sort.Direction direction, javax.persistence.metamodel.Attribute<?,?>... attributes)
JpaSort#of(Direction, Attribute...) instead.JpaSort for the given direction and attributes.direction - the sorting direction.attributes - must not be null or empty.@Deprecated public JpaSort(Sort.Direction direction, JpaSort.Path<?,?>... paths)
JpaSort#of(Direction, Path...) instead.JpaSort for the given direction and JpaSort.Paths.direction - the sorting direction.paths - must not be null or empty.public static JpaSort of(javax.persistence.metamodel.Attribute<?,?>... attributes)
JpaSort for the given attributes with the default sort direction.attributes - must not be null or empty.public static JpaSort of(JpaSort.Path<?,?>... paths)
JpaSort instance with the given JpaSort.Paths.paths - must not be null or empty.public static JpaSort of(Sort.Direction direction, javax.persistence.metamodel.Attribute<?,?>... attributes)
JpaSort for the given direction and attributes.direction - the sorting direction.attributes - must not be null or empty.public static JpaSort of(Sort.Direction direction, JpaSort.Path<?,?>... paths)
JpaSort for the given direction and JpaSort.Paths.direction - the sorting direction.paths - must not be null or empty.public JpaSort and(@Nullable Sort.Direction direction, javax.persistence.metamodel.Attribute<?,?>... attributes)
JpaSort with the given sorting criteria added to the current one.direction - can be null.attributes - must not be null.public JpaSort and(@Nullable Sort.Direction direction, JpaSort.Path<?,?>... paths)
JpaSort with the given sorting criteria added to the current one.direction - can be null.paths - must not be null.public JpaSort andUnsafe(@Nullable Sort.Direction direction, String... properties)
JpaSort with the given sorting criteria added to the current one.direction - can be null.properties - must not be null or empty.public static <A extends javax.persistence.metamodel.Attribute<T,S>,T,S> JpaSort.Path<T,S> path(A attribute)
JpaSort.Path for the given Attribute.attribute - must not be null.public static <P extends javax.persistence.metamodel.PluralAttribute<T,?,S>,T,S> JpaSort.Path<T,S> path(P attribute)
JpaSort.Path for the given PluralAttribute.attribute - must not be null.public static JpaSort unsafe(String... properties)
JpaSort based on given properties.properties - must not be null or empty.public static JpaSort unsafe(Sort.Direction direction, String... properties)
JpaSort based on given Direction and properties.direction - must not be null.properties - must not be null or empty.public static JpaSort unsafe(Sort.Direction direction, List<String> properties)
JpaSort based on given Direction and properties.direction - must not be null.properties - must not be null or empty.Copyright © 2011–2020 Pivotal Software, Inc.. All rights reserved.