Spring Data Core

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

java.lang.Object
  extended by org.springframework.data.repository.core.support.AbstractRepositoryMetadata
All Implemented Interfaces:
RepositoryMetadata
Direct Known Subclasses:
AnnotationRepositoryMetadata, DefaultRepositoryMetadata

public abstract class AbstractRepositoryMetadata
extends Object
implements RepositoryMetadata

Base class for RepositoryMetadata implementations.

Author:
Oliver Gierke, Thomas Darimont

Constructor Summary
AbstractRepositoryMetadata(Class<?> repositoryInterface)
          Creates a new AbstractRepositoryMetadata.
 
Method Summary
 CrudMethods getCrudMethods()
          Returns CrudMethods meta information for the repository.
 Class<?> getRepositoryInterface()
          Returns the repository interface.
 Class<?> getReturnedDomainClass(Method method)
          Returns the domain class returned by the given Method.
 boolean isPagingRepository()
          Returns whether the repository is a paging one.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.springframework.data.repository.core.RepositoryMetadata
getDomainType, getIdType
 

Constructor Detail

AbstractRepositoryMetadata

public AbstractRepositoryMetadata(Class<?> repositoryInterface)
Creates a new AbstractRepositoryMetadata.

Parameters:
repositoryInterface - must not be null and must be an interface.
Method Detail

getReturnedDomainClass

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

Specified by:
getReturnedDomainClass in interface RepositoryMetadata
Returns:

getRepositoryInterface

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

Specified by:
getRepositoryInterface in interface RepositoryMetadata
Returns:

getCrudMethods

public CrudMethods getCrudMethods()
Description copied from interface: RepositoryMetadata
Returns CrudMethods meta information for the repository.

Specified by:
getCrudMethods in interface RepositoryMetadata
Returns:

isPagingRepository

public boolean isPagingRepository()
Description copied from interface: RepositoryMetadata
Returns whether the repository is a paging one.

Specified by:
isPagingRepository in interface RepositoryMetadata
Returns:

Spring Data Core

Copyright © 2011-2014–2014 Pivotal Software, Inc.. All rights reserved.