Interface QueryMapper.MapperOrder
- Enclosing interface:
QueryMapper
public static interface QueryMapper.MapperOrder
Represents the step in the fluent query API where the sort direction
for a previously specified column is defined.
This interface is reached after calling orderBy(String) and
allows selecting the ordering direction (ascending or descending)
before continuing query composition or executing the query.
@Inject
Template template;
template.select(Book.class)
.where("author").eq("Ada")
.orderBy("title").asc()
.result();
The returned instance is mutable and not thread-safe.
Support for ordering operations depends on the capabilities of the
underlying NoSQL database.- Since:
- 1.0.0
-
Method Details
-
asc
Defines the sorting direction as ascending for the previously specified column.template.select(Book.class) .where("author").eq("Ada") .orderBy("title").asc() .result();- Returns:
- the
QueryMapper.MapperNameOrderinstance for further chaining
-
desc
QueryMapper.MapperNameOrder desc()Defines the sorting direction as descending for the previously specified column.template.select(Book.class) .where("author").eq("Ada") .orderBy("title").desc() .result();- Returns:
- the
QueryMapper.MapperNameOrderinstance for further chaining
-