PK
- the type of the identifier.@MappedSuperclass public abstract class AbstractPersistable<PK extends Serializable> extends Object implements Persistable<PK>
equals(Object)
and hashCode()
based on that id.Constructor and Description |
---|
AbstractPersistable() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
PK |
getId() |
int |
hashCode() |
boolean |
isNew()
Must be
Transient in order to ensure that no JPA provider complains because of a missing setter. |
protected void |
setId(PK id)
Sets the id of the entity.
|
String |
toString() |
public PK getId()
getId
in interface Persistable<PK extends Serializable>
protected void setId(PK id)
id
- the id to setpublic boolean isNew()
Transient
in order to ensure that no JPA provider complains because of a missing setter.isNew
in interface Persistable<PK extends Serializable>
DATAJPA-622
,
Persistable.isNew()
Copyright © 2011-2015–2016 Pivotal Software, Inc.. All rights reserved.