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
ConstructorsConstructorDescriptionElasticsearchRepositoryFactoryBean(Class<? extends T> repositoryInterface) Creates a newElasticsearchRepositoryFactoryBeanfor the given repository interface. -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected RepositoryFactorySupportvoidsetElasticsearchOperations(ElasticsearchOperations operations) Configures theElasticsearchOperationsto 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 newElasticsearchRepositoryFactoryBeanfor the given repository interface.- Parameters:
repositoryInterface- must not be null.
-
-
Method Details
-
setElasticsearchOperations
Configures theElasticsearchOperationsto be used to create Elasticsearch repositories.- Parameters:
operations- the operations to set
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSetin interfaceInitializingBean- Overrides:
afterPropertiesSetin classRepositoryFactoryBeanSupport<T extends Repository<S,ID>, S, ID extends Serializable>
-
createRepositoryFactory
- Specified by:
createRepositoryFactoryin classRepositoryFactoryBeanSupport<T extends Repository<S,ID>, S, ID extends Serializable>
-