org.springframework.data.jpa.repository.support
Class JpaMetamodelEntityInformation<T,ID extends Serializable>
java.lang.Object
org.springframework.data.repository.core.support.AbstractEntityInformation<T,ID>
org.springframework.data.jpa.repository.support.JpaEntityInformationSupport<T,ID>
org.springframework.data.jpa.repository.support.JpaMetamodelEntityInformation<T,ID>
- All Implemented Interfaces:
- JpaEntityInformation<T,ID>, org.springframework.data.repository.core.EntityInformation<T,ID>, org.springframework.data.repository.core.EntityMetadata<T>
- Direct Known Subclasses:
- JpaPersistableEntityInformation
public class JpaMetamodelEntityInformation<T,ID extends Serializable>
- extends JpaEntityInformationSupport<T,ID>
Implementation of EntityInformation that uses JPA Metamodel
to find the domain class' id field.
- Author:
- Oliver Gierke
| 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.repository.core.EntityInformation |
isNew |
| Methods inherited from interface org.springframework.data.repository.core.EntityMetadata |
getJavaType |
JpaMetamodelEntityInformation
public JpaMetamodelEntityInformation(Class<T> domainClass,
javax.persistence.metamodel.Metamodel metamodel)
- Creates a new
JpaMetamodelEntityInformation for the given domain class and Metamodel.
- Parameters:
domainClass - must not be null.metamodel - must not be .
getId
public ID getId(T entity)
getIdType
public Class<ID> getIdType()
getIdAttribute
public javax.persistence.metamodel.SingularAttribute<? super T,?> getIdAttribute()
- Description copied from interface:
JpaEntityInformation
- Returns the id attribute of the entity.
- Returns:
Copyright © 2011-2012-2012 SpringSource. All Rights Reserved.