- 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 classFluent API builder forSort.static classSort.BuilderBase<BUILDER extends Sort.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends Sort> Fluent API builder base forSort. -
Method Summary
Modifier and TypeMethodDescriptionstatic Sort.Builderbuilder()Create a new fluent API builder to customize configuration.static Sort.BuilderCreate a new fluent API builder from an existing instance.static Sortcreate()Create a new instance with default values.static SortCreate new instance of query result ordering.static SortCreate new instance of query result ordering.default booleanisSorted()Whether any order definitions are set.orderBy()Listof query ordering rules.static Sortunsorted()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-Listof order definitions- Returns:
- new query result ordering instance
-
orderBy
- Returns:
Listof order definitions
-
isSorted
default boolean isSorted()Whether any order definitions are set.- Returns:
- value of
truewhen at least one order definition is set orfalseotherwise
-