Modifier and Type | Method and Description |
---|---|
Query |
columns(Collection<String> columns)
Add columns to the query.
|
Query |
columns(SqlIdentifier... columns)
Add columns to the query.
|
Query |
columns(String... columns)
Add columns to the query.
|
static Query |
empty()
Create a new empty
Query . |
List<SqlIdentifier> |
getColumns()
Return the columns that this query should project.
|
Optional<CriteriaDefinition> |
getCriteria()
Return the
Criteria to be applied. |
int |
getLimit()
Return the maximum number of rows to be return.
|
long |
getOffset()
Return the number of rows to skip.
|
org.springframework.data.domain.Sort |
getSort() |
boolean |
isSorted()
Return true if the
Query has a sort parameter. |
Query |
limit(int limit)
Limit the number of returned documents to
limit . |
Query |
offset(long offset)
Set number of rows to skip before returning results.
|
static Query |
query(CriteriaDefinition criteria)
Static factory method to create a
Query using the provided CriteriaDefinition . |
Query |
sort(org.springframework.data.domain.Sort sort)
Add a
Sort to the Query instance. |
Query |
with(org.springframework.data.domain.Pageable pageable)
Set the given pagination information on the
Query instance. |
public static Query query(CriteriaDefinition criteria)
Query
using the provided CriteriaDefinition
.public Query columns(String... columns)
columns
- Query
object containing the former settings with columns
applied.public Query columns(Collection<String> columns)
columns
- Query
object containing the former settings with columns
applied.public Query columns(SqlIdentifier... columns)
columns
- Query
object containing the former settings with columns
applied.public Query offset(long offset)
offset
- Query
object containing the former settings with offset
applied.public Query limit(int limit)
limit
.limit
- Query
object containing the former settings with limit
applied.public Query with(org.springframework.data.domain.Pageable pageable)
Query
instance. Will transparently set offset
and
limit
as well as applying the Sort
instance defined with the Pageable
.pageable
- Query
object containing the former settings with Pageable
applied.public Query sort(org.springframework.data.domain.Sort sort)
Sort
to the Query
instance.sort
- Query
object containing the former settings with Sort
applied.public Optional<CriteriaDefinition> getCriteria()
Criteria
to be applied.public List<SqlIdentifier> getColumns()
public boolean isSorted()
Query
has a sort parameter.Sort.isSorted()
public org.springframework.data.domain.Sort getSort()
public long getOffset()
public int getLimit()
Copyright © 2017–2023 Pivotal Software, Inc.. All rights reserved.