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(@Nullable T criteria) Creates new instance ofKeyValueQuerywith given criteria.KeyValueQuery(@Nullable T criteria, Sort sort) Creates new instance ofKeyValueQuerywith given criteria andSort.KeyValueQuery(Sort sort) Creates new instance ofKeyValueQuerywith givenSort. -
Method Summary
Modifier and TypeMethodDescription@Nullable TGet 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
-
getSort
-
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
-
orderBy
Add givenSort.- Parameters:
sort- must not be null.- Returns:
-
skip
- Parameters:
offset-- Returns:
- See Also:
-
limit
- Parameters:
rows-- Returns:
- See Also:
-