1 package org.emau.icmvc.ganimed.ttp.cm2.dto;
38 import java.io.Serializable;
50 private static final long serialVersionUID = -5624268522251227994L;
52 private boolean required;
54 private String converterString;
56 private String comment;
64 this.required = required;
66 this.converterString = converterString;
68 this.comment = comment;
71 public String getName() {
75 public void setName(String name) {
79 public boolean getRequired() {
83 public void setRequired(
boolean required) {
84 this.required = required;
95 public String getConverterString() {
96 return converterString;
99 public void setConverterString(String converterString) {
100 this.converterString = converterString;
103 public int getPos() {
107 public void setPos(
int pos) {
111 public String getComment() {
115 public void setComment(String comment) {
116 this.comment = comment;
120 public int hashCode() {
121 final int prime = 31;
123 result = prime * result + ((comment == null) ? 0 : comment.hashCode());
124 result = prime * result + ((converterString == null) ? 0 : converterString.hashCode());
125 result = prime * result + ((name == null) ? 0 : name.hashCode());
126 result = prime * result + pos;
127 result = prime * result + (required ? 1231 : 1237);
128 result = prime * result + ((type == null) ? 0 : type.hashCode());
133 public boolean equals(Object obj) {
138 if (getClass() != obj.getClass())
141 if (comment == null) {
142 if (other.comment != null)
144 }
else if (!comment.equals(other.comment))
146 if (converterString == null) {
147 if (other.converterString != null)
149 }
else if (!converterString.equals(other.converterString))
152 if (other.name != null)
154 }
else if (!name.equals(other.name))
156 if (pos != other.pos)
158 if (required != other.required)
160 if (type != other.type)
166 public String toString() {
167 StringBuilder sb =
new StringBuilder();
168 sb.append(
"FreeTextDTO with name '");
170 sb.append(
"', comment '");
172 sb.append(
"' type '");
173 sb.append((type == null) ?
"null" : type.toString());
174 sb.append(
"' converter string '");
175 sb.append(converterString);
176 sb.append(
"' at pos ");
178 sb.append(
" which value is ");
179 sb.append(required ?
"" :
"not ");
180 sb.append(
"required within a consent");
181 return sb.toString();
data type of a free text field of a consent template if extended please pay attention to occurences ...