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