public static class StatementMapper.SelectSpec extends Object
SELECT
specification.Modifier | Constructor and Description |
---|---|
protected |
SelectSpec(org.springframework.data.relational.core.sql.Table table,
List<String> projectedFields,
List<org.springframework.data.relational.core.sql.Expression> selectList,
org.springframework.data.relational.core.query.CriteriaDefinition criteria,
Sort sort,
int limit,
long offset,
boolean distinct) |
Modifier and Type | Method and Description |
---|---|
static StatementMapper.SelectSpec |
create(org.springframework.data.relational.core.sql.SqlIdentifier table)
Create an
SELECT specification for table . |
static StatementMapper.SelectSpec |
create(String table)
Create an
SELECT specification for table . |
StatementMapper.SelectSpec |
distinct()
Associate a result statement distinct with the select and create a new
StatementMapper.SelectSpec . |
StatementMapper.SelectSpec |
doWithTable(BiFunction<org.springframework.data.relational.core.sql.Table,StatementMapper.SelectSpec,StatementMapper.SelectSpec> function) |
org.springframework.data.relational.core.query.CriteriaDefinition |
getCriteria() |
int |
getLimit() |
long |
getOffset() |
List<String> |
getProjectedFields()
Deprecated.
since 1.1, use
getSelectList() instead. |
List<org.springframework.data.relational.core.sql.Expression> |
getSelectList() |
Sort |
getSort() |
org.springframework.data.relational.core.sql.Table |
getTable() |
boolean |
isDistinct() |
StatementMapper.SelectSpec |
limit(int limit)
Associate a result limit with the select and create a new
StatementMapper.SelectSpec . |
StatementMapper.SelectSpec |
offset(long offset)
Associate a result offset with the select and create a new
StatementMapper.SelectSpec . |
StatementMapper.SelectSpec |
withCriteria(org.springframework.data.relational.core.query.CriteriaDefinition criteria)
Associate a
Criteria with the select and return a new StatementMapper.SelectSpec . |
StatementMapper.SelectSpec |
withPage(Pageable page)
Associate a
Pageable with the select and create a new StatementMapper.SelectSpec . |
StatementMapper.SelectSpec |
withProjection(Collection<org.springframework.data.relational.core.sql.Expression> projectedFields)
Associate
projectedFields with the select and create a new StatementMapper.SelectSpec . |
StatementMapper.SelectSpec |
withProjection(org.springframework.data.relational.core.sql.Expression... expressions)
Associate
expressions with the select list and create a new StatementMapper.SelectSpec . |
StatementMapper.SelectSpec |
withProjection(org.springframework.data.relational.core.sql.SqlIdentifier... projectedFields)
Associate
projectedFields with the select and create a new StatementMapper.SelectSpec . |
StatementMapper.SelectSpec |
withProjection(String... projectedFields)
Associate
projectedFields with the select and create a new StatementMapper.SelectSpec . |
StatementMapper.SelectSpec |
withSort(Sort sort)
Associate
Sort with the select and create a new StatementMapper.SelectSpec . |
protected SelectSpec(org.springframework.data.relational.core.sql.Table table, List<String> projectedFields, List<org.springframework.data.relational.core.sql.Expression> selectList, @Nullable org.springframework.data.relational.core.query.CriteriaDefinition criteria, Sort sort, int limit, long offset, boolean distinct)
public static StatementMapper.SelectSpec create(String table)
SELECT
specification for table
.table
- StatementMapper.SelectSpec
.public static StatementMapper.SelectSpec create(org.springframework.data.relational.core.sql.SqlIdentifier table)
SELECT
specification for table
.table
- StatementMapper.SelectSpec
.public StatementMapper.SelectSpec doWithTable(BiFunction<org.springframework.data.relational.core.sql.Table,StatementMapper.SelectSpec,StatementMapper.SelectSpec> function)
public StatementMapper.SelectSpec withProjection(String... projectedFields)
projectedFields
with the select and create a new StatementMapper.SelectSpec
.projectedFields
- StatementMapper.SelectSpec
.public StatementMapper.SelectSpec withProjection(org.springframework.data.relational.core.sql.SqlIdentifier... projectedFields)
projectedFields
with the select and create a new StatementMapper.SelectSpec
.projectedFields
- StatementMapper.SelectSpec
.public StatementMapper.SelectSpec withProjection(org.springframework.data.relational.core.sql.Expression... expressions)
expressions
with the select list and create a new StatementMapper.SelectSpec
.expressions
- StatementMapper.SelectSpec
.public StatementMapper.SelectSpec withProjection(Collection<org.springframework.data.relational.core.sql.Expression> projectedFields)
projectedFields
with the select and create a new StatementMapper.SelectSpec
.projectedFields
- StatementMapper.SelectSpec
.public StatementMapper.SelectSpec withCriteria(org.springframework.data.relational.core.query.CriteriaDefinition criteria)
Criteria
with the select and return a new StatementMapper.SelectSpec
.criteria
- StatementMapper.SelectSpec
.public StatementMapper.SelectSpec withSort(Sort sort)
Sort
with the select and create a new StatementMapper.SelectSpec
.sort
- StatementMapper.SelectSpec
.public StatementMapper.SelectSpec withPage(Pageable page)
Pageable
with the select and create a new StatementMapper.SelectSpec
.page
- StatementMapper.SelectSpec
.public StatementMapper.SelectSpec offset(long offset)
StatementMapper.SelectSpec
.offset
- StatementMapper.SelectSpec
.public StatementMapper.SelectSpec limit(int limit)
StatementMapper.SelectSpec
.limit
- StatementMapper.SelectSpec
.public StatementMapper.SelectSpec distinct()
StatementMapper.SelectSpec
.StatementMapper.SelectSpec
.public org.springframework.data.relational.core.sql.Table getTable()
@Deprecated public List<String> getProjectedFields()
getSelectList()
instead.public List<org.springframework.data.relational.core.sql.Expression> getSelectList()
@Nullable public org.springframework.data.relational.core.query.CriteriaDefinition getCriteria()
public Sort getSort()
public long getOffset()
public int getLimit()
public boolean isDistinct()
Copyright © 2018–2022 Pivotal Software, Inc.. All rights reserved.