Spring Data Commons

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

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

public class DefaultRepositoryMetadata
extends Object
implements RepositoryMetadata

Default implementation of RepositoryMetadata. Will inspect generic types of Repository to find out about domain and id class.

Author:
Oliver Gierke

Constructor Summary
DefaultRepositoryMetadata(Class<?> repositoryInterface)
          Creates a new DefaultRepositoryMetadata for the given repository interface.
 
Method Summary
 Class<?> getDomainClass()
          Returns the domain class the repository is declared for.
 Class<?> getIdClass()
          Returns the id class the given class is declared for.
 Class<?> getRepositoryInterface()
          Returns the repository interface.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultRepositoryMetadata

public DefaultRepositoryMetadata(Class<?> repositoryInterface)
Creates a new DefaultRepositoryMetadata for the given repository interface.

Parameters:
repositoryInterface -
Method Detail

getRepositoryInterface

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

Specified by:
getRepositoryInterface in interface RepositoryMetadata
Returns:

getDomainClass

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

Specified by:
getDomainClass in interface RepositoryMetadata
Returns:
the domain class the repository is handling or null if none found.

getIdClass

public Class<?> getIdClass()
Description copied from interface: RepositoryMetadata
Returns the id class the given class is declared for.

Specified by:
getIdClass in interface RepositoryMetadata
Returns:
the id class of the entity managed by the repository for or null if none found.

Spring Data Commons

Copyright © 2011. All Rights Reserved.