Class StatementMapper.SelectSpec
java.lang.Object
org.springframework.data.r2dbc.core.StatementMapper.SelectSpec
- Enclosing interface:
- StatementMapper
SELECT specification.-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSelectSpec(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.SelectSpecCreate anSELECTspecification fortable.static StatementMapper.SelectSpeccreate(SqlIdentifier table) Create anSELECTspecification fortable.distinct()Associate a result statement distinct with the select and create a newStatementMapper.SelectSpec.intgetLimit()getLock()The used lockmodelongDeprecated.getSort()getTable()booleanlimit(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 aCriteriawith the select and return a newStatementMapper.SelectSpec.Associate aPageablewith the select and create a newStatementMapper.SelectSpec.withProjection(String... projectedFields) AssociateprojectedFieldswith the select and create a newStatementMapper.SelectSpec.withProjection(Collection<Expression> projectedFields) AssociateprojectedFieldswith the select and create a newStatementMapper.SelectSpec.withProjection(Expression... expressions) Associateexpressionswith the select list and create a newStatementMapper.SelectSpec.withProjection(SqlIdentifier... projectedFields) AssociateprojectedFieldswith the select and create a newStatementMapper.SelectSpec.AssociateSortwith 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 anSELECTspecification fortable.- Parameters:
table-- Returns:
- the
StatementMapper.SelectSpec.
-
create
Create anSELECTspecification fortable.- Parameters:
table-- Returns:
- the
StatementMapper.SelectSpec. - Since:
- 1.1
-
doWithTable
public StatementMapper.SelectSpec doWithTable(BiFunction<Table, StatementMapper.SelectSpec, StatementMapper.SelectSpec> function) -
withProjection
AssociateprojectedFieldswith the select and create a newStatementMapper.SelectSpec.- Parameters:
projectedFields-- Returns:
- the
StatementMapper.SelectSpec. - Since:
- 1.1
-
withProjection
AssociateprojectedFieldswith the select and create a newStatementMapper.SelectSpec.- Parameters:
projectedFields-- Returns:
- the
StatementMapper.SelectSpec. - Since:
- 1.1
-
withProjection
Associateexpressionswith the select list and create a newStatementMapper.SelectSpec.- Parameters:
expressions-- Returns:
- the
StatementMapper.SelectSpec. - Since:
- 1.1
-
withProjection
AssociateprojectedFieldswith the select and create a newStatementMapper.SelectSpec.- Parameters:
projectedFields-- Returns:
- the
StatementMapper.SelectSpec. - Since:
- 1.1
-
withCriteria
Associate aCriteriawith the select and return a newStatementMapper.SelectSpec.- Parameters:
criteria-- Returns:
- the
StatementMapper.SelectSpec.
-
withSort
AssociateSortwith the select and create a newStatementMapper.SelectSpec.- Parameters:
sort-- Returns:
- the
StatementMapper.SelectSpec.
-
withPage
Associate aPageablewith 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- theLockModewe 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.