Module spring.data.jdbc
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
ConstructorsConstructorDescriptionJdbcRepositoryFactory(DataAccessStrategy dataAccessStrategy, org.springframework.data.relational.core.mapping.RelationalMappingContext context, JdbcConverter converter, org.springframework.data.relational.core.dialect.Dialect dialect, ApplicationEventPublisher publisher, NamedParameterJdbcOperations operations) Creates a newJdbcRepositoryFactoryfor the givenDataAccessStrategy,RelationalMappingContextandApplicationEventPublisher. -
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 ObjectgetTargetRepository(RepositoryInformation repositoryInformation) voidsetBeanFactory(BeanFactory beanFactory) voidsetEntityCallbacks(EntityCallbacks entityCallbacks) voidsetQueryMappingConfiguration(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, org.springframework.data.relational.core.mapping.RelationalMappingContext context, JdbcConverter converter, org.springframework.data.relational.core.dialect.Dialect dialect, ApplicationEventPublisher publisher, NamedParameterJdbcOperations operations) Creates a newJdbcRepositoryFactoryfor the givenDataAccessStrategy,RelationalMappingContextandApplicationEventPublisher.- 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.EMPTYinstead.
-
getEntityInformation
- Specified by:
getEntityInformationin classRepositoryFactorySupport
-
getTargetRepository
- Specified by:
getTargetRepositoryin classRepositoryFactorySupport
-
getRepositoryBaseClass
- Specified by:
getRepositoryBaseClassin classRepositoryFactorySupport
-
getQueryLookupStrategy
protected Optional<QueryLookupStrategy> getQueryLookupStrategy(@Nullable QueryLookupStrategy.Key key, QueryMethodEvaluationContextProvider evaluationContextProvider) - Overrides:
getQueryLookupStrategyin classRepositoryFactorySupport
-
setEntityCallbacks
- Parameters:
entityCallbacks-- Since:
- 1.1
-
setBeanFactory
- Specified by:
setBeanFactoryin interfaceBeanFactoryAware- Overrides:
setBeanFactoryin classRepositoryFactorySupport- Parameters:
beanFactory- theBeanFactoryused for looking upRowMapperandResultSetExtractorbeans.
-