Class StatementMapper.SelectSpec
java.lang.Object
org.springframework.data.r2dbc.core.StatementMapper.SelectSpec
- Enclosing interface:
- StatementMapper
SELECT
specification.-
Constructor Summary
ModifierConstructorDescriptionprotected
SelectSpec
(Table table, List<String> projectedFields, List<Expression> selectList, CriteriaDefinition criteria, Sort sort, int limit, long offset, boolean distinct, LockMode lockMode) -
Method Summary
Modifier and TypeMethodDescriptionstatic StatementMapper.SelectSpec
Create anSELECT
specification fortable
.static StatementMapper.SelectSpec
create
(SqlIdentifier table) Create anSELECT
specification fortable
.distinct()
Associate a result statement distinct with the select and create a newStatementMapper.SelectSpec
.int
getLimit()
getLock()
The used lockmodelong
Deprecated.getSort()
getTable()
boolean
limit
(int limit) Associate a result limit with the select and create a newStatementMapper.SelectSpec
.Associate a lock mode with the select and create a newStatementMapper.SelectSpec
.offset
(long offset) Associate a result offset with the select and create a newStatementMapper.SelectSpec
.withCriteria
(CriteriaDefinition criteria) Associate aCriteria
with the select and return a newStatementMapper.SelectSpec
.Associate aPageable
with the select and create a newStatementMapper.SelectSpec
.withProjection
(String... projectedFields) AssociateprojectedFields
with the select and create a newStatementMapper.SelectSpec
.withProjection
(Collection<Expression> projectedFields) AssociateprojectedFields
with the select and create a newStatementMapper.SelectSpec
.withProjection
(Expression... expressions) Associateexpressions
with the select list and create a newStatementMapper.SelectSpec
.withProjection
(SqlIdentifier... projectedFields) AssociateprojectedFields
with the select and create a newStatementMapper.SelectSpec
.AssociateSort
with the select and create a newStatementMapper.SelectSpec
.
-
Constructor Details
-
SelectSpec
protected SelectSpec(Table table, List<String> projectedFields, List<Expression> selectList, @Nullable CriteriaDefinition criteria, Sort sort, int limit, long offset, boolean distinct, LockMode lockMode)
-
-
Method Details
-
create
Create anSELECT
specification fortable
.- Parameters:
table
-- Returns:
- the
StatementMapper.SelectSpec
.
-
create
Create anSELECT
specification fortable
.- Parameters:
table
-- Returns:
- the
StatementMapper.SelectSpec
. - Since:
- 1.1
-
doWithTable
public StatementMapper.SelectSpec doWithTable(BiFunction<Table, StatementMapper.SelectSpec, StatementMapper.SelectSpec> function) -
withProjection
AssociateprojectedFields
with the select and create a newStatementMapper.SelectSpec
.- Parameters:
projectedFields
-- Returns:
- the
StatementMapper.SelectSpec
. - Since:
- 1.1
-
withProjection
AssociateprojectedFields
with the select and create a newStatementMapper.SelectSpec
.- Parameters:
projectedFields
-- Returns:
- the
StatementMapper.SelectSpec
. - Since:
- 1.1
-
withProjection
Associateexpressions
with the select list and create a newStatementMapper.SelectSpec
.- Parameters:
expressions
-- Returns:
- the
StatementMapper.SelectSpec
. - Since:
- 1.1
-
withProjection
AssociateprojectedFields
with the select and create a newStatementMapper.SelectSpec
.- Parameters:
projectedFields
-- Returns:
- the
StatementMapper.SelectSpec
. - Since:
- 1.1
-
withCriteria
Associate aCriteria
with the select and return a newStatementMapper.SelectSpec
.- Parameters:
criteria
-- Returns:
- the
StatementMapper.SelectSpec
.
-
withSort
AssociateSort
with the select and create a newStatementMapper.SelectSpec
.- Parameters:
sort
-- Returns:
- the
StatementMapper.SelectSpec
.
-
withPage
Associate aPageable
with the select and create a newStatementMapper.SelectSpec
.- Parameters:
page
-- Returns:
- the
StatementMapper.SelectSpec
.
-
offset
Associate a result offset with the select and create a newStatementMapper.SelectSpec
.- Parameters:
offset
-- Returns:
- the
StatementMapper.SelectSpec
.
-
limit
Associate a result limit with the select and create a newStatementMapper.SelectSpec
.- Parameters:
limit
-- Returns:
- the
StatementMapper.SelectSpec
.
-
distinct
Associate a result statement distinct with the select and create a newStatementMapper.SelectSpec
.- Returns:
- the
StatementMapper.SelectSpec
.
-
lock
Associate a lock mode with the select and create a newStatementMapper.SelectSpec
.- Parameters:
lockMode
- theLockMode
we want to use. This might be null- Returns:
- the
StatementMapper.SelectSpec
.
-
getLock
The used lockmode- Returns:
- might be null if no lockmode defined.
-
getTable
-
getProjectedFields
Deprecated.since 1.1, usegetSelectList()
instead.- Returns:
-
getSelectList
-
getCriteria
-
getSort
-
getOffset
public long getOffset() -
getLimit
public int getLimit() -
isDistinct
public boolean isDistinct()
-
getSelectList()
instead.