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 Details

    • getIdType

      default Class<?> 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

      default Class<?> getDomainType()
      Returns the raw domain class the repository is declared for.
      Returns:
      the raw domain class the repository is handling.
    • getIdTypeInformation

      TypeInformation<?> getIdTypeInformation()
      Returns the TypeInformation of the id type of the repository.
      Returns:
      the TypeInformation class of the identifier of the entity managed by the repository. Will never be null.
      Since:
      2.7
    • getDomainTypeInformation

      TypeInformation<?> getDomainTypeInformation()
      Returns the TypeInformationof 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

      TypeInformation<?> getReturnType(Method method)
      Returns the type 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.
      Parameters:
      method -
      Returns:
      Since:
      2.4
    • getReturnedDomainClass

      Class<?> getReturnedDomainClass(Method method)
      Returns the domain class returned by the given Method. In contrast to getReturnType(Method), this method extracts the type from Collections and Page as well.
      Parameters:
      method -
      Returns:
      See Also:
    • getCrudMethods

      CrudMethods getCrudMethods()
      Returns CrudMethods meta information for the repository.
      Returns:
    • isPagingRepository

      boolean isPagingRepository()
      Returns whether the repository is a paging one.
      Returns:
    • getAlternativeDomainTypes

      Set<Class<?>> 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