Class SolrRepositoryFactoryBean<T extends org.springframework.data.repository.Repository<S,ID>,S,ID extends Serializable>
java.lang.Object
org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport<T,S,ID>
org.springframework.data.repository.core.support.TransactionalRepositoryFactoryBeanSupport<T,S,ID>
org.springframework.data.solr.repository.support.SolrRepositoryFactoryBean<T,S,ID>
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanClassLoaderAware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.beans.factory.FactoryBean<T>,org.springframework.beans.factory.InitializingBean,org.springframework.context.ApplicationEventPublisherAware,org.springframework.data.repository.core.support.RepositoryFactoryInformation<S,ID>
public class SolrRepositoryFactoryBean<T extends org.springframework.data.repository.Repository<S,ID>,S,ID extends Serializable>
extends org.springframework.data.repository.core.support.TransactionalRepositoryFactoryBeanSupport<T,S,ID>
Spring
FactoryBean implementation to ease container based configuration for XML namespace and JavaConfig.-
Field Summary
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE -
Constructor Summary
ConstructorsConstructorDescriptionSolrRepositoryFactoryBean(Class<? extends T> repositoryInterface) Creates a newSolrRepositoryFactoryBeanfor the given repository interface. -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected org.springframework.data.repository.core.support.RepositoryFactorySupportprotected SolrOperationsvoidsetSchemaCreationSupport(boolean schemaCreationSupport) voidsetSolrClient(org.apache.solr.client.solrj.SolrClient solrClient) voidsetSolrConverter(SolrConverter solrConverter) voidsetSolrMappingContext(SimpleSolrMappingContext solrMappingContext) voidsetSolrOperations(SolrOperations operations) Configures theSolrOperationsto be used to create Solr repositories.Methods inherited from class org.springframework.data.repository.core.support.TransactionalRepositoryFactoryBeanSupport
createRepositoryFactory, setBeanFactory, setEnableDefaultTransactions, setTransactionManagerMethods inherited from class org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport
addRepositoryFactoryCustomizer, createDefaultQueryMethodEvaluationContextProvider, getEntityInformation, getObject, getObjectType, getPersistentEntity, getQueryMethods, getRepositoryInformation, isSingleton, setApplicationEventPublisher, setBeanClassLoader, setCustomImplementation, setEvaluationContextProvider, setLazyInit, setMappingContext, setNamedQueries, setQueryLookupStrategyKey, setRepositoryBaseClass, setRepositoryFragments
-
Constructor Details
-
SolrRepositoryFactoryBean
Creates a newSolrRepositoryFactoryBeanfor the given repository interface.- Parameters:
repositoryInterface- must not be null.
-
-
Method Details
-
setSolrOperations
Configures theSolrOperationsto be used to create Solr repositories.- Parameters:
operations- the operations to set
-
setSolrClient
public void setSolrClient(org.apache.solr.client.solrj.SolrClient solrClient) -
setSchemaCreationSupport
public void setSchemaCreationSupport(boolean schemaCreationSupport) -
setSolrConverter
- Parameters:
solrConverter-- Since:
- 2.1
-
setSolrMappingContext
- Parameters:
solrMappingContext-- Since:
- 1.4
-
getSolrMappingContext
- Returns:
- Since:
- 1.4
-
getSolrOperations
- Returns:
- SolrOperations to be used for eg. custom implementation
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Overrides:
afterPropertiesSetin classorg.springframework.data.repository.core.support.RepositoryFactoryBeanSupport<T extends org.springframework.data.repository.Repository<S,ID>, S, ID extends Serializable>
-
doCreateRepositoryFactory
protected org.springframework.data.repository.core.support.RepositoryFactorySupport doCreateRepositoryFactory()
-