|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.synyx.hades.domain.AbstractPersistable<PK>
PK - the tpe of the entity@MappedSuperclass public abstract class AbstractPersistable<PK extends java.io.Serializable>
Abstract base class for entities. Allows parameterization of id type and offers a flag determining the "new" state of the entity.
| Constructor Summary | |
|---|---|
AbstractPersistable()
|
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
|
PK |
getId()
Returns the id of the entity. |
int |
hashCode()
|
boolean |
isNew()
Returns if the Persistable is new or was persisted already. |
protected void |
setId(PK id)
Sets the id of the entity. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractPersistable()
| Method Detail |
|---|
public PK getId()
Persistable
getId in interface Persistable<PK extends java.io.Serializable>protected void setId(PK id)
id - the id to setpublic boolean isNew()
PersistablePersistable is new or was persisted already.
isNew in interface Persistable<PK extends java.io.Serializable>public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||