Interface RepositoryInformation
- All Superinterfaces:
RepositoryMetadata
- All Known Implementing Classes:
AotRepositoryInformation, RepositoryInformationSupport
Additional repository specific information
- Author:
- Oliver Gierke
-
Method Summary
Modifier and TypeMethodDescriptionReturns all methods considered to be query methods.Class<?> Returns the base class to be used to create the proxy backing instance.Returns theRepositoryCompositionfor this repository.getTargetClassMethod(Method method) Returns the target class method that is backing the given method.default booleanReturns if the configured repository interface has custom methods, that might have to be delegated to a custom implementation.default booleanReturns whether the configured repository interface has query methods at all.booleanisBaseClassMethod(Method method) Returns whether the given method is logically a base class method.booleanisCustomMethod(Method method) Returns whether the given method is a custom repository method.booleanisQueryMethod(Method method) Returns whether the given method is a query method.Methods inherited from interface RepositoryMetadata
getAlternativeDomainTypes, getCrudMethods, getDomainType, getDomainTypeInformation, getFragments, getIdType, getIdTypeInformation, getRepositoryInterface, getReturnedDomainClass, getReturnedDomainTypeInformation, getReturnType, isPagingRepository, isReactiveRepository
-
Method Details
-
isBaseClassMethod
Returns whether the given method is logically a base class method. This also includes methods (re)declared in the repository interface that match the signatures of the base implementation.- Parameters:
method- must not be null.- Returns:
-
isCustomMethod
Returns whether the given method is a custom repository method.- Parameters:
method-- Returns:
-
isQueryMethod
Returns whether the given method is a query method.- Parameters:
method-- Returns:
-
getQueryMethods
-
getRepositoryBaseClass
Class<?> getRepositoryBaseClass()Returns the base class to be used to create the proxy backing instance.- Returns:
-
getTargetClassMethod
Returns the target class method that is backing the given method. This can be necessary if a repository interface redeclares a method of the core repository interface (e.g. for transaction behavior customization). Returns the method itself if the target class does not implement the given method. Implementations need to make sure theMethodreturned can be invoked via reflection, i.e. needs to be accessible.- Parameters:
method- must not be null.- Returns:
-
hasCustomMethod
default boolean hasCustomMethod()Returns if the configured repository interface has custom methods, that might have to be delegated to a custom implementation. This is used to verify repository configuration.- Returns:
-
hasQueryMethods
default boolean hasQueryMethods()Returns whether the configured repository interface has query methods at all.- Returns:
-
getRepositoryComposition
RepositoryComposition getRepositoryComposition()Returns theRepositoryCompositionfor this repository. This is used to determine the composition of the repository and its fragments.- Returns:
- never null.
- Since:
- 4.0
-