1 package org.emau.icmvc.ganimed.ttp.cm2.dto;
38 import java.io.Serializable;
39 import java.util.ArrayList;
40 import java.util.List;
52 private static final long serialVersionUID = -875195702630175964L;
55 private String propertiesString;
56 private String comment;
57 private String externProperties;
59 private String header;
60 private String footer;
61 private String scanBase64;
62 private String scanFileType;
63 private List<AssignedModuleDTO> assignedModules =
new ArrayList<AssignedModuleDTO>();
64 private List<FreeTextDefDTO> freeTextDefs =
new ArrayList<FreeTextDefDTO>();
76 ConsentTemplateType type, String header, String footer, String scanBase64, String scanFileType, List<AssignedModuleDTO> assignedModules,
77 List<FreeTextDefDTO> freeTextDefs) {
81 this.propertiesString = propertiesString;
82 this.comment = comment;
83 this.externProperties = externProperties;
87 this.scanBase64 = scanBase64;
88 this.scanFileType = scanFileType;
89 this.assignedModules = assignedModules;
90 this.freeTextDefs = freeTextDefs;
103 public String getTitle() {
107 public void setTitle(String title) {
111 public String getPropertiesString() {
112 return propertiesString;
115 public void setPropertiesString(String propertiesString) {
116 this.propertiesString = propertiesString;
119 public String getComment() {
123 public void setComment(String comment) {
124 this.comment = comment;
127 public String getExternProperties() {
128 return externProperties;
131 public void setExternProperties(String externProperties) {
132 this.externProperties = externProperties;
143 public String getHeader() {
147 public void setHeader(String header) {
148 this.header = header;
151 public String getFooter() {
155 public void setFooter(String footer) {
156 this.footer = footer;
159 public String getScanBase64() {
163 public void setScanBase64(String scanBase64) {
164 this.scanBase64 = scanBase64;
167 public String getScanFileType() {
171 public void setScanFileType(String scanFileType) {
172 this.scanFileType = scanFileType;
175 public List<AssignedModuleDTO> getAssignedModules() {
176 return assignedModules;
179 public void setAssignedModules(List<AssignedModuleDTO> assignedModules) {
180 if (assignedModules != null) {
181 this.assignedModules = assignedModules;
185 public List<FreeTextDefDTO> getFreeTextDefs() {
189 public void setFreeTextDefs(List<FreeTextDefDTO> freeTextDefs) {
190 if (freeTextDefs != null) {
191 this.freeTextDefs = freeTextDefs;
200 if (structure != null) {
201 this.structure = structure;
206 public int hashCode() {
207 final int prime = 31;
209 result = prime * result + ((comment == null) ? 0 : comment.hashCode());
210 result = prime * result + ((externProperties == null) ? 0 : externProperties.hashCode());
211 result = prime * result + ((type == null) ? 0 : type.hashCode());
212 result = prime * result + ((footer == null) ? 0 : footer.hashCode());
213 result = prime * result + ((header == null) ? 0 : header.hashCode());
214 result = prime * result + ((key == null) ? 0 : key.hashCode());
215 result = prime * result + ((assignedModules == null) ? 0 : assignedModules.hashCode());
216 result = prime * result + ((propertiesString == null) ? 0 : propertiesString.hashCode());
217 result = prime * result + ((scanFileType == null) ? 0 : scanFileType.hashCode());
218 result = prime * result + ((scanBase64 == null) ? 0 : scanBase64.hashCode());
219 result = prime * result + ((freeTextDefs == null) ? 0 : freeTextDefs.hashCode());
220 result = prime * result + ((structure == null) ? 0 : structure.hashCode());
221 result = prime * result + ((title == null) ? 0 : title.hashCode());
226 public boolean equals(Object obj) {
231 if (getClass() != obj.getClass())
235 if (other.key != null)
237 }
else if (!key.equals(other.key))
239 if (comment == null) {
240 if (other.comment != null)
242 }
else if (!comment.equals(other.comment))
244 if (externProperties == null) {
245 if (other.externProperties != null)
247 }
else if (!externProperties.equals(other.externProperties))
250 if (other.type != null)
252 }
else if (!type.equals(other.type))
254 if (footer == null) {
255 if (other.footer != null)
257 }
else if (!footer.equals(other.footer))
259 if (header == null) {
260 if (other.header != null)
262 }
else if (!header.equals(other.header))
264 if (assignedModules == null) {
265 if (other.assignedModules != null)
267 }
else if (!assignedModules.equals(other.assignedModules))
269 if (propertiesString == null) {
270 if (other.propertiesString != null)
272 }
else if (!propertiesString.equals(other.propertiesString))
274 if (scanFileType == null) {
275 if (other.scanFileType != null)
277 }
else if (!scanFileType.equals(other.scanFileType))
279 if (scanBase64 == null) {
280 if (other.scanBase64 != null)
282 }
else if (!scanBase64.equals(other.scanBase64))
284 if (freeTextDefs == null) {
285 if (other.freeTextDefs != null)
287 }
else if (!freeTextDefs.equals(other.freeTextDefs))
289 if (structure == null) {
290 if (other.structure != null)
292 }
else if (!structure.equals(other.structure))
295 if (other.title != null)
297 }
else if (!title.equals(other.title))
303 public String toString() {
304 final StringBuilder sb =
new StringBuilder();
306 sb.append(
" with title '");
308 sb.append(
", comment '");
310 sb.append(
"', extern properties '");
311 sb.append(externProperties);
312 sb.append(
"', type '");
314 sb.append(
"', properties '");
315 sb.append(propertiesString);
317 sb.append(assignedModules.size());
318 sb.append(
" modules and ");
319 sb.append(freeTextDefs.size());
320 sb.append(
" free text fields");
321 return sb.toString();
structure of the modules of a consent template
pk fuer ein consent template
ein consent template kann mehrere module (mit jeweils mehreren policies) enthalten, es entspricht dem elektronischen aequivalent eines nicht ausgefuellten konsentdokumentes