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(Class<?> repositoryInterface)
          Creates a new AnnotationRepositoryMetadata instance looking up repository types from a RepositoryDefinition annotation.
 
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.
 
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(Class<?> repositoryInterface)
Creates a new AnnotationRepositoryMetadata instance looking up repository types from a RepositoryDefinition annotation.

Parameters:
repositoryInterface - must not be null.
Method Detail

getIdType

public Class<? extends Serializable> getIdType()
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.

getDomainType

public Class<?> getDomainType()
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 Class<?> getRepositoryInterface()
Description copied from interface: RepositoryMetadata
Returns the repository interface.

Returns:

Spring Data Commons

Copyright © 2012. All Rights Reserved.