java.lang.Object
org.springframework.data.aerospike.repository.query.Query

public class Query
extends Object
Author:
Peter Milne, Jean Mercier
  • Constructor Details

    • Query

      public Query​(CriteriaDefinition criteria)
      Creates new instance of KeyValueQuery with given criteria.
      Parameters:
      criteria - can be null.
    • Query

      public Query​(Sort sort)
      Creates new instance of Query with given Sort.
      Parameters:
      sort - can be null.
  • Method Details

    • getCriteria

      public CriteriaDefinition getCriteria()
      Get the criteria object.
    • getSort

      public Sort getSort()
      Get Sort.
    • getOffset

      public long getOffset()
      Number of elements to skip.
      Returns:
      negative value if not set.
    • hasOffset

      public boolean hasOffset()
    • hasRows

      public boolean hasRows()
    • getRows

      public int getRows()
      Number of elements to read.
      Returns:
      negative value if not set.
    • setOffset

      public void setOffset​(long offset)
      Set the number of elements to skip.
      Parameters:
      offset - use negative value for none.
    • setRows

      public void setRows​(int rows)
      Set the number of elements to read.
    • setSort

      public void setSort​(Sort sort)
      Set Sort to be applied.
    • orderBy

      public Query orderBy​(Sort sort)
      Add given Sort.
      Parameters:
      sort - null Sort will be ignored.
    • skip

      public Query skip​(long offset)
      See Also:
      setOffset(long)
    • limit

      public Query limit​(int rows)
      See Also:
      setRows(int)
    • with

      public Query with​(Sort sort)