Clover Coverage Report - Kuali Student 1.3.0-SNAPSHOT (Aggregated)
Coverage timestamp: Thu Apr 28 2011 05:03:32 EDT
../../../../../img/srcFileCovDistChart0.png 2% of files have more coverage
10   72   10   1
0   51   1   10
10     1  
1    
 
  BaseEntity       Line # 13 10 0% 10 20 0% 0.0
 
No Tests
 
1    package org.kuali.student.common.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  0 toggle @PrePersist
35    public void prePersist(){
36    //Auto generate the object id, and auto generate the ID if it's not set
37  0 this.id = UUIDHelper.genStringUUID(this.id);
38  0 this.objectId = UUIDHelper.genStringUUID();
39  0 onPrePersist();
40    }
41   
 
42  0 toggle @PreUpdate
43    public void preUpdate(){
44  0 onPreUpdate();
45    }
46   
47   
48    //Override this to add additional functionality for the PrePersist Lifecycle
 
49  0 toggle protected void onPrePersist() {
50    }
51   
52    //Override this to add additional functionality for the PreUpdate Lifecycle
 
53  0 toggle protected void onPreUpdate() {
54    }
55   
 
56  0 toggle public Long getVersionNumber() {
57  0 return versionNumber;
58    }
59   
 
60  0 toggle public void setVersionNumber(Long versionNumber) {
61  0 this.versionNumber = versionNumber;
62    }
63   
 
64  0 toggle public String getId() {
65  0 return id;
66    }
67   
 
68  0 toggle public void setId(String id) {
69  0 this.id = id;
70    }
71   
72    }