Spring Data Commmons

org.springframework.data.repository.support
Class PersistableEntityInformation

java.lang.Object
  extended by 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

Constructor Summary
PersistableEntityInformation()
           
 
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
 

Constructor Detail

PersistableEntityInformation

public PersistableEntityInformation()
Method Detail

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:

Spring Data Commmons

Copyright © 2011. All Rights Reserved.