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, EnvironmentAware, 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
-
Nested Class Summary
Nested classes/interfaces inherited from class RepositoryFactoryBeanSupport
RepositoryFactoryBeanSupport.FragmentCreationContext, RepositoryFactoryBeanSupport.RepositoryFragmentsFunction -
Field Summary
Fields inherited from interface 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 RepositoryFactoryBeanSupport
addRepositoryFactoryCustomizer, createDefaultEvaluationContextProvider, getEntityInformation, getObject, getObjectType, getPersistentEntity, getQueryMethods, getRepositoryFragmentsContributor, getRepositoryInformation, setApplicationEventPublisher, setBeanClassLoader, setBeanFactory, setCustomImplementation, setEnvironment, setEvaluationContextProvider, setExposeMetadata, setLazyInit, setMappingContext, setNamedQueries, setQueryLookupStrategyKey, setRepositoryBaseClass, setRepositoryFragments, setRepositoryFragmentsFunctionMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface FactoryBean
isSingleton
-
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>
-