Class JdbcRepositoryFactory
java.lang.Object
org.springframework.data.repository.core.support.RepositoryFactorySupport
org.springframework.data.jdbc.repository.support.JdbcRepositoryFactory
- All Implemented Interfaces:
Aware
,BeanClassLoaderAware
,BeanFactoryAware
Creates repository implementation based on JDBC.
- Author:
- Jens Schauder, Greg Turnquist, Christoph Strobl, Mark Paluch, Hebert Coelho, Diego Krupitza, Christopher Klein
-
Constructor Summary
ConstructorDescriptionJdbcRepositoryFactory
(DataAccessStrategy dataAccessStrategy, RelationalMappingContext context, JdbcConverter converter, Dialect dialect, ApplicationEventPublisher publisher, NamedParameterJdbcOperations operations) Creates a newJdbcRepositoryFactory
for the givenDataAccessStrategy
,RelationalMappingContext
andApplicationEventPublisher
. -
Method Summary
Modifier and TypeMethodDescription<T,
ID> EntityInformation<T, ID> getEntityInformation
(Class<T> aClass) protected Optional<QueryLookupStrategy>
getQueryLookupStrategy
(QueryLookupStrategy.Key key, QueryMethodEvaluationContextProvider evaluationContextProvider) protected Class<?>
getRepositoryBaseClass
(RepositoryMetadata repositoryMetadata) protected Object
getTargetRepository
(RepositoryInformation repositoryInformation) void
setBeanFactory
(BeanFactory beanFactory) void
setEntityCallbacks
(EntityCallbacks entityCallbacks) void
setQueryMappingConfiguration
(QueryMappingConfiguration queryMappingConfiguration) Methods inherited from class org.springframework.data.repository.core.support.RepositoryFactorySupport
addInvocationListener, addQueryCreationListener, addRepositoryProxyPostProcessor, getProjectionFactory, getProjectionFactory, getQueryMethods, getRepository, getRepository, getRepository, getRepositoryFragments, getRepositoryInformation, getRepositoryMetadata, getTargetRepositoryViaReflection, getTargetRepositoryViaReflection, instantiateClass, setBeanClassLoader, setEvaluationContextProvider, setNamedQueries, setQueryLookupStrategyKey, setRepositoryBaseClass, validate
-
Constructor Details
-
JdbcRepositoryFactory
public JdbcRepositoryFactory(DataAccessStrategy dataAccessStrategy, RelationalMappingContext context, JdbcConverter converter, Dialect dialect, ApplicationEventPublisher publisher, NamedParameterJdbcOperations operations) Creates a newJdbcRepositoryFactory
for the givenDataAccessStrategy
,RelationalMappingContext
andApplicationEventPublisher
.- Parameters:
dataAccessStrategy
- must not be null.context
- must not be null.converter
- must not be null.dialect
- must not be null.publisher
- must not be null.operations
- must not be null.
-
-
Method Details
-
setQueryMappingConfiguration
- Parameters:
queryMappingConfiguration
- must not be null considerQueryMappingConfiguration.EMPTY
instead.
-
getEntityInformation
- Specified by:
getEntityInformation
in classRepositoryFactorySupport
-
getTargetRepository
- Specified by:
getTargetRepository
in classRepositoryFactorySupport
-
getRepositoryBaseClass
- Specified by:
getRepositoryBaseClass
in classRepositoryFactorySupport
-
getQueryLookupStrategy
protected Optional<QueryLookupStrategy> getQueryLookupStrategy(@Nullable QueryLookupStrategy.Key key, QueryMethodEvaluationContextProvider evaluationContextProvider) - Overrides:
getQueryLookupStrategy
in classRepositoryFactorySupport
-
setEntityCallbacks
- Parameters:
entityCallbacks
-- Since:
- 1.1
-
setBeanFactory
- Specified by:
setBeanFactory
in interfaceBeanFactoryAware
- Overrides:
setBeanFactory
in classRepositoryFactorySupport
- Parameters:
beanFactory
- theBeanFactory
used for looking upRowMapper
andResultSetExtractor
beans.
-