Class Query
java.lang.Object
org.springframework.data.relational.core.query.Query
-
Method Summary
Modifier and TypeMethodDescriptionAdd columns to the query.columns(Collection<String> columns) Add columns to the query.columns(SqlIdentifier... columns) Add columns to the query.static Queryempty()Create a new emptyQuery.Return the columns that this query should project.Return theCriteriato be applied.intgetLimit()Return the maximum number of rows to be return.longReturn the number of rows to skip.getSort()booleanReturn whether the query has a limit.booleanisSorted()Return true if theQueryhas a sort parameter.limit(int limit) Limit the number of returned documents tolimit.offset(long offset) Set number of rows to skip before returning results.static Queryquery(CriteriaDefinition criteria) Static factory method to create aQueryusing the providedCriteriaDefinition.Set the given pagination information on theQueryinstance.
-
Method Details
-
query
Static factory method to create aQueryusing the providedCriteriaDefinition. -
empty
-
columns
Add columns to the query.- Parameters:
columns-- Returns:
- a new
Queryobject containing the former settings withcolumnsapplied.
-
columns
Add columns to the query.- Parameters:
columns-- Returns:
- a new
Queryobject containing the former settings withcolumnsapplied.
-
columns
Add columns to the query.- Parameters:
columns-- Returns:
- a new
Queryobject containing the former settings withcolumnsapplied. - Since:
- 1.1
-
offset
Set number of rows to skip before returning results.- Parameters:
offset-- Returns:
- a new
Queryobject containing the former settings withoffsetapplied.
-
limit
Limit the number of returned documents tolimit.- Parameters:
limit-- Returns:
- a new
Queryobject containing the former settings withlimitapplied.
-
with
-
sort
-
getCriteria
-
getColumns
-
isSorted
public boolean isSorted()Return true if theQueryhas a sort parameter.- Returns:
- true if sorted.
- See Also:
-
getSort
-
getOffset
public long getOffset()Return the number of rows to skip.- Returns:
-
getLimit
public int getLimit()Return the maximum number of rows to be return.- Returns:
-
isLimited
public boolean isLimited()Return whether the query has a limit.- Returns:
trueif a limit is set.- Since:
- 3.0
- See Also:
-