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 KeyEntityInfo extends EntityInfo implements KeyEntity, Serializable {
27
28 @XmlAttribute
29 private String key;
30
31 protected KeyEntityInfo() {
32 key = null;
33 }
34
35 protected KeyEntityInfo(KeyEntity builder) {
36 super(builder);
37 this.key = builder.getKey();
38 }
39
40 @Override
41 public String getKey() {
42 return key;
43 }
44
45
46
47
48
49 public static class Builder extends EntityInfo.Builder implements KeyEntity {
50
51 private String key;
52
53 public Builder() {}
54
55 public Builder(KeyEntity entity) {
56 super(entity);
57 this.key = entity.getKey();
58 }
59
60 @Override
61 public String getKey() {
62 return key;
63 }
64
65 public void setKey(String key) {
66 this.key = key;
67 }
68 }
69 }