- All Superinterfaces:
Prototype.Api
- All Known Implementing Classes:
Sort.BuilderBase.SortImpl
Dynamic ordering of the query result.
Sort
class represents the whole List
of query ordering rules. E.g. in JPQL query
SELECT t FROM Type t WHERE t.name = :name ORDER BY t.name DESC, t.id
this is the whole
content of the ORDER BY
clause.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
Fluent API builder forSort
.static class
Sort.BuilderBase<BUILDER extends Sort.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends Sort> Fluent API builder base forSort
. -
Method Summary
Modifier and TypeMethodDescriptionstatic Sort.Builder
builder()
Create a new fluent API builder to customize configuration.static Sort.Builder
Create a new fluent API builder from an existing instance.static Sort
create()
Create a new instance with default values.static Sort
Create new instance of query result ordering.static Sort
Create new instance of query result ordering.default boolean
isSorted()
Whether any order definitions are set.orderBy()
List
of query ordering rules.static Sort
unsorted()
Create new instance of query result ordering with no ordering set.
-
Method Details
-
builder
Create a new fluent API builder to customize configuration.- Returns:
- a new builder
-
builder
Create a new fluent API builder from an existing instance.- Parameters:
instance
- an existing instance used as a base for the builder- Returns:
- a builder based on an instance
-
create
Create a new instance with default values.- Returns:
- a new instance
-
unsorted
Create new instance of query result ordering with no ordering set.- Returns:
- new query result ordering instance
-
create
Create new instance of query result ordering.- Parameters:
orders
- order definitions- Returns:
- new query result ordering instance
-
create
Create new instance of query result ordering.- Parameters:
orders
-List
of order definitions- Returns:
- new query result ordering instance
-
orderBy
- Returns:
List
of order definitions
-
isSorted
default boolean isSorted()Whether any order definitions are set.- Returns:
- value of
true
when at least one order definition is set orfalse
otherwise
-