Interface RepositoryInformation
- All Superinterfaces:
RepositoryMetadata
- All Known Implementing Classes:
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.getTargetClassMethod
(Method method) Returns the target class method that is backing the given method.default boolean
Returns if the configured repository interface has custom methods, that might have to be delegated to a custom implementation.default boolean
Returns whether the configured repository interface has query methods at all.boolean
isBaseClassMethod
(Method method) Returns whether the given method is logically a base class method.boolean
isCustomMethod
(Method method) Returns whether the given method is a custom repository method.boolean
isQueryMethod
(Method method) Returns whether the given method is a query method.Methods inherited from interface org.springframework.data.repository.core.RepositoryMetadata
getAlternativeDomainTypes, getCrudMethods, getDomainType, getDomainTypeInformation, getFragments, getIdType, getIdTypeInformation, getRepositoryInterface, getReturnedDomainClass, 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
Streamable<Method> getQueryMethods()Returns all methods considered to be query methods.- Returns:
-
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 theMethod
returned 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:
-