1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.rice.kim.impl.common.active |
17 | |
|
18 | |
import java.sql.Timestamp |
19 | |
import javax.persistence.Column |
20 | |
import org.kuali.rice.core.api.mo.common.active.InactivatableFromToUtils |
21 | |
import org.kuali.rice.krad.bo.PersistableBusinessObjectBase |
22 | |
import org.joda.time.DateTime |
23 | |
|
24 | |
public abstract class ActiveFromToBo extends PersistableBusinessObjectBase { |
25 | |
@Column(name = "ACTV_FRM_DT") |
26 | |
Timestamp activeFromDateValue |
27 | |
|
28 | |
@Column(name = "ACTV_TO_DT") |
29 | |
Timestamp activeToDateValue |
30 | |
|
31 | |
boolean isActive(Timestamp activeAsOfDate) { |
32 | 0 | return InactivatableFromToUtils.isActive(getActiveFromDate(), getActiveToDate(), new DateTime(activeAsOfDate.getTime())) |
33 | |
} |
34 | |
|
35 | |
boolean isActive(DateTime activeAsOfDate) { |
36 | 0 | return InactivatableFromToUtils.isActive(getActiveFromDate(), getActiveToDate(), activeAsOfDate) |
37 | |
} |
38 | |
|
39 | |
DateTime getActiveFromDate() { |
40 | 0 | return this.activeFromDateValue == null ? null : new DateTime(this.activeFromDateValue.getTime()) |
41 | |
} |
42 | |
|
43 | |
DateTime getActiveToDate() { |
44 | 0 | return this.activeToDateValue == null ? null : new DateTime(this.activeToDateValue.getTime()) |
45 | |
} |
46 | |
} |