Spring Data Commmons

org.springframework.data.domain
Interface Persistable<PK extends Serializable>

Type Parameters:
PK - the type of the identifier
All Superinterfaces:
Serializable
All Known Subinterfaces:
Auditable<U,PK>

public interface Persistable<PK extends Serializable>
extends Serializable

Simple interface for entities.

Author:
Oliver Gierke

Method Summary
 PK getId()
          Returns the id of the entity.
 boolean isNew()
          Returns if the Persistable is new or was persisted already.
 

Method Detail

getId

PK getId()
Returns the id of the entity.

Returns:
the id

isNew

boolean isNew()
Returns if the Persistable is new or was persisted already.

Returns:
if the object is new

Spring Data Commmons

Copyright © 2011. All Rights Reserved.