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 = 8679417761951775630L;
54 private boolean mandatory;
56 private List<ConsentStatus> displayCheckboxes =
new ArrayList<ConsentStatus>();
57 private int orderNumber;
59 private String comment;
60 private String externProperties;
72 int orderNumber,
ModuleKeyDTO parent, String comment, String externProperties) {
75 this.mandatory = mandatory;
76 this.defaultConsentStatus = defaultConsentStatus;
77 if (displayCheckboxes != null) {
78 this.displayCheckboxes = displayCheckboxes;
80 this.orderNumber = orderNumber;
82 this.comment = comment;
83 this.externProperties = externProperties;
94 public boolean getMandatory() {
98 public void setMandatory(
boolean mandatory) {
99 this.mandatory = mandatory;
103 return defaultConsentStatus;
106 public void setDefaultConsentStatus(
ConsentStatus defaultConsentStatus) {
107 this.defaultConsentStatus = defaultConsentStatus;
110 public List<ConsentStatus> getDisplayCheckboxes() {
111 return displayCheckboxes;
114 public void setDisplayCheckboxes(List<ConsentStatus> displayCheckboxes) {
115 if (displayCheckboxes != null) {
116 this.displayCheckboxes = displayCheckboxes;
120 public int getOrderNumber() {
124 public void setOrderNumber(
int orderNumber) {
125 this.orderNumber = orderNumber;
133 this.parent = parent;
136 public String getComment() {
140 public void setComment(String comment) {
141 this.comment = comment;
144 public String getExternProperties() {
145 return externProperties;
148 public void setExternProperties(String externProperties) {
149 this.externProperties = externProperties;
153 public int hashCode() {
154 final int prime = 31;
156 result = prime * result + ((comment == null) ? 0 : comment.hashCode());
157 result = prime * result + ((defaultConsentStatus == null) ? 0 : defaultConsentStatus.hashCode());
158 result = prime * result + ((displayCheckboxes == null) ? 0 : displayCheckboxes.hashCode());
159 result = prime * result + ((externProperties == null) ? 0 : externProperties.hashCode());
160 result = prime * result + (mandatory ? 1231 : 1237);
161 result = prime * result + ((module == null) ? 0 : module.hashCode());
162 result = prime * result + orderNumber;
163 result = prime * result + ((parent == null) ? 0 : parent.hashCode());
168 public boolean equals(Object obj) {
173 if (getClass() != obj.getClass())
176 if (comment == null) {
177 if (other.comment != null)
179 }
else if (!comment.equals(other.comment))
181 if (defaultConsentStatus != other.defaultConsentStatus)
183 if (displayCheckboxes == null) {
184 if (other.displayCheckboxes != null)
186 }
else if (!displayCheckboxes.equals(other.displayCheckboxes))
188 if (externProperties == null) {
189 if (other.externProperties != null)
191 }
else if (!externProperties.equals(other.externProperties))
193 if (mandatory != other.mandatory)
195 if (module == null) {
196 if (other.module != null)
198 }
else if (!module.equals(other.module))
200 if (orderNumber != other.orderNumber)
202 if (parent == null) {
203 if (other.parent != null)
205 }
else if (!parent.equals(other.parent))
211 public String toString() {
212 StringBuffer sb =
new StringBuffer((module == null) ?
"MODULE IS NULL" : module.toString());
213 sb.append(
", default value: '");
214 sb.append((defaultConsentStatus == null) ?
"'null'" : defaultConsentStatus.toString());
215 sb.append(
"' is mandatory: ");
216 sb.append(mandatory);
217 sb.append(
", has order number ");
218 sb.append(orderNumber);
219 sb.append(
", as parent: '");
221 sb.append(
"' should show checkboxes for");
224 sb.append(consentStatus.toString());
226 sb.append(
"', has as comment '");
228 sb.append(
"' and externProperties '");
229 sb.append(externProperties);
230 return sb.toString();
objekt fuer die m-n tabelle consent template <-> modul
wie wurde ein modul (und damit die enthaltenen policies) innerhalb eines consents konsentiert...
ein modul ist eine zustimmbare unterteilung eines consents; sie fasst mehrere policies zusammen...