Spring Data Core

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

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

public interface Persistable<ID extends Serializable>
extends Serializable

Simple interface for entities.

Author:
Oliver Gierke

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

Method Detail

getId

ID 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 Core

Copyright © 2011-2013-2013 Pivotal. All Rights Reserved.