Interface QueryMapper.MapperLimit

All Superinterfaces:
QueryMapper.MapperQueryBuild
Enclosing interface:
QueryMapper

public static interface QueryMapper.MapperLimit extends QueryMapper.MapperQueryBuild
Represents the step in the fluent query API where the maximum number of results has been defined and it is still possible to further refine pagination or execute the query.

This step is typically reached after invoking limit(long) and allows specifying an optional offset or proceeding directly to query execution.

@Inject
Template template;

template.select(Book.class)
    .where("author").eq("Ada")
    .limit(10)
    .skip(5)
    .result();
The returned instance is mutable and not thread-safe. Support for pagination features depends on the capabilities of the underlying NoSQL database.
Since:
1.0.0
  • Method Details

    • skip

      QueryMapper.MapperSkip skip(long skip)
      Defines the position of the first result to retrieve (pagination offset).
      template.select(Book.class)
              .where("author").eq("Ada")
              .skip(10);
      
      Parameters:
      skip - the first result to retrieve
      Returns:
      a query with the first result defined
      Throws:
      IllegalArgumentException - when skip is negative