1 package org.emau.icmvc.ganimed.ttp.cm2.dto;
38 import java.io.Serializable;
39 import java.util.ArrayList;
40 import java.util.List;
50 private static final long serialVersionUID = 7810170655576763368L;
54 private String comment;
55 private String externProperties;
56 private List<PolicyDTO> policies =
new ArrayList<PolicyDTO>();
70 if (policies != null) {
71 this.policies = policies;
75 public ModuleDTO(
ModuleKeyDTO key, String text, String title, String comment, String externProperties, List<PolicyDTO> policies) {
80 this.comment = comment;
81 this.externProperties = externProperties;
82 if (policies != null) {
83 this.policies = policies;
97 public String getText() {
101 public void setText(String text) {
105 public String getTitle() {
109 public void setTitle(String title) {
113 public String getComment() {
117 public void setComment(String comment) {
118 this.comment = comment;
121 public String getExternProperties() {
122 return externProperties;
125 public void setExternProperties(String externProperties) {
126 this.externProperties = externProperties;
129 public List<PolicyDTO> getPolicies() {
133 public void setPolicies(List<PolicyDTO> policies) {
134 if (policies != null) {
135 this.policies = policies;
140 public int hashCode() {
141 final int prime = 31;
143 result = prime * result + ((comment == null) ? 0 : comment.hashCode());
144 result = prime * result + ((externProperties == null) ? 0 : externProperties.hashCode());
145 result = prime * result + ((key == null) ? 0 : key.hashCode());
146 result = prime * result + ((policies == null) ? 0 : policies.hashCode());
147 result = prime * result + ((text == null) ? 0 : text.hashCode());
148 result = prime * result + ((title == null) ? 0 : title.hashCode());
153 public boolean equals(Object obj) {
158 if (getClass() != obj.getClass())
161 if (comment == null) {
162 if (other.comment != null)
164 }
else if (!comment.equals(other.comment))
166 if (externProperties == null) {
167 if (other.externProperties != null)
169 }
else if (!externProperties.equals(other.externProperties))
172 if (other.key != null)
174 }
else if (!key.equals(other.key))
176 if (policies == null) {
177 if (other.policies != null)
179 }
else if (!policies.equals(other.policies))
182 if (other.text != null)
184 }
else if (!text.equals(other.text))
187 if (other.title != null)
189 }
else if (!title.equals(other.title))
195 public String toString() {
196 return key.toString() +
" with " + ((policies == null) ? 0 : policies.size()) +
" policies";
ein modul ist eine zustimmbare unterteilung eines consents; sie fasst mehrere policies zusammen...