1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.rice.krad.bo; |
17 | |
|
18 | |
import org.kuali.rice.core.api.mo.common.active.InactivatableFromToUtils; |
19 | |
|
20 | |
import javax.persistence.Column; |
21 | |
import javax.persistence.MappedSuperclass; |
22 | |
import javax.persistence.Transient; |
23 | |
import java.sql.Timestamp; |
24 | |
|
25 | |
|
26 | |
|
27 | |
|
28 | |
@MappedSuperclass |
29 | 0 | public abstract class InactivatableFromToImpl extends PersistableBusinessObjectBase implements InactivatableFromTo { |
30 | |
|
31 | |
private static final long serialVersionUID = 1L; |
32 | |
|
33 | |
@Column(name = "ACTV_FRM_DT") |
34 | |
protected Timestamp activeFromDate; |
35 | |
@Column(name = "ACTV_TO_DT") |
36 | |
protected Timestamp activeToDate; |
37 | |
@Transient |
38 | |
protected Timestamp activeAsOfDate; |
39 | |
@Transient |
40 | |
protected boolean current; |
41 | |
|
42 | |
|
43 | |
|
44 | |
|
45 | |
|
46 | |
public boolean isActive() { |
47 | 0 | return InactivatableFromToUtils.isActive(activeFromDate, activeToDate, activeAsOfDate); |
48 | |
} |
49 | |
|
50 | |
public void setActive(boolean active) { |
51 | |
|
52 | 0 | } |
53 | |
|
54 | |
public void setActiveFromDate(Timestamp from) { |
55 | 0 | this.activeFromDate = from; |
56 | 0 | } |
57 | |
|
58 | |
public void setActiveToDate(Timestamp to) { |
59 | 0 | this.activeToDate = to; |
60 | 0 | } |
61 | |
|
62 | |
public Timestamp getActiveFromDate() { |
63 | 0 | return this.activeFromDate; |
64 | |
} |
65 | |
|
66 | |
public Timestamp getActiveToDate() { |
67 | 0 | return this.activeToDate; |
68 | |
} |
69 | |
|
70 | |
public Timestamp getActiveAsOfDate() { |
71 | 0 | return this.activeAsOfDate; |
72 | |
} |
73 | |
|
74 | |
public void setActiveAsOfDate(Timestamp activeAsOfDate) { |
75 | 0 | this.activeAsOfDate = activeAsOfDate; |
76 | 0 | } |
77 | |
|
78 | |
public boolean isCurrent() { |
79 | 0 | return this.current; |
80 | |
} |
81 | |
|
82 | |
public void setCurrent(boolean current) { |
83 | 0 | this.current = current; |
84 | 0 | } |
85 | |
} |