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

public class StringBasedJdbcQuery extends AbstractJdbcQuery
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
  • 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 new StringBasedJdbcQuery for the given JdbcQueryMethod, RelationalMappingContext and RowMapper.
      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)
      Parameters:
      queryMethod - must not be null.
      operations - must not be null.
      rowMapperFactory - must not be null.
      Since:
      2.3
  • Method Details

    • execute

      public Object execute(Object[] objects)
    • getQueryMethod

      public JdbcQueryMethod getQueryMethod()
      Specified by:
      getQueryMethod in interface org.springframework.data.repository.query.RepositoryQuery
      Overrides:
      getQueryMethod in class AbstractJdbcQuery
    • setBeanFactory

      public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)