Class CosmosRepositoryFactoryBean<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>
com.azure.spring.data.cosmos.repository.support.CosmosRepositoryFactoryBean<T,S,ID>
- Type Parameters:
T- the type of the repository.S- the domain type the repository manages.ID- the type of the id of the entity the repository manages.
- 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 CosmosRepositoryFactoryBean<T extends org.springframework.data.repository.Repository<S,ID>,S,ID extends Serializable>
extends org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport<T,S,ID>
Adapter for Springs
FactoryBean interface to allow easy setup of cosmos repository factories via Spring
configuration.-
Field Summary
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE -
Constructor Summary
ConstructorsConstructorDescriptionCosmosRepositoryFactoryBean(Class<? extends T> repositoryInterface) Creates a newRepositoryFactoryBeanSupportfor the given repository interface. -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected final org.springframework.data.repository.core.support.RepositoryFactorySupportprotected org.springframework.data.repository.core.support.RepositoryFactorySupportReturn the factory instance.voidsetCosmosOperations(CosmosOperations operations) Set cosmos operationprotected voidsetMappingContext(org.springframework.data.mapping.context.MappingContext<?, ?> mappingContext) 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, setNamedQueries, setQueryLookupStrategyKey, setRepositoryBaseClass, setRepositoryFragments
-
Constructor Details
-
CosmosRepositoryFactoryBean
Creates a newRepositoryFactoryBeanSupportfor the given repository interface.- Parameters:
repositoryInterface- must not be null.
-
-
Method Details
-
setCosmosOperations
Set cosmos operation- Parameters:
operations- for cosmos operations
-
createRepositoryFactory
protected final org.springframework.data.repository.core.support.RepositoryFactorySupport createRepositoryFactory() -
getFactoryInstance
protected org.springframework.data.repository.core.support.RepositoryFactorySupport getFactoryInstance()Return the factory instance.- Returns:
- the factory instance
-
setMappingContext
protected void setMappingContext(org.springframework.data.mapping.context.MappingContext<?, ?> mappingContext) -
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>
-