Class RedisEnhancedRepositoryFactoryBean<T extends org.springframework.data.repository.Repository<S,ID>,S,ID>
java.lang.Object
org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport<T,S,ID>
com.redis.om.spring.repository.support.RedisEnhancedRepositoryFactoryBean<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 RedisEnhancedRepositoryFactoryBean<T extends org.springframework.data.repository.Repository<S,ID>,S,ID>
extends org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport<T,S,ID>
-
Field Summary
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE -
Constructor Summary
ConstructorsConstructorDescriptionRedisEnhancedRepositoryFactoryBean(Class<? extends T> repositoryInterface, org.springframework.data.redis.core.RedisOperations<?, ?> redisOperations, RedisModulesOperations<?> rmo, RediSearchIndexer indexer, FeatureExtractor featureExtractor, RedisOMProperties properties) Creates a newRedisRepositoryFactoryBeanfor the given repository interface. -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected final org.springframework.data.repository.core.support.RepositoryFactorySupportprotected RedisEnhancedRepositoryFactorycreateRepositoryFactory(org.springframework.data.keyvalue.core.KeyValueOperations operations, Class<? extends org.springframework.data.repository.query.parser.AbstractQueryCreator<?, ?>> queryCreator, Class<? extends org.springframework.data.repository.query.RepositoryQuery> repositoryQueryType) Create the repository factory to be used to create repositories.voidsetKeyspaceToIndexMap(RediSearchIndexer keyspaceToIndexMap) voidsetKeyValueOperations(org.springframework.data.keyvalue.core.KeyValueOperations operations) Configures theKeyValueOperationsto be used for the repositories.voidsetMappingContext(org.springframework.data.mapping.context.MappingContext<?, ?> mappingContext) voidsetQueryCreator(Class<? extends org.springframework.data.repository.query.parser.AbstractQueryCreator<?, ?>> queryCreator) Configures theQueryCreatorTypeto be used.voidsetQueryType(Class<? extends org.springframework.data.repository.query.RepositoryQuery> repositoryQueryType) Configures theRepositoryQuerytype to be created.voidConfigures theRedisModulesOperationsto be used for the repositories.voidsetRedisOMSpringProperties(RedisOMProperties properties) voidsetRedisOperations(org.springframework.data.redis.core.RedisOperations<?, ?> redisOperations) Configures theRedisOperationsto be used for the 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, setNamedQueries, setQueryLookupStrategyKey, setRepositoryBaseClass, setRepositoryFragments
-
Constructor Details
-
RedisEnhancedRepositoryFactoryBean
public RedisEnhancedRepositoryFactoryBean(Class<? extends T> repositoryInterface, org.springframework.data.redis.core.RedisOperations<?, ?> redisOperations, RedisModulesOperations<?> rmo, RediSearchIndexer indexer, FeatureExtractor featureExtractor, RedisOMProperties properties) Creates a newRedisRepositoryFactoryBeanfor the given repository interface.- Parameters:
repositoryInterface- must not be null.redisOperations- must not be null.rmo- must not be null.indexer- must not be null.
-
-
Method Details
-
setKeyValueOperations
public void setKeyValueOperations(org.springframework.data.keyvalue.core.KeyValueOperations operations) Configures theKeyValueOperationsto be used for the repositories.- Parameters:
operations- must not be null.
-
setRedisModulesOperations
Configures theRedisModulesOperationsto be used for the repositories.- Parameters:
rmo- must not be null.
-
setRedisOperations
public void setRedisOperations(org.springframework.data.redis.core.RedisOperations<?, ?> redisOperations) Configures theRedisOperationsto be used for the repositories.- Parameters:
redisOperations- must not be null.
-
setRedisOMSpringProperties
-
setMappingContext
public void setMappingContext(org.springframework.data.mapping.context.MappingContext<?, ?> mappingContext) -
setKeyspaceToIndexMap
-
setQueryCreator
public void setQueryCreator(Class<? extends org.springframework.data.repository.query.parser.AbstractQueryCreator<?, ?>> queryCreator) Configures theQueryCreatorTypeto be used.- Parameters:
queryCreator- must not be null.
-
setQueryType
public void setQueryType(Class<? extends org.springframework.data.repository.query.RepositoryQuery> repositoryQueryType) Configures theRepositoryQuerytype to be created.- Parameters:
repositoryQueryType- must not be null.- Since:
- 1.1
-
createRepositoryFactory
protected final org.springframework.data.repository.core.support.RepositoryFactorySupport createRepositoryFactory() -
createRepositoryFactory
protected RedisEnhancedRepositoryFactory createRepositoryFactory(org.springframework.data.keyvalue.core.KeyValueOperations operations, Class<? extends org.springframework.data.repository.query.parser.AbstractQueryCreator<?, ?>> queryCreator, Class<? extends org.springframework.data.repository.query.RepositoryQuery> repositoryQueryType) Create the repository factory to be used to create repositories.- Parameters:
operations- will never be null.queryCreator- will never be null.repositoryQueryType- will never be null.- Returns:
- must not be null.
-
afterPropertiesSet
public void afterPropertiesSet()
-