public abstract class Entity extends Object implements AutoTrackChanged
| Constructor and Description |
|---|
Entity() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
Date |
getChanged()
Gets the timestamp of when this entity was last changed.
|
Date |
getCreated()
Gets the timestamp of the creation of this entity.
|
long |
getId()
Get the unique identifier of this object.
|
int |
hashCode() |
void |
setChanged(Date changed)
Sets the timestamp of when this entity was last changed.
|
protected void |
setCreated(Date created)
Sets the timestamp of the creation of this entity.
|
String |
toString() |
public Entity()
public long getId()
This identifier is unique per entity type (the first sub-class of this class
having an own table - which is usually the direct sub-class of Entity).
This identifier is assigned when the object is persisted into the DB.
public Date getCreated()
null.protected void setCreated(Date created)
Important: You should normally never invoke this method! The created property
is supposed to be read-only (assigned once during object creation and never again).
This setter merely exists for extraordinary, unforeseen use cases as well as tests.
created - the timestamp of the creation of this entity. Must not be null.public Date getChanged()
AutoTrackChangedgetChanged in interface AutoTrackChangednull.public void setChanged(Date changed)
AutoTrackChangedsetChanged in interface AutoTrackChangedchanged - the timestamp of when this entity was last changed. Must not be null.Copyright © 2013-2014. All Rights Reserved.