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,ApplicationEventPublisherAware,EnvironmentAware,EnvironmentCapable
public class JdbcRepositoryFactory
extends RepositoryFactorySupport
implements ApplicationEventPublisherAware
Creates repository implementation based on JDBC.
- Author:
- Jens Schauder, Greg Turnquist, Christoph Strobl, Mark Paluch, Hebert Coelho, Diego Krupitza, Christopher Klein, Marcin Grzejszczak, Tomohiko Ozawa
-
Constructor Summary
ConstructorsConstructorDescriptionJdbcRepositoryFactory(DataAccessStrategy dataAccessStrategy, RelationalMappingContext context, JdbcConverter converter, Dialect dialect, ApplicationEventPublisher publisher, NamedParameterJdbcOperations jdbcOperations) Deprecated, for removal: This API element is subject to removal in a future version.JdbcRepositoryFactory(JdbcAggregateOperations operations) Creates a newJdbcRepositoryFactoryfor the givenJdbcAggregateOperations. -
Method Summary
Modifier and TypeMethodDescriptiongetEntityInformation(RepositoryMetadata metadata) protected Optional<QueryLookupStrategy> getQueryLookupStrategy(@Nullable QueryLookupStrategy.Key key, ValueExpressionDelegate valueExpressionDelegate) protected Class<?> getRepositoryBaseClass(RepositoryMetadata repositoryMetadata) protected ObjectgetTargetRepository(RepositoryInformation repositoryInformation) voidDeprecated, for removal: This API element is subject to removal in a future version.no longer used nor supported.voidsetBeanFactory(@Nullable BeanFactory beanFactory) voidsetEntityCallbacks(EntityCallbacks entityCallbacks) Deprecated, for removal: This API element is subject to removal in a future version.no longer used nor supported.voidsetQueryMappingConfiguration(QueryMappingConfiguration queryMappingConfiguration) Methods inherited from class org.springframework.data.repository.core.support.RepositoryFactorySupport
addInvocationListener, addQueryCreationListener, addRepositoryProxyPostProcessor, getEntityInformation, getEnvironment, getProjectionFactory, getProjectionFactory, getQueryMethods, getRepository, getRepository, getRepository, getRepositoryFragments, getRepositoryInformation, getRepositoryMetadata, getTargetRepositoryViaReflection, instantiateClass, setBeanClassLoader, setEnvironment, setEvaluationContextProvider, setExposeMetadata, setNamedQueries, setQueryLookupStrategyKey, setRepositoryBaseClass, validate
-
Constructor Details
-
JdbcRepositoryFactory
Creates a newJdbcRepositoryFactoryfor the givenJdbcAggregateOperations.- Parameters:
operations- must not be null.- Since:
- 4.0
-
JdbcRepositoryFactory
@Deprecated(since="4.0", forRemoval=true) public JdbcRepositoryFactory(DataAccessStrategy dataAccessStrategy, RelationalMappingContext context, JdbcConverter converter, Dialect dialect, ApplicationEventPublisher publisher, NamedParameterJdbcOperations jdbcOperations) Deprecated, for removal: This API element is subject to removal in a future version.useJdbcRepositoryFactory(JdbcAggregateOperations)for consistent configuration instead.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.jdbcOperations- must not be null.
-
-
Method Details
-
setApplicationEventPublisher
@Deprecated(since="4.0", forRemoval=true) public void setApplicationEventPublisher(ApplicationEventPublisher publisher) Deprecated, for removal: This API element is subject to removal in a future version.no longer used nor supported. UseJdbcRepositoryFactory(JdbcAggregateOperations)instead.- Specified by:
setApplicationEventPublisherin interfaceApplicationEventPublisherAware- Parameters:
publisher- event publisher to be used by this object.
-
setEntityCallbacks
@Deprecated(since="4.0", forRemoval=true) public void setEntityCallbacks(EntityCallbacks entityCallbacks) Deprecated, for removal: This API element is subject to removal in a future version.no longer used nor supported. UseJdbcRepositoryFactory(JdbcAggregateOperations)instead.- Parameters:
entityCallbacks-- Since:
- 1.1
-
setBeanFactory
- Specified by:
setBeanFactoryin interfaceBeanFactoryAware- Overrides:
setBeanFactoryin classRepositoryFactorySupport- Parameters:
beanFactory- theBeanFactoryused for looking upRowMapperandResultSetExtractorbeans.
-
setQueryMappingConfiguration
- Parameters:
queryMappingConfiguration- must not be null considerQueryMappingConfiguration.EMPTYinstead.
-
getEntityInformation
- Overrides:
getEntityInformationin classRepositoryFactorySupport
-
getTargetRepository
- Specified by:
getTargetRepositoryin classRepositoryFactorySupport
-
getRepositoryBaseClass
- Specified by:
getRepositoryBaseClassin classRepositoryFactorySupport
-
getQueryLookupStrategy
protected Optional<QueryLookupStrategy> getQueryLookupStrategy(@Nullable QueryLookupStrategy.Key key, ValueExpressionDelegate valueExpressionDelegate) - Overrides:
getQueryLookupStrategyin classRepositoryFactorySupport
-
JdbcRepositoryFactory(JdbcAggregateOperations)for consistent configuration instead.