|
Spring Data Commons | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.data.repository.core.support.AbstractEntityInformation<T,ID>
org.springframework.data.repository.core.support.PersistableEntityInformation<T,ID>
public class PersistableEntityInformation<T extends Persistable<ID>,ID extends Serializable>
Implementation of EntityMetadata
that assumes the entity handled implements Persistable
and uses
Persistable.isNew()
for the AbstractEntityInformation.isNew(Object)
check.
Constructor Summary | |
---|---|
PersistableEntityInformation(Class<T> domainClass)
Creates a new PersistableEntityInformation . |
Method Summary | |
---|---|
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. |
Methods inherited from class org.springframework.data.repository.core.support.AbstractEntityInformation |
---|
getJavaType |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PersistableEntityInformation(Class<T> domainClass)
PersistableEntityInformation
.
domainClass
- Method Detail |
---|
public boolean isNew(T entity)
EntityInformation
isNew
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 null
public ID getId(T entity)
EntityInformation
entity
- must never be null
public Class<ID> getIdType()
EntityInformation
|
Spring Data Commons | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |