Clover Coverage Report - Kuali Student 1.1.1-SNAPSHOT (Aggregated)
Coverage timestamp: Wed Apr 20 2011 04:04:00 EST
../../../../../img/srcFileCovDistChart8.png 32% of files have more coverage
10   72   10   1
0   51   1   10
10     1  
1    
 
  BaseEntity       Line # 13 10 0% 10 4 80% 0.8
 
  (382)
 
1    package org.kuali.student.core.entity;
2   
3    import javax.persistence.Column;
4    import javax.persistence.Id;
5    import javax.persistence.MappedSuperclass;
6    import javax.persistence.PrePersist;
7    import javax.persistence.PreUpdate;
8    import javax.persistence.Version;
9   
10    import org.kuali.student.common.util.UUIDHelper;
11   
12    @MappedSuperclass
 
13    public abstract class BaseEntity {
14   
15    @Id
16    @Column(name = "ID")
17    private String id;
18   
19    @Version
20    @Column(name="VER_NBR")
21    private Long versionNumber;
22   
23    @Column(name="OBJ_ID",length=KSEntityConstants.OBJ_ID_LENGTH)
24    private String objectId;
25   
 
26  0 toggle public String getObjectId() {
27  0 return objectId;
28    }
29   
 
30  0 toggle public void setObjectId(String objectId) {
31  0 this.objectId = objectId;
32    }
33   
 
34  9421 toggle @PrePersist
35    public void prePersist(){
36    //Auto generate the object id, and auto generate the ID if it's not set
37  9421 this.id = UUIDHelper.genStringUUID(this.id);
38  9421 this.objectId = UUIDHelper.genStringUUID();
39  9421 onPrePersist();
40    }
41   
 
42  1176 toggle @PreUpdate
43    public void preUpdate(){
44  1176 onPreUpdate();
45    }
46   
47   
48    //Override this to add additional functionality for the PrePersist Lifecycle
 
49  9421 toggle protected void onPrePersist() {
50    }
51   
52    //Override this to add additional functionality for the PreUpdate Lifecycle
 
53  1176 toggle protected void onPreUpdate() {
54    }
55   
 
56  6903 toggle public Long getVersionNumber() {
57  6903 return versionNumber;
58    }
59   
 
60  6 toggle public void setVersionNumber(Long versionNumber) {
61  6 this.versionNumber = versionNumber;
62    }
63   
 
64  26699 toggle public String getId() {
65  26699 return id;
66    }
67   
 
68  3550 toggle public void setId(String id) {
69  3550 this.id = id;
70    }
71   
72    }