this.dataType = dataType;
}
@Override
public String toString() {
final ToString str = new ToString(this);
str.append("name", name);
String typeName;
switch (type) {
case CHECKBOX:
typeName = "checkbox";
break;
case REFERENCE:
typeName = "reference";
break;
case TEXT:
typeName = "text";
break;
default:
typeName = "unset";
break;
}
str.append("type", typeName);
str.append("datatype", dataType);
str.append("editable", isEditable);
str.append("hidden", isHidden);
str.append("required", isRequired);
return str.toString();
}