1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krms.api.repository.agenda;
17
18 import java.io.Serializable;
19 import java.util.Collection;
20
21 import javax.xml.bind.annotation.XmlAccessType;
22 import javax.xml.bind.annotation.XmlAccessorType;
23 import javax.xml.bind.annotation.XmlAnyElement;
24 import javax.xml.bind.annotation.XmlElement;
25 import javax.xml.bind.annotation.XmlRootElement;
26 import javax.xml.bind.annotation.XmlType;
27
28 import org.kuali.rice.core.api.CoreConstants;
29 import org.kuali.rice.core.api.mo.AbstractDataTransferObject;
30 import org.kuali.rice.core.api.mo.ModelBuilder;
31
32
33
34
35
36
37
38
39
40 @XmlRootElement(name = AgendaTreeSubAgendaEntry.Constants.ROOT_ELEMENT_NAME)
41 @XmlAccessorType(XmlAccessType.NONE)
42 @XmlType(name = AgendaTreeSubAgendaEntry.Constants.TYPE_NAME, propOrder = {
43 AgendaTreeSubAgendaEntry.Elements.AGENDA_ITEM_ID,
44 AgendaTreeSubAgendaEntry.Elements.SUB_AGENDA_ID,
45 CoreConstants.CommonElements.FUTURE_ELEMENTS
46 })
47 public final class AgendaTreeSubAgendaEntry extends AbstractDataTransferObject implements AgendaTreeEntryDefinitionContract {
48
49 private static final long serialVersionUID = 8594116503548506936L;
50
51 @XmlElement(name = Elements.AGENDA_ITEM_ID, required = true)
52 private final String agendaItemId;
53
54 @XmlElement(name = Elements.SUB_AGENDA_ID, required = true)
55 private final String subAgendaId;
56
57 @SuppressWarnings("unused")
58 @XmlAnyElement
59 private final Collection<org.w3c.dom.Element> _futureElements = null;
60
61
62
63
64
65 private AgendaTreeSubAgendaEntry() {
66 this.agendaItemId = null;
67 this.subAgendaId = null;
68 }
69
70
71
72
73
74
75
76 private AgendaTreeSubAgendaEntry(Builder builder) {
77 this.agendaItemId = builder.getAgendaItemId();
78 this.subAgendaId = builder.getSubAgendaId();
79 }
80
81 @Override
82 public String getAgendaItemId() {
83 return agendaItemId;
84 }
85
86
87
88
89
90 public String getSubAgendaId() {
91 return this.subAgendaId;
92 }
93
94
95
96
97 public static class Builder implements ModelBuilder, Serializable {
98
99 private static final long serialVersionUID = 3548736700798501429L;
100
101 private String agendaItemId;
102 private String subAgendaId;
103
104
105
106
107
108
109 private Builder(String agendaItemId, String subAgendaId) {
110 setAgendaItemId(agendaItemId);
111 setSubAgendaId(subAgendaId);
112 }
113
114
115
116
117
118
119
120
121 public static Builder create(String agendaItemId, String subAgendaId){
122 return new Builder(agendaItemId, subAgendaId);
123 }
124
125
126
127
128
129 public String getAgendaItemId() {
130 return this.agendaItemId;
131 }
132
133
134
135
136
137 public String getSubAgendaId() {
138 return this.subAgendaId;
139 }
140
141
142
143
144
145
146 public void setAgendaItemId(String agendaItemId) {
147 if (agendaItemId == null) {
148 throw new IllegalArgumentException("agendaItemId was null");
149 }
150 this.agendaItemId = agendaItemId;
151 }
152
153
154
155
156
157
158 public void setSubAgendaId(String subAgendaId) {
159 if (subAgendaId == null) {
160 throw new IllegalArgumentException("subAgendaId was null");
161 }
162 this.subAgendaId = subAgendaId;
163 }
164
165 @Override
166 public AgendaTreeSubAgendaEntry build() {
167 return new AgendaTreeSubAgendaEntry(this);
168 }
169
170 }
171
172
173
174
175 static class Constants {
176 final static String ROOT_ELEMENT_NAME = "agendaTreeSubAgendaEntry";
177 final static String TYPE_NAME = "AgendaTreeSubAgendaEntryType";
178 }
179
180
181
182
183
184 static class Elements {
185 final static String AGENDA_ITEM_ID = "agendaItemId";
186 final static String SUB_AGENDA_ID = "subAgendaId";
187 }
188
189 }