1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
package org.kuali.student.common.entity; |
10 |
|
|
11 |
|
import javax.persistence.Embedded; |
12 |
|
import javax.persistence.MappedSuperclass; |
13 |
|
|
14 |
|
import org.kuali.student.common.util.UUIDHelper; |
15 |
|
|
16 |
|
@MappedSuperclass |
|
|
| 0% |
Uncovered Elements: 15 (15) |
Complexity: 5 |
Complexity Density: 0.62 |
|
17 |
|
public abstract class VersionEntity extends MetaEntity { |
18 |
|
|
19 |
|
@Embedded |
20 |
|
private Version version; |
21 |
|
|
|
|
| 0% |
Uncovered Elements: 10 (10) |
Complexity: 3 |
Complexity Density: 0.5 |
|
22 |
0
|
@Override... |
23 |
|
protected void onPrePersist(){ |
24 |
0
|
super.onPrePersist(); |
25 |
0
|
if(version == null){ |
26 |
0
|
version = new Version(); |
27 |
|
} |
28 |
0
|
if(version.getSequenceNumber()==null){ |
29 |
0
|
version.setSequenceNumber(Long.valueOf(1)); |
30 |
|
} |
31 |
0
|
version.setVersionIndId(UUIDHelper.genStringUUID(version.getVersionIndId())); |
32 |
|
} |
33 |
|
|
34 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
35 |
0
|
public Version getVersion() {... |
36 |
0
|
return version; |
37 |
|
} |
38 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
39 |
0
|
public void setVersion(Version version) {... |
40 |
0
|
this.version = version; |
41 |
|
} |
42 |
|
} |