public abstract class AbstractRepositoryMetadata extends Object implements RepositoryMetadata
RepositoryMetadata
implementations.Constructor and Description |
---|
AbstractRepositoryMetadata(Class<?> repositoryInterface)
Creates a new
AbstractRepositoryMetadata . |
Modifier and Type | Method and Description |
---|---|
Set<Class<?>> |
getAlternativeDomainTypes()
Returns the set of types the repository shall be discoverable for when trying to look up a repository by domain
type.
|
CrudMethods |
getCrudMethods()
Returns
CrudMethods meta information for the repository. |
static RepositoryMetadata |
getMetadata(Class<?> repositoryInterface)
Creates a new
RepositoryMetadata for the given repository interface. |
Class<?> |
getRepositoryInterface()
Returns the repository interface.
|
Class<?> |
getReturnedDomainClass(Method method)
Returns the domain class returned by the given
Method . |
TypeInformation<?> |
getReturnType(Method method)
Returns the type
Method return type as it is declared in the repository. |
boolean |
isPagingRepository()
Returns whether the repository is a paging one.
|
boolean |
isReactiveRepository()
Returns whether the repository is a reactive one, i.e. if it uses reactive types in one of its methods.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDomainType, getIdType
public AbstractRepositoryMetadata(Class<?> repositoryInterface)
AbstractRepositoryMetadata
.repositoryInterface
- must not be null and must be an interface.public static RepositoryMetadata getMetadata(Class<?> repositoryInterface)
RepositoryMetadata
for the given repository interface.repositoryInterface
- must not be null.public TypeInformation<?> getReturnType(Method method)
RepositoryMetadata
Method
return type as it is declared in the repository. Considers suspended methods and
does not unwrap component types but leaves those for further inspection.getReturnType
in interface RepositoryMetadata
public Class<?> getReturnedDomainClass(Method method)
RepositoryMetadata
Method
. In contrast to RepositoryMetadata.getReturnType(Method)
, this
method extracts the type from Collection
s and Page
as well.getReturnedDomainClass
in interface RepositoryMetadata
RepositoryMetadata.getReturnType(Method)
public Class<?> getRepositoryInterface()
RepositoryMetadata
getRepositoryInterface
in interface RepositoryMetadata
public CrudMethods getCrudMethods()
RepositoryMetadata
CrudMethods
meta information for the repository.getCrudMethods
in interface RepositoryMetadata
public boolean isPagingRepository()
RepositoryMetadata
isPagingRepository
in interface RepositoryMetadata
public Set<Class<?>> getAlternativeDomainTypes()
RepositoryMetadata
getAlternativeDomainTypes
in interface RepositoryMetadata
Repositories.getRepositoryFor(Class)
public boolean isReactiveRepository()
RepositoryMetadata
isReactiveRepository
in interface RepositoryMetadata
Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.