org.springframework.data.repository.support
Class PersistableEntityInformation
java.lang.Object
org.springframework.data.repository.support.PersistableEntityInformation
- All Implemented Interfaces:
- IdAware, IsNewAware
public class PersistableEntityInformation
- extends Object
- implements IsNewAware, IdAware
Implementation of IsNewAware
that assumes the entity handled
implements Persistable
and uses Persistable.isNew()
for the
isNew(Object)
check.
- Author:
- Oliver Gierke
Method Summary |
Object |
getId(Object entity)
Returns the id of the given entity. |
boolean |
isNew(Object entity)
Returns whether the given entity is considered to be new. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PersistableEntityInformation
public PersistableEntityInformation()
isNew
public boolean isNew(Object entity)
- Description copied from interface:
IsNewAware
- Returns whether the given entity is considered to be new.
- Specified by:
isNew
in interface IsNewAware
- Returns:
getId
public Object getId(Object entity)
- Description copied from interface:
IdAware
- Returns the id of the given entity.
- Specified by:
getId
in interface IdAware
- Returns:
Copyright © 2011. All Rights Reserved.