org.springframework.data.jdbc.repository.query

## Class AbstractJdbcQuery

- java.lang.Object
- - org.springframework.data.jdbc.repository.query.AbstractJdbcQuery

All Implemented Interfaces:
  RepositoryQuery

Direct Known Subclasses:
  PartTreeJdbcQuery, StringBasedJdbcQuery

    public abstract class AbstractJdbcQuery
    extends Object
    implements RepositoryQuery

Base class for queries based on a repository method. It holds the infrastructure for executing a query and knows how to execute a query based on the return type of the method. How to construct the query is left to subclasses.

Since:
  2.0
Author:
  Jens Schauder, Kazuki Shimizu, Oliver Gierke, Maciej Walkowiak, Mark Paluch

### Method Summary

All Methods Instance Methods Concrete Methods
`protected org.springframework.data.jdbc.repository.query.JdbcQueryExecution<?>` `getQueryExecution(JdbcQueryMethod queryMethod, ResultSetExtractor<?> extractor, RowMapper<?> rowMapper)` Creates a `JdbcQueryExecution` given `JdbcQueryMethod`, `ResultSetExtractor` an `RowMapper`.
`JdbcQueryMethod` `getQueryMethod()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.springframework.data.repository.query.RepositoryQuery

`execute`

### Method Detail

#### getQueryMethod

    public JdbcQueryMethod getQueryMethod()

Specified by:
  `getQueryMethod` in interface `RepositoryQuery`

#### getQueryExecution

    protected org.springframework.data.jdbc.repository.query.JdbcQueryExecution<?> getQueryExecution(JdbcQueryMethod queryMethod,
                                                                                                     @Nullable
                                                                                                     ResultSetExtractor<?> extractor,
                                                                                                     RowMapper<?> rowMapper)

Creates a `JdbcQueryExecution` given `JdbcQueryMethod`, `ResultSetExtractor` an `RowMapper`. Prefers the given `ResultSetExtractor` over `RowMapper`.

Parameters:
  `queryMethod` - must not be null.
  `extractor` - must not be null.
  `rowMapper` - must not be null.
Returns:
  a JdbcQueryExecution appropriate for queryMethod. Guaranteed to be not null.