Class GemfireRepositoryFactory
java.lang.Object
org.springframework.data.repository.core.support.RepositoryFactorySupport
org.springframework.data.gemfire.repository.support.GemfireRepositoryFactory
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanClassLoaderAware
,org.springframework.beans.factory.BeanFactoryAware
public class GemfireRepositoryFactory
extends org.springframework.data.repository.core.support.RepositoryFactorySupport
RepositoryFactorySupport
implementation creating repository proxies
for Gemfire.-
Constructor Summary
ConstructorDescriptionGemfireRepositoryFactory
(Iterable<org.apache.geode.cache.Region<?, ?>> regions, org.springframework.data.mapping.context.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 org.springframework.data.mapping.context.MappingContext<? extends GemfirePersistentEntity<?>,
GemfirePersistentProperty> Returns a reference to the GemFireMappingContext
used to provide mapping meta-data betweenentity types
and the data store.protected Optional<org.springframework.data.repository.query.QueryLookupStrategy>
getQueryLookupStrategy
(org.springframework.data.repository.query.QueryLookupStrategy.Key key, org.springframework.data.repository.query.QueryMethodEvaluationContextProvider evaluationContextProvider) protected Regions
Returns a reference to the configured, application-definedRegions
.protected Class<?>
getRepositoryBaseClass
(org.springframework.data.repository.core.RepositoryMetadata metadata) protected Object
getTargetRepository
(org.springframework.data.repository.core.RepositoryInformation repositoryInformation) protected <T extends org.springframework.data.repository.query.QueryMethod>
TnewQueryMethod
(Method method, org.springframework.data.repository.core.RepositoryMetadata repositoryMetadata, org.springframework.data.projection.ProjectionFactory projectionFactory, org.springframework.data.repository.query.QueryMethodEvaluationContextProvider evaluationContextProvider) protected GemfireTemplate
newTemplate
(org.springframework.data.repository.core.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<org.apache.geode.cache.Region<?, ?>> regions, @NonNull org.springframework.data.mapping.context.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:
-
GemfireMappingContext
Regions
MappingContext
-
-
Method Details
-
getMappingContext
protected org.springframework.data.mapping.context.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:
-
GemfireMappingContext
MappingContext
-
getRegions
Returns a reference to the configured, application-definedRegions
.- Returns:
- a reference to the configured, application-defined
Regions
. - See Also:
-
getEntityInformation
- Specified by:
getEntityInformation
in classorg.springframework.data.repository.core.support.RepositoryFactorySupport
-
getRepositoryBaseClass
protected Class<?> getRepositoryBaseClass(org.springframework.data.repository.core.RepositoryMetadata metadata) - Specified by:
getRepositoryBaseClass
in classorg.springframework.data.repository.core.support.RepositoryFactorySupport
-
getTargetRepository
protected Object getTargetRepository(org.springframework.data.repository.core.RepositoryInformation repositoryInformation) - Specified by:
getTargetRepository
in classorg.springframework.data.repository.core.support.RepositoryFactorySupport
-
newTemplate
protected GemfireTemplate newTemplate(org.springframework.data.repository.core.RepositoryMetadata repositoryMetadata) 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<org.springframework.data.repository.query.QueryLookupStrategy> getQueryLookupStrategy(org.springframework.data.repository.query.QueryLookupStrategy.Key key, org.springframework.data.repository.query.QueryMethodEvaluationContextProvider evaluationContextProvider) - Overrides:
getQueryLookupStrategy
in classorg.springframework.data.repository.core.support.RepositoryFactorySupport
-
newQueryMethod
protected <T extends org.springframework.data.repository.query.QueryMethod> T newQueryMethod(Method method, org.springframework.data.repository.core.RepositoryMetadata repositoryMetadata, org.springframework.data.projection.ProjectionFactory projectionFactory, org.springframework.data.repository.query.QueryMethodEvaluationContextProvider evaluationContextProvider)
-