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.OrderDEFAULT_DIRECTION| Constructor and Description |
|---|
JpaSort(javax.persistence.metamodel.Attribute<?,?>... attributes)
Creates a new
JpaSort for the given attributes with the default sort direction. |
JpaSort(JpaSort.Path<?,?>... paths)
Creates a new
JpaSort instance with the given JpaSort.Paths. |
JpaSort(Sort.Direction direction,
javax.persistence.metamodel.Attribute<?,?>... attributes)
Creates a new
JpaSort for the given direction and attributes. |
JpaSort(Sort.Direction direction,
JpaSort.Path<?,?>... paths)
Creates a new
JpaSort for the given direction and JpaSort.Paths. |
| 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 <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, toString, unsortedclone, finalize, getClass, notify, notifyAll, wait, wait, waitempty, filter, flatMap, map, of, of, of, streamforEach, spliteratorpublic JpaSort(javax.persistence.metamodel.Attribute<?,?>... attributes)
JpaSort for the given attributes with the default sort direction.attributes - must not be null or empty.public JpaSort(JpaSort.Path<?,?>... paths)
JpaSort instance with the given JpaSort.Paths.paths - must not be null or empty.public JpaSort(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 JpaSort(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–2018 Pivotal Software, Inc.. All rights reserved.