Interface RepositoryMetadata
- All Known Subinterfaces:
RepositoryInformation
- All Known Implementing Classes:
AbstractRepositoryMetadata,AnnotationRepositoryMetadata,DefaultRepositoryMetadata,RepositoryInformationSupport
public interface RepositoryMetadata
Metadata for repository interfaces.
- Author:
- Oliver Gierke, Mark Paluch, Alessandro Nistico
-
Method Summary
Modifier and TypeMethodDescriptionReturns the set of types the repository shall be discoverable for when trying to look up a repository by domain type.ReturnsCrudMethodsmeta information for the repository.default Class<?>Returns the raw domain class the repository is declared for.Returns theTypeInformationof the domain type the repository is declared to manage.default Class<?>Returns the raw id class the given class is declared for.Returns theTypeInformationof the id type of the repository.Class<?>Returns the repository interface.Class<?>getReturnedDomainClass(Method method) Returns the domain class returned by the givenMethod.getReturnType(Method method) Returns the typeMethodreturn type as it is declared in the repository.booleanReturns whether the repository is a paging one.booleanReturns whether the repository is a reactive one, i.e. if it uses reactive types in one of its methods.
-
Method Details
-
getIdType
Returns the raw id class the given class is declared for.- Returns:
- the raw id class of the entity managed by the repository.
-
getDomainType
Returns the raw domain class the repository is declared for.- Returns:
- the raw domain class the repository is handling.
-
getIdTypeInformation
TypeInformation<?> getIdTypeInformation()Returns theTypeInformationof the id type of the repository.- Returns:
- the
TypeInformationclass of the identifier of the entity managed by the repository. Will never be null. - Since:
- 2.7
-
getDomainTypeInformation
TypeInformation<?> getDomainTypeInformation()Returns theTypeInformationof the domain type the repository is declared to manage. Will never be null.- Returns:
- the domain class the repository is handling.
- Since:
- 2.7
-
getRepositoryInterface
Class<?> getRepositoryInterface()Returns the repository interface.- Returns:
-
getReturnType
Returns the typeMethodreturn type as it is declared in the repository. Considers suspended methods and does not unwrap component types but leaves those for further inspection.- Parameters:
method-- Returns:
- Since:
- 2.4
-
getReturnedDomainClass
Returns the domain class returned by the givenMethod. In contrast togetReturnType(Method), this method extracts the type fromCollections andPageas well.- Parameters:
method-- Returns:
- See Also:
-
getCrudMethods
CrudMethods getCrudMethods()ReturnsCrudMethodsmeta information for the repository.- Returns:
-
isPagingRepository
boolean isPagingRepository()Returns whether the repository is a paging one.- Returns:
-
getAlternativeDomainTypes
Returns the set of types the repository shall be discoverable for when trying to look up a repository by domain type.- Returns:
- the set of types the repository shall be discoverable for when trying to look up a repository by domain type, must not be null.
- Since:
- 1.11
- See Also:
-
isReactiveRepository
boolean isReactiveRepository()Returns whether the repository is a reactive one, i.e. if it uses reactive types in one of its methods.- Returns:
- Since:
- 2.0
-
getFragments
Set<RepositoryFragment<?>> getFragments()- Returns:
- Since:
- 3.0
-