1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package net.sf.oness.common.model.auditing;
17
18 import net.sf.oness.common.model.temporal.DateRange;
19
20 /***
21 * Interface to be implemented by business objects that allow data auditing
22 *
23 * @author Carlos Sanchez
24 * @version $Revision: 1.3 $
25 */
26 public interface Auditable {
27
28 /***
29 * The identifier of each version of each object
30 *
31 * @return
32 */
33 public Long getId();
34
35 /***
36 *
37 * @param id
38 */
39 public void setId(Long id);
40
41 /***
42 * @param code
43 * The code to set.
44 */
45 public void setCode(Long code);
46
47 /***
48 * The code that identifies all versions of the same object
49 *
50 * @return Returns the code.
51 */
52 public Long getCode();
53
54 /***
55 *
56 * @param transactionTime
57 */
58 public void setTransactionTime(DateRange transactionTime);
59
60 /***
61 * Range of time when the data is entered into the system
62 *
63 * @return
64 */
65 public DateRange getTransactionTime();
66
67 /***
68 * Set the user that created this object
69 *
70 * @param userName
71 */
72 public void setCreatedBy(String userName);
73
74 /***
75 * Get the user that created this object
76 *
77 * @return Returns the userName.
78 */
79 public String getCreatedBy();
80
81 /***
82 * Set the user that deleted this object
83 *
84 * @param userName
85 */
86 public void setDeletedBy(String userName);
87
88 /***
89 * Get the user that deleted this object
90 *
91 * @return Returns the userName.
92 */
93 public String getDeletedBy();
94
95 /***
96 * Cloned objects can't share collection references.
97 *
98 * @see java.lang.Object#clone()
99 */
100 public Object clone();
101
102 }