- All Superinterfaces:
Prototype.Api
- All Known Implementing Classes:
Order.BuilderBase.OrderImpl
Single rule of the dynamic ordering of the query result.
Order class is the single item of the List stored in Sort.
It represents single ordering rule. E.g. in JPQL query
SELECT t FROM Type t WHERE t.name = :name ORDER BY t.name DESC, t.id this is the
t.name DESC and t.id as two separate Order instances.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classFluent API builder forOrder.static classOrder.BuilderBase<BUILDER extends Order.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends Order> Fluent API builder base forOrder. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic Order.Builderbuilder()Create a new fluent API builder to customize configuration.static Order.BuilderCreate a new fluent API builder from an existing instance.booleanWhether ordering is case-sensitive.static Ordercreate()Create a new instance with default values.static OrderCreate new instance of order definition with default direction and case-sensitivity.static Ordercreate(String property, OrderDirection direction) Create new instance of order definition with default case-sensitivity.static Ordercreate(String property, OrderDirection direction, boolean caseSensitive) Create new instance of order definition.Direction of the ordering.property()Entity property used for ordering.
-
Field Details
-
UNSORTED
Query result ordering with no rules set (unsorted).
-
-
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
-
create
Create new instance of order definition with default direction and case-sensitivity. Default direction isOrderDirection.ASCand default value ofcaseSensitive()istrue.- Parameters:
property- entity property- Returns:
- new order definition instance
-
create
Create new instance of order definition with default case-sensitivity. Default value ofcaseSensitive()istrue.- Parameters:
property- entity propertydirection- direction of the ordering- Returns:
- new order definition instance
-
create
Create new instance of order definition.- Parameters:
property- entity propertydirection- direction of the orderingcaseSensitive- value oftruefor case-sensitive orfalsefor case-sensitive ordering- Returns:
- new order definition instance
-
property
String property()Entity property used for ordering.E.g. this is the path expression in Jakarta Persistence API. In following JPQL query:
SELECT t FROM Type t WHERE t.name = :name ORDER BY t.namethe entity property is thet.namepath expression afterORDERBY keyword.- Returns:
- entity property
-
direction
OrderDirection direction()Direction of the ordering. Default value isOrderDirection.ASC.- Returns:
- direction of the ordering
-
caseSensitive
boolean caseSensitive()Whether ordering is case-sensitive. Default value istrue.- Returns:
- value of
truewhen ordering is case-sensitive orfalseotherwise
-