public class PersistentEntityInformation<T,ID> extends Object implements EntityInformation<T,ID>
EntityInformation implementation that uses a PersistentEntity to obtain id type information and uses
a IdentifierAccessor to access the property value if requested.| Constructor and Description |
|---|
PersistentEntityInformation(PersistentEntity<T,? extends PersistentProperty<?>> persistentEntity) |
| Modifier and Type | Method and Description |
|---|---|
ID |
getId(T entity)
Returns the id of the given entity or null if none can be obtained.
|
Class<ID> |
getIdType()
Returns the type of the id of the entity.
|
Class<T> |
getJavaType()
Returns the actual domain class type.
|
boolean |
isNew(T entity)
Returns whether the given entity is considered to be new.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetRequiredIdpublic PersistentEntityInformation(PersistentEntity<T,? extends PersistentProperty<?>> persistentEntity)
public boolean isNew(T entity)
EntityInformationisNew in interface EntityInformation<T,ID>entity - must never be null@Nullable public ID getId(T entity)
EntityInformationgetId in interface EntityInformation<T,ID>entity - must never be nullpublic Class<T> getJavaType()
EntityMetadatagetJavaType in interface EntityMetadata<T>public Class<ID> getIdType()
EntityInformationgetIdType in interface EntityInformation<T,ID>Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.