View Javadoc

1   /*
2    * Copyright 2004 Carlos Sanchez.
3    * 
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * 
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    * 
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package net.sf.oness.common.model.auditing;
17  
18  import net.sf.oness.common.all.BaseObject;
19  import net.sf.oness.common.model.auditing.Auditable;
20  import net.sf.oness.common.model.temporal.DateRange;
21  
22  /***
23   * Basic auditable object
24   * 
25   * @author Carlos Sanchez
26   * @version $Revision: 1.1 $
27   */
28  public abstract class AbstractAuditableObject extends BaseObject implements
29          Auditable {
30  
31      private DateRange transactionTime = DateRange.startingOn(null);
32  
33      private Long id, code;
34  
35      private String createdBy, deletedBy;
36  
37      /***
38       * @return the id
39       */
40      public Long getId() {
41          return this.id;
42      }
43  
44      public void setId(Long id) {
45          this.id = id;
46      }
47  
48      /***
49       * @param code
50       *            The code to set.
51       */
52      public void setCode(Long code) {
53          this.code = code;
54      }
55  
56      /***
57       * @return Returns the code.
58       */
59      public Long getCode() {
60          return code;
61      }
62  
63      public void setTransactionTime(DateRange transactionTime) {
64          this.transactionTime = transactionTime;
65      }
66  
67      /***
68       * @see net.sf.oness.common.model.auditing.Auditable#getTransactionTime()
69       */
70      public DateRange getTransactionTime() {
71          return transactionTime;
72      }
73  
74      public void setCreatedBy(String userName) {
75          this.createdBy = userName;
76      }
77  
78      /***
79       * @see net.sf.oness.common.model.auditing.Auditable#getCreatedBy()
80       */
81      public String getCreatedBy() {
82          return createdBy;
83      }
84  
85      public void setDeletedBy(String userName) {
86          this.deletedBy = userName;
87      }
88  
89      /***
90       * @see net.sf.oness.common.model.auditing.Auditable#getDeletedBy()
91       */
92      public String getDeletedBy() {
93          return deletedBy;
94      }
95  
96  }