KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > bsf > smartValueObject > Versionable


1 package org.bsf.smartValueObject;
2
3 /**
4  * Required interface for an object to be versionable.
5  *
6  * @see org.bsf.smartValueObject.Version
7  */

8 public interface Versionable extends java.io.Serializable JavaDoc {
9     /**
10      * Touches the object. Signals that a field has been written to.
11      */

12     void touch();
13
14     /**
15      * Touches the object, detailling which field has been accessed.
16      * @param field which was touched
17      */

18     void touch(String JavaDoc field);
19
20     /**
21      * Mark object for deletion.
22      */

23     void delete();
24
25     /**
26      * Mark object as created.
27      */

28     void create();
29
30     /**
31      * Has object been newly created ?
32      */

33     boolean isCreated();
34
35     /**
36      * Has object been deleted ?
37      */

38     boolean isDeleted();
39
40     /**
41      * Is object dirty ?
42      */

43     boolean isDirty();
44
45     /**
46      * Resets flags.
47      */

48     void markClean();
49
50     /**
51      * Gets the version number.
52      */

53     long getVersionId();
54
55     /**
56      * Sets the version number
57      */

58     void setVersionId(long id);
59 }
60
Popular Tags