1 |
|
package org.kuali.student.core.bo; |
2 |
|
|
3 |
|
import java.util.Date; |
4 |
|
|
5 |
|
import org.apache.commons.lang.StringUtils; |
6 |
|
import org.apache.ojb.broker.PersistenceBroker; |
7 |
|
import org.apache.ojb.broker.PersistenceBrokerException; |
8 |
|
import org.kuali.rice.kns.service.KNSServiceLocator; |
9 |
|
import org.kuali.rice.kns.util.GlobalVariables; |
10 |
|
|
|
|
| 0% |
Uncovered Elements: 42 (42) |
Complexity: 14 |
Complexity Density: 0.54 |
|
11 |
|
public class KsMetaBusinessObjectBase extends KsBusinessObjectBase implements KsMetaBusinessObject { |
12 |
|
|
13 |
|
private static final long serialVersionUID = -6804800481530556124L; |
14 |
|
|
15 |
|
|
16 |
|
private String createId; |
17 |
|
|
18 |
|
private Date createDate; |
19 |
|
|
20 |
|
private String updateId; |
21 |
|
|
22 |
|
private Date updateDate; |
23 |
|
|
24 |
|
|
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
|
|
|
| 0% |
Uncovered Elements: 6 (6) |
Complexity: 1 |
Complexity Density: 0.17 |
|
30 |
0
|
@Override... |
31 |
|
public Meta getMeta() { |
32 |
0
|
Meta meta = new Meta(); |
33 |
|
|
34 |
0
|
meta.setCreateId(createId); |
35 |
0
|
meta.setCreateTime(createDate); |
36 |
0
|
meta.setUpdateId(updateId); |
37 |
0
|
meta.setUpdateTime(updateDate); |
38 |
|
|
39 |
0
|
return meta; |
40 |
|
} |
41 |
|
|
42 |
|
|
43 |
|
|
44 |
|
|
45 |
|
|
46 |
|
|
47 |
|
|
48 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
49 |
0
|
@Override... |
50 |
|
public void setMeta(Meta meta) { |
51 |
0
|
this.setCreateId(meta.getCreateId()); |
52 |
0
|
this.setCreateDate(meta.getCreateTime()); |
53 |
0
|
this.setUpdateId(meta.getUpdateId()); |
54 |
0
|
this.setUpdateDate(meta.getCreateTime()); |
55 |
|
} |
56 |
|
|
|
|
| 0% |
Uncovered Elements: 9 (9) |
Complexity: 3 |
Complexity Density: 0.6 |
|
57 |
0
|
@Override... |
58 |
|
public void prePersist() throws PersistenceBrokerException { |
59 |
0
|
super.prePersist(); |
60 |
|
|
61 |
0
|
if (StringUtils.isBlank(this.getCreateId())) { |
62 |
0
|
this.setCreateId(GlobalVariables.getUserSession().getPrincipalName()); |
63 |
|
} |
64 |
|
|
65 |
0
|
if (this.getCreateDate() == null) { |
66 |
0
|
this.setCreateDate(KNSServiceLocator.getDateTimeService().getCurrentSqlDate()); |
67 |
|
} |
68 |
|
} |
69 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
70 |
0
|
@Override... |
71 |
|
public void preUpdate() { |
72 |
0
|
super.preUpdate(); |
73 |
|
|
74 |
0
|
this.setUpdateId(GlobalVariables.getUserSession().getPrincipalName()); |
75 |
0
|
this.setUpdateDate(KNSServiceLocator.getDateTimeService().getCurrentSqlDate()); |
76 |
|
} |
77 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
78 |
0
|
public String getCreateId() {... |
79 |
0
|
return createId; |
80 |
|
} |
81 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
82 |
0
|
public void setCreateId(String createId) {... |
83 |
0
|
this.createId = createId; |
84 |
|
} |
85 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
86 |
0
|
public Date getCreateDate() {... |
87 |
0
|
return createDate; |
88 |
|
} |
89 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
90 |
0
|
public void setCreateDate(Date createDate) {... |
91 |
0
|
this.createDate = createDate; |
92 |
|
} |
93 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
94 |
0
|
public String getUpdateId() {... |
95 |
0
|
return updateId; |
96 |
|
} |
97 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
98 |
0
|
public void setUpdateId(String updateId) {... |
99 |
0
|
this.updateId = updateId; |
100 |
|
} |
101 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
102 |
0
|
public Date getUpdateDate() {... |
103 |
0
|
return updateDate; |
104 |
|
} |
105 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
106 |
0
|
public void setUpdateDate(Date updateDate) {... |
107 |
0
|
this.updateDate = updateDate; |
108 |
|
} |
109 |
|
|
110 |
|
} |