code clean up
This commit is contained in:
parent
36d59aa02c
commit
038c66b887
|
@ -4,7 +4,6 @@ import java.util.Map;
|
||||||
|
|
||||||
public class PropertyDefinitionFieldSetItemEntity {
|
public class PropertyDefinitionFieldSetItemEntity {
|
||||||
private Map<String, FieldEntity> fields;
|
private Map<String, FieldEntity> fields;
|
||||||
private String comment;
|
|
||||||
private int ordinal;
|
private int ordinal;
|
||||||
|
|
||||||
public Map<String, FieldEntity> getFields() {
|
public Map<String, FieldEntity> getFields() {
|
||||||
|
@ -15,14 +14,6 @@ public class PropertyDefinitionFieldSetItemEntity {
|
||||||
this.fields = fields;
|
this.fields = fields;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getComment() {
|
|
||||||
return this.comment;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setComment(String comment) {
|
|
||||||
this.comment = comment;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getOrdinal() {
|
public int getOrdinal() {
|
||||||
return this.ordinal;
|
return this.ordinal;
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,7 +58,6 @@ public class PropertyDefinitionFieldSetItemBuilder extends BaseBuilder<PropertyD
|
||||||
List<PropertyDefinitionFieldSetItem> models = new ArrayList<>();
|
List<PropertyDefinitionFieldSetItem> models = new ArrayList<>();
|
||||||
for (PropertyDefinitionFieldSetItemEntity d : data) {
|
for (PropertyDefinitionFieldSetItemEntity d : data) {
|
||||||
PropertyDefinitionFieldSetItem m = new PropertyDefinitionFieldSetItem();
|
PropertyDefinitionFieldSetItem m = new PropertyDefinitionFieldSetItem();
|
||||||
if (fields.hasField(this.asIndexer(PropertyDefinitionFieldSetItem._comment))) m.setComment(d.getComment());
|
|
||||||
if (fields.hasField(this.asIndexer(PropertyDefinitionFieldSetItem._ordinal))) m.setOrdinal(d.getOrdinal());
|
if (fields.hasField(this.asIndexer(PropertyDefinitionFieldSetItem._ordinal))) m.setOrdinal(d.getOrdinal());
|
||||||
if (!fieldsFields.isEmpty() && d.getFields() != null && !d.getFields().isEmpty()) {
|
if (!fieldsFields.isEmpty() && d.getFields() != null && !d.getFields().isEmpty()) {
|
||||||
m.setFields(new HashMap<>());
|
m.setFields(new HashMap<>());
|
||||||
|
|
|
@ -7,9 +7,6 @@ public class PropertyDefinitionFieldSetItem {
|
||||||
public final static String _fields = "fields";
|
public final static String _fields = "fields";
|
||||||
private Map<String, Field> fields;
|
private Map<String, Field> fields;
|
||||||
|
|
||||||
public final static String _comment = "comment";
|
|
||||||
private String comment;
|
|
||||||
|
|
||||||
public final static String _ordinal = "ordinal";
|
public final static String _ordinal = "ordinal";
|
||||||
private Integer ordinal;
|
private Integer ordinal;
|
||||||
|
|
||||||
|
@ -21,14 +18,6 @@ public class PropertyDefinitionFieldSetItem {
|
||||||
this.fields = fields;
|
this.fields = fields;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getComment() {
|
|
||||||
return this.comment;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setComment(String comment) {
|
|
||||||
this.comment = comment;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getOrdinal() {
|
public Integer getOrdinal() {
|
||||||
return this.ordinal;
|
return this.ordinal;
|
||||||
}
|
}
|
||||||
|
|
|
@ -446,7 +446,6 @@ public class DescriptionServiceImpl implements DescriptionService {
|
||||||
if (data == null) return cleanData;
|
if (data == null) return cleanData;
|
||||||
if (data.getFields() != null && !data.getFields().isEmpty()){
|
if (data.getFields() != null && !data.getFields().isEmpty()){
|
||||||
cleanData.setOrdinal(data.getOrdinal());
|
cleanData.setOrdinal(data.getOrdinal());
|
||||||
cleanData.setComment(data.getComment());
|
|
||||||
cleanData.setFields(new HashMap<>());
|
cleanData.setFields(new HashMap<>());
|
||||||
for (String key: data.getFields().keySet()) {
|
for (String key: data.getFields().keySet()) {
|
||||||
org.opencdmp.commons.types.descriptiontemplate.FieldEntity fieldEntity = fieldSetEntity != null ? fieldSetEntity.getFieldById(key).stream().findFirst().orElse(null) : null;
|
org.opencdmp.commons.types.descriptiontemplate.FieldEntity fieldEntity = fieldSetEntity != null ? fieldSetEntity.getFieldById(key).stream().findFirst().orElse(null) : null;
|
||||||
|
|
Loading…
Reference in New Issue