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
 java.lang.Class<?> getDomainClass()
          Returns the domain class the repository is declared for.
 java.lang.Class<?> getIdClass()
          Returns the id class the given class is declared for.
 java.lang.Class<?> getRepositoryInterface()
          Returns the repository interface.
 java.lang.Class<?> getReturnedDomainClass(java.lang.reflect.Method method)
          Returns the domain class returned by the given Method.
 

Method Detail

getIdClass

java.lang.Class<?> getIdClass()
Returns the id class the given class is declared for.

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

getDomainClass

java.lang.Class<?> getDomainClass()
Returns the domain class the repository is declared for.

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

getRepositoryInterface

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

Returns:

getReturnedDomainClass

java.lang.Class<?> getReturnedDomainClass(java.lang.reflect.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.