Spring Data Commons

org.springframework.data.repository.core.support
Class AnnotationRepositoryMetadata

java.lang.Object
  extended by org.springframework.data.repository.core.support.AbstractRepositoryMetadata
      extended by org.springframework.data.repository.core.support.AnnotationRepositoryMetadata
All Implemented Interfaces:
RepositoryMetadata

public class AnnotationRepositoryMetadata
extends AbstractRepositoryMetadata

RepositoryMetadata implementation inspecting the given repository interface for a RepositoryDefinition annotation.

Author:
Oliver Gierke

Constructor Summary
AnnotationRepositoryMetadata(java.lang.Class<?> repositoryInterface)
          Creates a new AnnotationRepositoryMetadata instance looking up repository types from a RepositoryDefinition annotation.
 
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.
 
Methods inherited from class org.springframework.data.repository.core.support.AbstractRepositoryMetadata
getReturnedDomainClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationRepositoryMetadata

public AnnotationRepositoryMetadata(java.lang.Class<?> repositoryInterface)
Creates a new AnnotationRepositoryMetadata instance looking up repository types from a RepositoryDefinition annotation.

Parameters:
repositoryInterface - must not be null.
Method Detail

getIdClass

public java.lang.Class<?> getIdClass()
Description copied from interface: RepositoryMetadata
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.

getDomainClass

public java.lang.Class<?> getDomainClass()
Description copied from interface: RepositoryMetadata
Returns the domain class the repository is declared for.

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

getRepositoryInterface

public java.lang.Class<?> getRepositoryInterface()
Description copied from interface: RepositoryMetadata
Returns the repository interface.

Returns:

Spring Data Commons

Copyright © 2012. All Rights Reserved.