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() |
@Nullable public PK getId()
getId in interface Persistable<PK extends Serializable>protected void setId(@Nullable 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>Persistable.isNew()Copyright © 2011–2020 Pivotal Software, Inc.. All rights reserved.