Spring Data Jpa

org.springframework.data.jpa.repository.support
Class JpaRepositoryFactory

java.lang.Object
  extended by org.springframework.data.repository.core.support.RepositoryFactorySupport
      extended by org.springframework.data.jpa.repository.support.JpaRepositoryFactory

public class JpaRepositoryFactory
extends RepositoryFactorySupport

JPA specific generic repository factory.

Author:
Oliver Gierke

Nested Class Summary
 
Nested classes/interfaces inherited from class org.springframework.data.repository.core.support.RepositoryFactorySupport
RepositoryFactorySupport.QueryExecutorMethodInterceptor
 
Constructor Summary
JpaRepositoryFactory(javax.persistence.EntityManager entityManager)
          Creates a new JpaRepositoryFactory.
 
Method Summary
<T,ID extends Serializable>
JpaEntityInformation<T,ID>
getEntityInformation(Class<T> domainClass)
           
protected  QueryLookupStrategy getQueryLookupStrategy(QueryLookupStrategy.Key key)
           
protected  Class<?> getRepositoryBaseClass(RepositoryMetadata metadata)
           
protected  Object getTargetRepository(RepositoryMetadata metadata)
           
protected
<T,ID extends Serializable>
JpaRepository<?,?>
getTargetRepository(RepositoryMetadata metadata, javax.persistence.EntityManager entityManager)
          Callback to create a JpaRepository instance with the given EntityManager
 
Methods inherited from class org.springframework.data.repository.core.support.RepositoryFactorySupport
addQueryCreationListener, addRepositoryProxyPostProcessor, getRepository, getRepository, setNamedQueries, setQueryLookupStrategyKey, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JpaRepositoryFactory

public JpaRepositoryFactory(javax.persistence.EntityManager entityManager)
Creates a new JpaRepositoryFactory.

Parameters:
entityManager - must not be null
Method Detail

getTargetRepository

protected Object getTargetRepository(RepositoryMetadata metadata)
Specified by:
getTargetRepository in class RepositoryFactorySupport

getTargetRepository

protected <T,ID extends Serializable> JpaRepository<?,?> getTargetRepository(RepositoryMetadata metadata,
                                                                             javax.persistence.EntityManager entityManager)
Callback to create a JpaRepository instance with the given EntityManager

Type Parameters:
T -
ID -
Parameters:
entityManager -
Returns:
See Also:
getTargetRepository(RepositoryMetadata)

getRepositoryBaseClass

protected Class<?> getRepositoryBaseClass(RepositoryMetadata metadata)
Specified by:
getRepositoryBaseClass in class RepositoryFactorySupport

getQueryLookupStrategy

protected QueryLookupStrategy getQueryLookupStrategy(QueryLookupStrategy.Key key)
Overrides:
getQueryLookupStrategy in class RepositoryFactorySupport

getEntityInformation

public <T,ID extends Serializable> JpaEntityInformation<T,ID> getEntityInformation(Class<T> domainClass)
Specified by:
getEntityInformation in class RepositoryFactorySupport

Spring Data Jpa

Copyright © 2011-2012 SpringSource. All Rights Reserved.