| 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 |
|
|
|
| 0% |
Uncovered Elements: 20 (20) |
Complexity: 10 |
Complexity Density: 1 |
|
| 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 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 26 |
0
|
public String getObjectId() {... |
| 27 |
0
|
return objectId; |
| 28 |
|
} |
| 29 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 30 |
0
|
public void setObjectId(String objectId) {... |
| 31 |
0
|
this.objectId = objectId; |
| 32 |
|
} |
| 33 |
|
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
| 34 |
0
|
@PrePersist... |
| 35 |
|
public void prePersist(){ |
| 36 |
|
|
| 37 |
0
|
this.id = UUIDHelper.genStringUUID(this.id); |
| 38 |
0
|
this.objectId = UUIDHelper.genStringUUID(); |
| 39 |
0
|
onPrePersist(); |
| 40 |
|
} |
| 41 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 42 |
0
|
@PreUpdate... |
| 43 |
|
public void preUpdate(){ |
| 44 |
0
|
onPreUpdate(); |
| 45 |
|
} |
| 46 |
|
|
| 47 |
|
|
| 48 |
|
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
| 49 |
0
|
protected void onPrePersist() {... |
| 50 |
|
} |
| 51 |
|
|
| 52 |
|
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
| 53 |
0
|
protected void onPreUpdate() {... |
| 54 |
|
} |
| 55 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 56 |
0
|
public Long getVersionNumber() {... |
| 57 |
0
|
return versionNumber; |
| 58 |
|
} |
| 59 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 60 |
0
|
public void setVersionNumber(Long versionNumber) {... |
| 61 |
0
|
this.versionNumber = versionNumber; |
| 62 |
|
} |
| 63 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 64 |
0
|
public String getId() {... |
| 65 |
0
|
return id; |
| 66 |
|
} |
| 67 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 68 |
0
|
public void setId(String id) {... |
| 69 |
0
|
this.id = id; |
| 70 |
|
} |
| 71 |
|
|
| 72 |
|
} |