Class GemfireRepositoryFactory
java.lang.Object
org.springframework.data.repository.core.support.RepositoryFactorySupport
org.springframework.data.gemfire.repository.support.GemfireRepositoryFactory
- All Implemented Interfaces:
Aware
,BeanClassLoaderAware
,BeanFactoryAware
RepositoryFactorySupport
implementation creating repository proxies
for Gemfire.- Author:
- Oliver Gierke, David Turanski, John Blum
-
Constructor Summary
ConstructorDescriptionGemfireRepositoryFactory
(Iterable<Region<?, ?>> regions, MappingContext<? extends GemfirePersistentEntity<?>, GemfirePersistentProperty> mappingContext) Constructs a new instance ofGemfireRepositoryFactory
initialized with the given collection of configuredRegions
and theMappingContext
. -
Method Summary
Modifier and TypeMethodDescription<T,
ID> GemfireEntityInformation<T, ID> getEntityInformation
(Class<T> domainClass) protected MappingContext<? extends GemfirePersistentEntity<?>,
GemfirePersistentProperty> Returns a reference to the GemFireMappingContext
used to provide mapping meta-data betweenentity types
and the data store.protected Optional<QueryLookupStrategy>
getQueryLookupStrategy
(QueryLookupStrategy.Key key, QueryMethodEvaluationContextProvider evaluationContextProvider) protected Regions
Returns a reference to the configured, application-definedRegions
.protected Class<?>
getRepositoryBaseClass
(RepositoryMetadata metadata) protected Object
getTargetRepository
(RepositoryInformation repositoryInformation) protected <T extends QueryMethod>
TnewQueryMethod
(Method method, RepositoryMetadata repositoryMetadata, ProjectionFactory projectionFactory, QueryMethodEvaluationContextProvider evaluationContextProvider) protected GemfireTemplate
newTemplate
(RepositoryMetadata repositoryMetadata) Constructs a new instance ofGemfireTemplate
initialized with the identifiedRegion
used to back all persistent, data access operations defined by theRepository
.Methods inherited from class org.springframework.data.repository.core.support.RepositoryFactorySupport
addInvocationListener, addQueryCreationListener, addRepositoryProxyPostProcessor, getProjectionFactory, getProjectionFactory, getQueryMethods, getRepository, getRepository, getRepository, getRepositoryFragments, getRepositoryInformation, getRepositoryMetadata, getTargetRepositoryViaReflection, getTargetRepositoryViaReflection, instantiateClass, setBeanClassLoader, setBeanFactory, setEvaluationContextProvider, setNamedQueries, setQueryLookupStrategyKey, setRepositoryBaseClass, validate
-
Constructor Details
-
GemfireRepositoryFactory
public GemfireRepositoryFactory(@NonNull Iterable<Region<?, ?>> regions, @NonNull MappingContext<? extends GemfirePersistentEntity<?>, GemfirePersistentProperty> mappingContext) Constructs a new instance ofGemfireRepositoryFactory
initialized with the given collection of configuredRegions
and theMappingContext
.- Parameters:
regions
-Iterable
collection of configuredRegions
used by this application; must not be null.mappingContext
-MappingContext
used to map entities to the underlying data store, must not be null.- Throws:
IllegalArgumentException
- if eitherRegions
or theMappingContext
is null.- See Also:
-
-
Method Details
-
getMappingContext
protected MappingContext<? extends GemfirePersistentEntity<?>,GemfirePersistentProperty> getMappingContext()Returns a reference to the GemFireMappingContext
used to provide mapping meta-data betweenentity types
and the data store.- Returns:
- a reference to the GemFire
MappingContext
. - See Also:
-
getRegions
Returns a reference to the configured, application-definedRegions
. -
getEntityInformation
- Specified by:
getEntityInformation
in classRepositoryFactorySupport
-
getRepositoryBaseClass
- Specified by:
getRepositoryBaseClass
in classRepositoryFactorySupport
-
getTargetRepository
- Specified by:
getTargetRepository
in classRepositoryFactorySupport
-
newTemplate
Constructs a new instance ofGemfireTemplate
initialized with the identifiedRegion
used to back all persistent, data access operations defined by theRepository
.- Parameters:
repositoryMetadata
-RepositoryMetadata
containing meta-data about theRepository
.- Returns:
- a new instance of
GemfireTemplate
initialized with the identifiedRegion
. - See Also:
-
resolvePersistentEntity(Class)
resolveRegion(RepositoryMetadata, GemfirePersistentEntity)
validate(RepositoryMetadata, GemfirePersistentEntity, Region)
RepositoryMetadata
GemfireTemplate
Region
-
getQueryLookupStrategy
protected Optional<QueryLookupStrategy> getQueryLookupStrategy(QueryLookupStrategy.Key key, QueryMethodEvaluationContextProvider evaluationContextProvider) - Overrides:
getQueryLookupStrategy
in classRepositoryFactorySupport
-
newQueryMethod
protected <T extends QueryMethod> T newQueryMethod(Method method, RepositoryMetadata repositoryMetadata, ProjectionFactory projectionFactory, QueryMethodEvaluationContextProvider evaluationContextProvider)
-