Class StringBasedJdbcQuery
java.lang.Object
org.springframework.data.jdbc.repository.query.AbstractJdbcQuery
org.springframework.data.jdbc.repository.query.StringBasedJdbcQuery
- All Implemented Interfaces:
org.springframework.data.repository.query.RepositoryQuery
A query to be executed based on a repository method, it's annotated SQL query and the arguments provided to the
method.
- Since:
- 2.0
- Author:
- Jens Schauder, Kazuki Shimizu, Oliver Gierke, Maciej Walkowiak, Mark Paluch, Hebert Coelho, Chirag Tailor, Christopher Klein
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.data.jdbc.repository.query.AbstractJdbcQuery
AbstractJdbcQuery.ConvertingRowMapper<T>, AbstractJdbcQuery.RowMapperFactory
-
Constructor Summary
ConstructorDescriptionStringBasedJdbcQuery
(JdbcQueryMethod queryMethod, org.springframework.jdbc.core.namedparam.NamedParameterJdbcOperations operations, AbstractJdbcQuery.RowMapperFactory rowMapperFactory, JdbcConverter converter, org.springframework.data.repository.query.QueryMethodEvaluationContextProvider evaluationContextProvider) Creates a newStringBasedJdbcQuery
for the givenJdbcQueryMethod
,RelationalMappingContext
andAbstractJdbcQuery.RowMapperFactory
.StringBasedJdbcQuery
(JdbcQueryMethod queryMethod, org.springframework.jdbc.core.namedparam.NamedParameterJdbcOperations operations, org.springframework.jdbc.core.RowMapper<?> defaultRowMapper, JdbcConverter converter, org.springframework.data.repository.query.QueryMethodEvaluationContextProvider evaluationContextProvider) Creates a newStringBasedJdbcQuery
for the givenJdbcQueryMethod
,RelationalMappingContext
andRowMapper
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
setBeanFactory
(org.springframework.beans.factory.BeanFactory beanFactory) Methods inherited from class org.springframework.data.jdbc.repository.query.AbstractJdbcQuery
getQueryExecution, resolveTypeToRead
-
Constructor Details
-
StringBasedJdbcQuery
public StringBasedJdbcQuery(JdbcQueryMethod queryMethod, org.springframework.jdbc.core.namedparam.NamedParameterJdbcOperations operations, @Nullable org.springframework.jdbc.core.RowMapper<?> defaultRowMapper, JdbcConverter converter, org.springframework.data.repository.query.QueryMethodEvaluationContextProvider evaluationContextProvider) Creates a newStringBasedJdbcQuery
for the givenJdbcQueryMethod
,RelationalMappingContext
andRowMapper
.- Parameters:
queryMethod
- must not be null.operations
- must not be null.defaultRowMapper
- can be null (only in case of a modifying query).
-
StringBasedJdbcQuery
public StringBasedJdbcQuery(JdbcQueryMethod queryMethod, org.springframework.jdbc.core.namedparam.NamedParameterJdbcOperations operations, AbstractJdbcQuery.RowMapperFactory rowMapperFactory, JdbcConverter converter, org.springframework.data.repository.query.QueryMethodEvaluationContextProvider evaluationContextProvider) Creates a newStringBasedJdbcQuery
for the givenJdbcQueryMethod
,RelationalMappingContext
andAbstractJdbcQuery.RowMapperFactory
.- Parameters:
queryMethod
- must not be null.operations
- must not be null.rowMapperFactory
- must not be null.- Since:
- 2.3
-
-
Method Details
-
execute
-
getQueryMethod
- Specified by:
getQueryMethod
in interfaceorg.springframework.data.repository.query.RepositoryQuery
- Overrides:
getQueryMethod
in classAbstractJdbcQuery
-
setBeanFactory
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
-