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