Class ElasticsearchRepositoryFactoryBean<T extends Repository<S,ID>,S,ID extends Serializable>
java.lang.Object
org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport<T,S,ID>
org.springframework.data.elasticsearch.repository.support.ElasticsearchRepositoryFactoryBean<T,S,ID>
- All Implemented Interfaces:
Aware
,BeanClassLoaderAware
,BeanFactoryAware
,FactoryBean<T>
,InitializingBean
,ApplicationEventPublisherAware
,RepositoryFactoryInformation<S,
ID>
public class ElasticsearchRepositoryFactoryBean<T extends Repository<S,ID>,S,ID extends Serializable>
extends RepositoryFactoryBeanSupport<T,S,ID>
Spring
FactoryBean
implementation to ease container based configuration for
XML namespace and JavaConfig.- Author:
- Rizwan Idrees, Mohsin Husen, Mark Paluch, Peter-Josef Meisch
-
Field Summary
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE
-
Constructor Summary
ConstructorDescriptionElasticsearchRepositoryFactoryBean
(Class<? extends T> repositoryInterface) Creates a newElasticsearchRepositoryFactoryBean
for the given repository interface. -
Method Summary
Modifier and TypeMethodDescriptionvoid
protected RepositoryFactorySupport
void
setElasticsearchOperations
(ElasticsearchOperations operations) Configures theElasticsearchOperations
to be used to create Elasticsearch repositories.Methods inherited from class org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport
addRepositoryFactoryCustomizer, createDefaultQueryMethodEvaluationContextProvider, getEntityInformation, getObject, getObjectType, getPersistentEntity, getQueryMethods, getRepositoryInformation, isSingleton, setApplicationEventPublisher, setBeanClassLoader, setBeanFactory, setCustomImplementation, setEvaluationContextProvider, setLazyInit, setMappingContext, setNamedQueries, setQueryLookupStrategyKey, setRepositoryBaseClass, setRepositoryFragments
-
Constructor Details
-
ElasticsearchRepositoryFactoryBean
Creates a newElasticsearchRepositoryFactoryBean
for the given repository interface.- Parameters:
repositoryInterface
- must not be null.
-
-
Method Details
-
setElasticsearchOperations
Configures theElasticsearchOperations
to be used to create Elasticsearch repositories.- Parameters:
operations
- the operations to set
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSet
in interfaceInitializingBean
- Overrides:
afterPropertiesSet
in classRepositoryFactoryBeanSupport<T extends Repository<S,
ID>, S, ID extends Serializable>
-
createRepositoryFactory
- Specified by:
createRepositoryFactory
in classRepositoryFactoryBeanSupport<T extends Repository<S,
ID>, S, ID extends Serializable>
-