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

    Constructors
    Constructor
    Description
    GemfireRepositoryFactory(Iterable<org.apache.geode.cache.Region<?,?>> regions, org.springframework.data.mapping.context.MappingContext<? extends GemfirePersistentEntity<?>,GemfirePersistentProperty> mappingContext)
    Constructs a new instance of GemfireRepositoryFactory initialized with the given collection of configured Regions and the MappingContext.
  • Method Summary

    Modifier and Type
    Method
    Description
    getEntityInformation(Class<T> domainClass)
     
    protected org.springframework.data.mapping.context.MappingContext<? extends GemfirePersistentEntity<?>,GemfirePersistentProperty>
    Returns a reference to the GemFire MappingContext used to provide mapping meta-data between entity 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-defined Regions.
    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>
    T
    newQueryMethod(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 of GemfireTemplate initialized with the identified Region used to back all persistent, data access operations defined by the Repository.

    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 of GemfireRepositoryFactory initialized with the given collection of configured Regions and the MappingContext.
      Parameters:
      regions - Iterable collection of configured Regions 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 either Regions or the MappingContext is null.
      See Also:
  • Method Details

    • getMappingContext

      protected org.springframework.data.mapping.context.MappingContext<? extends GemfirePersistentEntity<?>,GemfirePersistentProperty> getMappingContext()
      Returns a reference to the GemFire MappingContext used to provide mapping meta-data between entity types and the data store.
      Returns:
      a reference to the GemFire MappingContext.
      See Also:
    • getRegions

      protected Regions getRegions()
      Returns a reference to the configured, application-defined Regions.
      Returns:
      a reference to the configured, application-defined Regions.
      See Also:
    • getEntityInformation

      public <T, ID> GemfireEntityInformation<T,ID> getEntityInformation(Class<T> domainClass)
      Specified by:
      getEntityInformation in class org.springframework.data.repository.core.support.RepositoryFactorySupport
    • getRepositoryBaseClass

      protected Class<?> getRepositoryBaseClass(org.springframework.data.repository.core.RepositoryMetadata metadata)
      Specified by:
      getRepositoryBaseClass in class org.springframework.data.repository.core.support.RepositoryFactorySupport
    • getTargetRepository

      protected Object getTargetRepository(org.springframework.data.repository.core.RepositoryInformation repositoryInformation)
      Specified by:
      getTargetRepository in class org.springframework.data.repository.core.support.RepositoryFactorySupport
    • newTemplate

      protected GemfireTemplate newTemplate(org.springframework.data.repository.core.RepositoryMetadata repositoryMetadata)
      Constructs a new instance of GemfireTemplate initialized with the identified Region used to back all persistent, data access operations defined by the Repository.
      Parameters:
      repositoryMetadata - RepositoryMetadata containing meta-data about the Repository.
      Returns:
      a new instance of GemfireTemplate initialized with the identified Region.
      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 class org.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)