1 | |
package org.kuali.student.core.bo; |
2 | |
|
3 | |
|
4 | |
import javax.persistence.Column; |
5 | |
import javax.persistence.Id; |
6 | |
import javax.persistence.MappedSuperclass; |
7 | |
|
8 | |
import org.kuali.rice.krad.bo.PersistableBusinessObjectBase; |
9 | |
import org.kuali.student.common.util.UUIDHelper; |
10 | |
|
11 | |
@MappedSuperclass |
12 | 0 | public abstract class KsBusinessObjectBase extends PersistableBusinessObjectBase implements KsBusinessObject { |
13 | |
|
14 | |
private static final long serialVersionUID = 1L; |
15 | |
|
16 | |
@Id |
17 | |
@Column(name = "ID") |
18 | |
private String id; |
19 | |
|
20 | |
|
21 | |
@Override |
22 | |
public void prePersist() { |
23 | 0 | this.id = UUIDHelper.genStringUUID(this.id); |
24 | 0 | super.prePersist(); |
25 | 0 | } |
26 | |
|
27 | |
|
28 | |
|
29 | |
|
30 | |
|
31 | |
|
32 | |
|
33 | |
|
34 | |
|
35 | |
|
36 | |
|
37 | |
public String getId() { |
38 | 0 | return id; |
39 | |
} |
40 | |
|
41 | |
public void setId(String id) { |
42 | 0 | this.id = id; |
43 | 0 | } |
44 | |
|
45 | |
} |