public void setType(FieldType type) {
   set("type", type.toString());
 }
 public FieldType getType() {
   return FieldType.valueOf(getString("type"));
 }