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