1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.kpme.core.bo;
17
18 import java.sql.Timestamp;
19 import java.util.Date;
20
21 import org.joda.time.LocalDate;
22 import org.kuali.kpme.core.api.bo.HrBusinessObjectContract;
23 import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
24
25 public abstract class HrBusinessObject extends PersistableBusinessObjectBase implements HrBusinessObjectContract {
26
27 private static final long serialVersionUID = -5743717258128864335L;
28
29 private Date effectiveDate;
30 private boolean active = true;
31 private Timestamp timestamp;
32
33 public abstract String getId();
34
35 public abstract void setId(String id);
36
37 protected abstract String getUniqueKey();
38
39 public Date getEffectiveDate() {
40 return effectiveDate;
41 }
42
43 public void setEffectiveDate(Date effectiveDate) {
44 this.effectiveDate = effectiveDate;
45 }
46
47 public Date getRelativeEffectiveDate() {
48 return effectiveDate == null ? LocalDate.now().toDate() : effectiveDate;
49 }
50
51 public void setRelativeEffectiveDate(Date relativeEffectiveDate) {
52
53 }
54
55 public LocalDate getEffectiveLocalDate() {
56 return effectiveDate != null ? LocalDate.fromDateFields(effectiveDate) : null;
57 }
58
59 public void setEffectiveLocalDate(LocalDate effectiveLocalDate) {
60 this.effectiveDate = effectiveLocalDate != null ? effectiveLocalDate.toDate() : null;
61 }
62
63 public boolean isActive() {
64 return active;
65 }
66
67 public void setActive(boolean active) {
68 this.active = active;
69 }
70
71 public void setTimestamp(Timestamp timestamp) {
72 this.timestamp = timestamp;
73 }
74
75 public Timestamp getTimestamp() {
76 return timestamp;
77 }
78
79 }