Class Query
java.lang.Object
org.springframework.data.aerospike.repository.query.Query
public class Query extends Object
- Author:
- Peter Milne, Jean Mercier
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description CriteriaDefinitiongetCriteria()Get the criteria object.longgetOffset()Number of elements to skip.intgetRows()Number of elements to read.SortgetSort()GetSort.booleanhasOffset()booleanhasRows()Querylimit(int rows)QueryorderBy(Sort sort)Add givenSort.voidsetOffset(long offset)Set the number of elements to skip.voidsetRows(int rows)Set the number of elements to read.voidsetSort(Sort sort)SetSortto be applied.Queryskip(long offset)Querywith(Sort sort)
-
Constructor Details
-
Query
Creates new instance ofKeyValueQuerywith given criteria.- Parameters:
criteria- can be null.
-
Query
- Parameters:
sort- can be null.
-
-
Method Details
-
getCriteria
Get the criteria object. -
getSort
GetSort. -
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
SetSortto be applied. -
orderBy
Add givenSort.- Parameters:
sort- nullSortwill be ignored.
-
skip
- See Also:
setOffset(long)
-
limit
- See Also:
setRows(int)
-
with
-