01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package org.bpmscript;
18:
19: import java.sql.Timestamp;
20:
21: public class TimeStampedIdentity extends Identity implements
22: ITimeStampedIdentity {
23:
24: private static final long serialVersionUID = -2030995506141168229L;
25:
26: private Timestamp lastModified = new Timestamp(System
27: .currentTimeMillis());
28: private Timestamp creationDate = new Timestamp(System
29: .currentTimeMillis());
30:
31: public TimeStampedIdentity(String id, Timestamp lastModified,
32: Timestamp creationDate) {
33: super (id);
34: this .lastModified = lastModified;
35: this .creationDate = creationDate;
36: }
37:
38: public TimeStampedIdentity(ITimeStampedIdentity timeStampedIdentity) {
39: this (timeStampedIdentity.getId(), timeStampedIdentity
40: .getLastModified(), timeStampedIdentity
41: .getCreationDate());
42: }
43:
44: public Timestamp getCreationDate() {
45: return creationDate;
46: }
47:
48: public void setCreationDate(Timestamp creationDate) {
49: this .creationDate = creationDate;
50: }
51:
52: public Timestamp getLastModified() {
53: return lastModified;
54: }
55:
56: public void setLastModified(Timestamp lastModified) {
57: this .lastModified = lastModified;
58: }
59:
60: public TimeStampedIdentity() {
61: super();
62: }
63: }
|