public class PersistableEntityInformation<T extends Persistable<ID>,ID extends Serializable> extends AbstractEntityInformation<T,ID>
EntityMetadata that assumes the entity handled implements Persistable and uses
Persistable.isNew() for the AbstractEntityInformation.isNew(Object) check.| Constructor and Description |
|---|
PersistableEntityInformation(Class<T> domainClass)
Creates a new
PersistableEntityInformation. |
| Modifier and Type | Method and Description |
|---|---|
ID |
getId(T entity)
Returns the id of the given entity.
|
Class<ID> |
getIdType()
Returns the type of the id of the entity.
|
boolean |
isNew(T entity)
Returns whether the given entity is considered to be new.
|
getJavaTypepublic PersistableEntityInformation(Class<T> domainClass)
PersistableEntityInformation.domainClass - public boolean isNew(T entity)
EntityInformationisNew in interface EntityInformation<T extends Persistable<ID>,ID extends Serializable>isNew in class AbstractEntityInformation<T extends Persistable<ID>,ID extends Serializable>entity - must never be nullpublic ID getId(T entity)
EntityInformationentity - must never be nullpublic Class<ID> getIdType()
EntityInformationCopyright © 2011-2015–2016 Pivotal Software, Inc.. All rights reserved.