|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Version
Version marks a NakedObject as being a particular variant of that object.
This is normally done using some form of incrementing number or timestamp, which would be held within the implementing class. The numbers, timestamps, etc should change for each changed object, and the different() method shoud indicate that the two Version objects are different.
The user's name and a timestamp should alos be kept so that when an message is passed to the user it can be of the form "user has change object at time"
| Method Summary | |
|---|---|
boolean |
different(Version version)
Compares this version against the specified version and returns true if they are different versions. |
java.util.Date |
getTime()
Returns the time of the last change. |
java.lang.String |
getUser()
Returns the user who made the last change. |
java.lang.String |
sequence()
Returns the sequence for printing/display |
| Method Detail |
|---|
boolean different(Version version)
This is use for optimistic checking, where the existence of a different version will normally cause a concurrency exception.
java.lang.String getUser()
java.util.Date getTime()
java.lang.String sequence()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||