ID
- is the type of the primary key
.public abstract class AbstractRevisionedEntity<ID> extends AbstractGenericEntity<ID> implements MutableRevisionedEntity<ID>
MutableRevisionedEntity
should inherit from
(if possible).Modifier and Type | Field and Description |
---|---|
private Number |
revision |
private static long |
serialVersionUID
UID for serialization.
|
LATEST_REVISION
Constructor and Description |
---|
AbstractRevisionedEntity()
The constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Number |
getRevision()
This method gets the revision of this entity.
|
int |
hashCode() |
void |
setRevision(Number revision)
This method sets the
revision of this entity. |
protected void |
toString(StringBuilder buffer)
Method to extend
Object.toString() logic. |
getId, getModificationCounter, setId, setModificationCounter
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
setId, setModificationCounter
getId, getModificationCounter
private static final long serialVersionUID
private Number revision
getRevision()
public Number getRevision()
latest
revision
of an entity will always return null
. Otherwise this object is a
historic entity and it will be read-only so modifications are NOT permitted.getRevision
in interface RevisionedEntity<ID>
RevisionedEntity.LATEST_REVISION
(null
) if this is the latest revision.public void setRevision(Number revision)
revision
of this entity. setRevision
in interface MutableRevisionedEntity<ID>
revision
- is the new value of RevisionedEntity.getRevision()
.public int hashCode()
hashCode
in class AbstractGenericEntity<ID>
public boolean equals(Object obj)
equals
in class AbstractGenericEntity<ID>
protected void toString(StringBuilder buffer)
Object.toString()
logic.toString
in class AbstractGenericEntity<ID>
buffer
- is the StringBuilder
where to append
the
string representation.Copyright © 2001–2014 mmm-Team. All rights reserved.