1 |
|
package org.kuali.student.core.bo; |
2 |
|
|
3 |
|
import java.util.LinkedHashMap; |
4 |
|
|
5 |
|
import javax.persistence.Column; |
6 |
|
import javax.persistence.Id; |
7 |
|
import javax.persistence.MappedSuperclass; |
8 |
|
|
9 |
|
import org.apache.ojb.broker.PersistenceBroker; |
10 |
|
import org.apache.ojb.broker.PersistenceBrokerException; |
11 |
|
import org.kuali.rice.kns.bo.PersistableBusinessObjectBase; |
12 |
|
import org.kuali.student.common.util.UUIDHelper; |
13 |
|
|
14 |
|
@MappedSuperclass |
|
|
| 0% |
Uncovered Elements: 11 (11) |
Complexity: 4 |
Complexity Density: 0.57 |
|
15 |
|
public abstract class KsBusinessObjectBase extends PersistableBusinessObjectBase implements KsBusinessObject { |
16 |
|
|
17 |
|
private static final long serialVersionUID = 1L; |
18 |
|
|
19 |
|
@Id |
20 |
|
@Column(name = "ID") |
21 |
|
private String id; |
22 |
|
|
23 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
24 |
0
|
@Override... |
25 |
|
public void beforeInsert(PersistenceBroker persistenceBroker) throws PersistenceBrokerException { |
26 |
0
|
this.id = UUIDHelper.genStringUUID(this.id); |
27 |
0
|
super.beforeInsert(persistenceBroker); |
28 |
|
} |
29 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
30 |
0
|
@Override... |
31 |
|
protected LinkedHashMap<String, Object> toStringMapper() { |
32 |
0
|
LinkedHashMap<String, Object> toStringMap = new LinkedHashMap<String, Object>(); |
33 |
|
|
34 |
0
|
toStringMap.put("id", id); |
35 |
|
|
36 |
0
|
return toStringMap; |
37 |
|
} |
38 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
39 |
0
|
public String getId() {... |
40 |
0
|
return id; |
41 |
|
} |
42 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
43 |
0
|
public void setId(String id) {... |
44 |
0
|
this.id = id; |
45 |
|
} |
46 |
|
|
47 |
|
} |