1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.student.enrollment.class1.lpr.model; |
17 | |
|
18 | |
import javax.persistence.Column; |
19 | |
import javax.persistence.Id; |
20 | |
import javax.persistence.MappedSuperclass; |
21 | |
import javax.persistence.PrePersist; |
22 | |
|
23 | |
import org.kuali.student.common.util.UUIDHelper; |
24 | |
|
25 | |
|
26 | |
|
27 | |
|
28 | |
|
29 | |
|
30 | |
|
31 | |
|
32 | |
|
33 | |
|
34 | |
@MappedSuperclass |
35 | |
public abstract class AbstractResultValueGroupEntity { |
36 | |
|
37 | |
@Id |
38 | |
@Column(name = "ID") |
39 | |
private String id; |
40 | |
|
41 | |
@Column (name="RESULT_VAL_GRP_ID", nullable=false) |
42 | |
private String resultValueGroupId; |
43 | |
|
44 | |
@PrePersist |
45 | |
public void prePersist() { |
46 | 0 | this.id = UUIDHelper.genStringUUID(); |
47 | 0 | } |
48 | |
|
49 | 0 | public AbstractResultValueGroupEntity() { |
50 | 0 | } |
51 | |
|
52 | |
public AbstractResultValueGroupEntity(String resultValueGroupId) { |
53 | 0 | this(); |
54 | |
|
55 | 0 | setResultValueGroupId(resultValueGroupId); |
56 | 0 | } |
57 | |
|
58 | |
public String getId() { |
59 | 0 | return id; |
60 | |
} |
61 | |
|
62 | |
public void setId(String id) { |
63 | 0 | this.id = id; |
64 | 0 | } |
65 | |
|
66 | |
public String getResultValueGroupId() { |
67 | 0 | return resultValueGroupId; |
68 | |
} |
69 | |
|
70 | |
public void setResultValueGroupId(String resultValueGroupId) { |
71 | 0 | this.resultValueGroupId = resultValueGroupId; |
72 | 0 | } |
73 | |
|
74 | |
@Override |
75 | |
public String toString() { |
76 | 0 | StringBuilder builder = new StringBuilder(); |
77 | 0 | builder.append("AbstractResultValueGroupEntity [id="); |
78 | 0 | builder.append(id); |
79 | 0 | builder.append(", resultValueGroupId="); |
80 | 0 | builder.append(resultValueGroupId); |
81 | 0 | builder.append("]"); |
82 | 0 | return builder.toString(); |
83 | |
} |
84 | |
|
85 | |
|
86 | |
|
87 | |
} |