T - public class Query
extends java.lang.Object
| Constructor and Description |
|---|
Query(CriteriaDefinition criteria)
Creates new instance of
KeyValueQuery with given criteria. |
Query(org.springframework.data.domain.Sort sort)
Creates new instance of
Query with given Sort. |
| Modifier and Type | Method and Description |
|---|---|
CriteriaDefinition |
getCriteria()
Get the criteria object.
|
long |
getOffset()
Number of elements to skip.
|
int |
getRows()
Number of elements to read.
|
org.springframework.data.domain.Sort |
getSort()
Get
Sort. |
boolean |
hasOffset() |
boolean |
hasRows() |
Query |
limit(int rows) |
Query |
orderBy(org.springframework.data.domain.Sort sort)
Add given
Sort. |
void |
setOffset(long offset)
Set the number of elements to skip.
|
void |
setRows(int rows)
Set the number of elements to read.
|
void |
setSort(org.springframework.data.domain.Sort sort)
Set
Sort to be applied. |
Query |
skip(long offset) |
Query |
with(org.springframework.data.domain.Sort sort) |
public Query(CriteriaDefinition criteria)
KeyValueQuery with given criteria.criteria - can be null.public Query(org.springframework.data.domain.Sort sort)
Query with given Sort.sort - can be null.public CriteriaDefinition getCriteria()
public org.springframework.data.domain.Sort getSort()
Sort.public void setSort(org.springframework.data.domain.Sort sort)
Sort to be applied.sort - public long getOffset()
public void setOffset(long offset)
offset - use negative value for none.public boolean hasOffset()
public boolean hasRows()
public int getRows()
public void setRows(int rows)
offset - use negative value for all.public Query orderBy(org.springframework.data.domain.Sort sort)
Sort.sort - null Sort will be ignored.public Query skip(long offset)
offset - setOffset(long)public Query limit(int rows)
rows - setRows(int)public Query with(org.springframework.data.domain.Sort sort)
sort -