Spring Data Jpa

org.springframework.data.jpa.repository.support
Class JpaEntityInformationSupport<T,ID extends Serializable>

java.lang.Object
  extended by org.springframework.data.repository.core.support.AbstractEntityInformation<T,ID>
      extended by org.springframework.data.jpa.repository.support.JpaEntityInformationSupport<T,ID>
All Implemented Interfaces:
JpaEntityInformation<T,ID>, EntityInformation<T,ID>, EntityMetadata<T>
Direct Known Subclasses:
JpaMetamodelEntityInformation

public abstract class JpaEntityInformationSupport<T,ID extends Serializable>
extends AbstractEntityInformation<T,ID>
implements JpaEntityInformation<T,ID>

Base class for JpaEntityInformation implementations to share common method implementations.

Author:
Oliver Gierke

Constructor Summary
JpaEntityInformationSupport(Class<T> domainClass)
          Creates a new JpaEntityInformationSupport with the given domain class.
 
Method Summary
 String getEntityName()
          Returns the JPA entity name.
static
<T> JpaEntityInformation<T,?>
getMetadata(Class<T> domainClass, javax.persistence.EntityManager em)
          Creates a JpaEntityInformation for the given domain class and EntityManager.
 
Methods inherited from class org.springframework.data.repository.core.support.AbstractEntityInformation
getJavaType, isNew
 
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.jpa.repository.support.JpaEntityInformation
getIdAttribute
 
Methods inherited from interface org.springframework.data.repository.core.EntityInformation
getId, getIdType, isNew
 
Methods inherited from interface org.springframework.data.repository.core.EntityMetadata
getJavaType
 

Constructor Detail

JpaEntityInformationSupport

public JpaEntityInformationSupport(Class<T> domainClass)
Creates a new JpaEntityInformationSupport with the given domain class.

Parameters:
domainClass - must not be null.
Method Detail

getMetadata

public static <T> JpaEntityInformation<T,?> getMetadata(Class<T> domainClass,
                                                        javax.persistence.EntityManager em)
Creates a JpaEntityInformation for the given domain class and EntityManager.

Parameters:
domainClass - must not be null.
em - must not be null.
Returns:

getEntityName

public String getEntityName()
Description copied from interface: JpaEntityInformation
Returns the JPA entity name.

Specified by:
getEntityName in interface JpaEntityInformation<T,ID extends Serializable>
Returns:

Spring Data Jpa

Copyright © 2011-2012-2012 SpringSource. All Rights Reserved.