01: package org.lateralnz.common.model;
02:
03: import java.io.Serializable;
04:
05: public class TimestampedObject implements Serializable {
06:
07: private long timeCreated = System.currentTimeMillis();
08: private long timeUpdated = timeCreated;
09: public Object obj = null;
10:
11: public TimestampedObject() {
12: }
13:
14: public TimestampedObject(Object obj) {
15: this .obj = obj;
16: }
17:
18: public void timestamp() {
19: timeUpdated = System.currentTimeMillis();
20: }
21:
22: public long getTimeCreated() {
23: return timeCreated;
24: }
25:
26: public long getTimeUpdated() {
27: return timeUpdated;
28: }
29: }
|