1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
package org.kuali.student.common.dto; |
14 | |
|
15 | |
import java.io.Serializable; |
16 | |
|
17 | |
import javax.xml.bind.annotation.XmlAttribute; |
18 | |
import javax.xml.bind.annotation.XmlTransient; |
19 | |
|
20 | |
import org.kuali.student.common.infc.IdEntity; |
21 | |
|
22 | |
@SuppressWarnings("serial") |
23 | |
@XmlTransient |
24 | |
public abstract class IdEntityInfo extends EntityInfo implements IdEntity, Serializable { |
25 | |
|
26 | |
@XmlAttribute |
27 | |
private String id; |
28 | |
|
29 | |
protected IdEntityInfo() { |
30 | 0 | super (); |
31 | 0 | id = null; |
32 | 0 | } |
33 | |
|
34 | |
protected IdEntityInfo(IdEntity builder) { |
35 | 0 | super(builder); |
36 | 0 | this.id = builder.getId(); |
37 | 0 | } |
38 | |
|
39 | |
@Override |
40 | |
public String getId() { |
41 | 0 | return id; |
42 | |
} |
43 | |
|
44 | |
|
45 | |
|
46 | |
|
47 | |
|
48 | |
public static class Builder extends EntityInfo.Builder implements IdEntity { |
49 | |
|
50 | |
private String id; |
51 | |
|
52 | 0 | public Builder() {} |
53 | |
|
54 | |
public Builder(IdEntity entity) { |
55 | 0 | super(entity); |
56 | 0 | this.id = entity.getId(); |
57 | 0 | } |
58 | |
|
59 | |
@Override |
60 | |
public String getId() { |
61 | 0 | return id; |
62 | |
} |
63 | |
|
64 | |
public void setId(String id) { |
65 | 0 | this.id = id; |
66 | 0 | } |
67 | |
} |
68 | |
} |