Module spring.data.keyvalue
Class KeyValueQuery<T>
java.lang.Object
org.springframework.data.keyvalue.core.query.KeyValueQuery<T>
- Type Parameters:
T- Criteria type
- Author:
- Christoph Strobl, Mark Paluch, Marcel Overdijk
-
Constructor Summary
ConstructorsConstructorDescriptionCreates new instance ofKeyValueQuery.KeyValueQuery(Sort sort) Creates new instance ofKeyValueQuerywith givenSort.KeyValueQuery(T criteria) Creates new instance ofKeyValueQuerywith given criteria.KeyValueQuery(T criteria, Sort sort) Creates new instance ofKeyValueQuerywith given criteria andSort. -
Method Summary
Modifier and TypeMethodDescriptionGet the criteria object.longNumber of elements to skip.intgetRows()Number of elements to read.getSort()GetSort.limit(int rows) Add givenSort.voidsetOffset(long offset) Set the number of elements to skip.voidsetRows(int rows) Set the number of elements to read.voidSetSortto be applied.skip(long offset)
-
Constructor Details
-
KeyValueQuery
public KeyValueQuery()Creates new instance ofKeyValueQuery. -
KeyValueQuery
Creates new instance ofKeyValueQuerywith given criteria.- Parameters:
criteria- can be null.
-
KeyValueQuery
Creates new instance ofKeyValueQuerywith given criteria andSort.- Parameters:
criteria- can be null.sort- must not be null.- Since:
- 2.4
-
KeyValueQuery
Creates new instance ofKeyValueQuerywith givenSort.- Parameters:
sort- must not be null.
-
-
Method Details
-
getCriteria
Get the criteria object.- Returns:
- Since:
- 2.0
-
getSort
GetSort.- Returns:
-
getOffset
public long getOffset()Number of elements to skip.- Returns:
- negative value if not set.
-
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.- Parameters:
rows- use negative value for all.
-
setSort
SetSortto be applied.- Parameters:
sort-
-
orderBy
Add givenSort.- Parameters:
sort- must not be null.- Returns:
-
skip
- Parameters:
offset-- Returns:
- See Also:
-
limit
- Parameters:
rows-- Returns:
- See Also:
-