| Constructor and Description |
|---|
Repositories(ListableBeanFactory factory)
Creates a new
Repositories instance by looking up the repository instances and meta information from the
given ListableBeanFactory. |
| Modifier and Type | Method and Description |
|---|---|
<T,S> EntityInformation<T,S> |
getEntityInformationFor(Class<?> domainClass)
Returns the
EntityInformation for the given domain class. |
PersistentEntity<?,?> |
getPersistentEntity(Class<?> domainClass)
Returns the
PersistentEntity for the given domain class. |
List<QueryMethod> |
getQueryMethodsFor(Class<?> domainClass)
Returns the
QueryMethods contained in the repository managing the given domain class. |
Optional<Object> |
getRepositoryFor(Class<?> domainClass)
Returns the repository managing the given domain class.
|
Optional<RepositoryInformation> |
getRepositoryInformation(Class<?> repositoryInterface)
Returns the
RepositoryInformation for the given repository interface. |
Optional<RepositoryInformation> |
getRepositoryInformationFor(Class<?> domainClass)
Returns the
RepositoryInformation for the given domain class. |
RepositoryInformation |
getRequiredRepositoryInformation(Class<?> domainType)
Returns the
RepositoryInformation for the given domain type. |
boolean |
hasRepositoryFor(Class<?> domainClass)
Returns whether we have a repository instance registered to manage instances of the given domain class.
|
Iterator<Class<?>> |
iterator() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic Repositories(ListableBeanFactory factory)
Repositories instance by looking up the repository instances and meta information from the
given ListableBeanFactory.factory - must not be null.public boolean hasRepositoryFor(Class<?> domainClass)
domainClass is unwrapped to the actual user class if necessary.domainClass - must not be null.public Optional<Object> getRepositoryFor(Class<?> domainClass)
domainClass is unwrapped to the actual
user class if necessary.domainClass - must not be null.public <T,S> EntityInformation<T,S> getEntityInformationFor(Class<?> domainClass)
EntityInformation for the given domain class. The given domainClass is unwrapped to the
actual user class if necessary.domainClass - must not be null.ProxyUtils.getUserClass(java.lang.Class<?>)public Optional<RepositoryInformation> getRepositoryInformationFor(Class<?> domainClass)
RepositoryInformation for the given domain class. The given domainClass is unwrapped to
the actual user class if necessary.domainClass - must not be null.RepositoryInformation for the given domain class or Optional#empty() if no
repository registered for this domain class.ProxyUtils.getUserClass(java.lang.Class<?>)public RepositoryInformation getRequiredRepositoryInformation(Class<?> domainType)
RepositoryInformation for the given domain type. The given domainType is unwrapped to
the actual user class if necessary.domainType - must not be null.RepositoryInformation for the given domain type.IllegalArgumentException - in case no RepositoryInformation could be found for the given domain type.ProxyUtils.getUserClass(java.lang.Class<?>)public Optional<RepositoryInformation> getRepositoryInformation(Class<?> repositoryInterface)
RepositoryInformation for the given repository interface.repositoryInterface - must not be null.RepositoryInformation for the given repository interface or null there's no
repository instance registered for the given interface.public PersistentEntity<?,?> getPersistentEntity(Class<?> domainClass)
PersistentEntity for the given domain class. Might return null in case the module
storing the given domain class does not support the mapping subsystem. The given domainClass is unwrapped
to the actual user class if necessary.domainClass - must not be null.PersistentEntity for the given domain class or null if no repository is registered
for the domain class or the repository is not backed by a MappingContext implementation.ProxyUtils.getUserClass(java.lang.Class<?>)public List<QueryMethod> getQueryMethodsFor(Class<?> domainClass)
QueryMethods contained in the repository managing the given domain class. The given
domainClass is unwrapped to the actual user class if necessary.domainClass - must not be null.ProxyUtils.getUserClass(java.lang.Class<?>)Copyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.