Spring Data Commons

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

Method Summary
 Class<?> getDomainType()
          Returns the domain class the repository is declared for.
 Class<? extends Serializable> 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.
 

Method Detail

getIdType

Class<? extends Serializable> getIdType()
Returns the id class the given class is declared for.

Returns:
the id class of the entity managed by the repository for or null if none found.

getDomainType

Class<?> getDomainType()
Returns the domain class the repository is declared for.

Returns:
the domain class the repository is handling or null if none found.

getRepositoryInterface

Class<?> getRepositoryInterface()
Returns the repository interface.

Returns:

getReturnedDomainClass

Class<?> getReturnedDomainClass(Method method)
Returns the domain class returned by the given Method. Will extract the type from Collections and Page as well.

Parameters:
method -
Returns:

Spring Data Commons

Copyright © 2012. All Rights Reserved.