org.springframework.data.repository.core

## Interface RepositoryMetadata

All Known Subinterfaces:
  RepositoryInformation

All Known Implementing Classes:
  AbstractRepositoryMetadata, AnnotationRepositoryMetadata, DefaultRepositoryMetadata

    public interface RepositoryMetadata

Metadata for repository interfaces.

Author:
  Oliver Gierke, Mark Paluch

### Method Summary

All Methods Instance Methods Abstract Methods
`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.
`Class<?>` `getDomainType()` Returns the domain class the repository is declared for.
`Class<?>` `getIdType()` Returns the id class the given class is declared for.
`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.

### Method Detail

#### getIdType

    Class<?> getIdType()

Returns the id class the given class is declared for.

Returns:
  the id class of the entity managed by the repository.

#### getDomainType

    Class<?> getDomainType()

Returns the domain class the repository is declared for.

Returns:
  the domain class the repository is handling.

#### 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 `Collection`s and `Page` as well.

Parameters:
  `method` -
Returns:
See Also:
  `getReturnType(Method)`

#### 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:
  `Repositories.getRepositoryFor(Class)`

#### 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