|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.bsf.smartValueObject.Version
Concrete default implementation of Versionable.
Versioning is done with timestamping.
Field Summary | |
private boolean |
created
|
private boolean |
debug
|
private boolean |
deleted
|
private boolean |
dirty
|
private long |
timestamp
|
Constructor Summary | |
Version()
Creates a clean version. |
|
Version(java.lang.Object o)
No specific purpose constructor, needed to satisfy a javassist requirement. |
Method Summary | |
void |
create()
Mark object as created. |
void |
delete()
Mark object for deletion. |
long |
getVersionId()
Gets the version number. |
boolean |
isCreated()
Has object been newly created ? |
boolean |
isDeleted()
Has object been deleted ? |
boolean |
isDirty()
Is object dirty ? |
void |
markClean()
Resets flags. |
void |
setVersionId(long id)
Sets the version number |
java.lang.String |
toString()
|
void |
touch()
Touches the object. |
void |
touch(java.lang.String field)
Touches the object, detailling which field has been accessed. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private long timestamp
private boolean dirty
private boolean created
private boolean deleted
private final boolean debug
Constructor Detail |
public Version()
public Version(java.lang.Object o)
o
- ignoredMethod Detail |
public void touch()
Versionable
touch
in interface Versionable
public void touch(java.lang.String field)
Versionable
touch
in interface Versionable
field
- which was touchedpublic void delete()
Versionable
delete
in interface Versionable
public void create()
Versionable
create
in interface Versionable
public boolean isCreated()
Versionable
isCreated
in interface Versionable
public boolean isDeleted()
Versionable
isDeleted
in interface Versionable
public boolean isDirty()
Versionable
isDirty
in interface Versionable
public void markClean()
Versionable
markClean
in interface Versionable
public long getVersionId()
getVersionId
in interface Versionable
public void setVersionId(long id)
setVersionId
in interface Versionable
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |