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 Query
empty()
Create a new emptyQuery
.Return the columns that this query should project.Return theCriteria
to be applied.int
getLimit()
Return the maximum number of rows to be return.long
Return the number of rows to skip.getSort()
boolean
Return whether the query has a limit.boolean
isSorted()
Return true if theQuery
has 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 Query
query
(CriteriaDefinition criteria) Static factory method to create aQuery
using the providedCriteriaDefinition
.Set the given pagination information on theQuery
instance.
-
Method Details
-
query
Static factory method to create aQuery
using the providedCriteriaDefinition
. -
empty
Create a new emptyQuery
.- Returns:
-
columns
Add columns to the query.- Parameters:
columns
-- Returns:
- a new
Query
object containing the former settings withcolumns
applied.
-
columns
Add columns to the query.- Parameters:
columns
-- Returns:
- a new
Query
object containing the former settings withcolumns
applied.
-
columns
Add columns to the query.- Parameters:
columns
-- Returns:
- a new
Query
object containing the former settings withcolumns
applied. - Since:
- 1.1
-
offset
Set number of rows to skip before returning results.- Parameters:
offset
-- Returns:
- a new
Query
object containing the former settings withoffset
applied.
-
limit
Limit the number of returned documents tolimit
.- Parameters:
limit
-- Returns:
- a new
Query
object containing the former settings withlimit
applied.
-
with
-
sort
-
getCriteria
Return theCriteria
to be applied.- Returns:
-
getColumns
Return the columns that this query should project.- Returns:
-
isSorted
public boolean isSorted()Return true if theQuery
has 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:
true
if a limit is set.- Since:
- 3.0
- See Also:
-