public class JpaMetamodelEntityInformation<T,ID> extends JpaEntityInformationSupport<T,ID>
EntityInformation that uses JPA Metamodel
to find the domain class' id field.| Constructor and Description |
|---|
JpaMetamodelEntityInformation(Class<T> domainClass,
javax.persistence.metamodel.Metamodel metamodel)
Creates a new
JpaMetamodelEntityInformation for the given domain class and Metamodel. |
| Modifier and Type | Method and Description |
|---|---|
Object |
getCompositeIdAttributeValue(Object id,
String idAttribute)
Extracts the value for the given id attribute from a composite id
|
String |
getEntityName()
Returns the name of the entity.
|
ID |
getId(T entity) |
javax.persistence.metamodel.SingularAttribute<? super T,?> |
getIdAttribute()
Returns the id attribute of the entity.
|
Iterable<String> |
getIdAttributeNames()
Returns the attribute names of the id attributes.
|
Class<ID> |
getIdType() |
boolean |
hasCompositeId()
Returns true if the entity has a composite id.
|
boolean |
isNew(T entity) |
getEntityInformationgetJavaTypeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetRequiredIdAttributegetRequiredIdgetJavaTypepublic JpaMetamodelEntityInformation(Class<T> domainClass, javax.persistence.metamodel.Metamodel metamodel)
JpaMetamodelEntityInformation for the given domain class and Metamodel.domainClass - must not be null.metamodel - must not be null.public String getEntityName()
JpaEntityMetadatagetEntityName in interface JpaEntityMetadata<T>getEntityName in class JpaEntityInformationSupport<T,ID>public javax.persistence.metamodel.SingularAttribute<? super T,?> getIdAttribute()
JpaEntityInformationpublic boolean hasCompositeId()
JpaEntityInformationpublic Iterable<String> getIdAttributeNames()
JpaEntityInformationpublic Object getCompositeIdAttributeValue(Object id, String idAttribute)
JpaEntityInformationpublic boolean isNew(T entity)
isNew in interface EntityInformation<T,ID>isNew in class AbstractEntityInformation<T,ID>Copyright © 2011–2020 Pivotal Software, Inc.. All rights reserved.