public static AttributeDetail convert(AttributeDTO attributeDTO) { AttributeDetail attribute = new AttributeDetail(); attribute.setName(attributeDTO.getName()); attribute.setValue(attributeDTO.getValue() == null ? "" : attributeDTO.getValue()); attribute.setType(attributeDTO.getType()); attribute.setMaxOccurs(attributeDTO.getMaxOccurs()); attribute.setMinOccurs(attributeDTO.getMinOccurs()); attribute.setNillable(attributeDTO.isNillable()); return attribute; }
public static AttributeDTO convert(AttributeDetail attribute) { AttributeDTO attributeDTO = new AttributeDTO(); attributeDTO.setName(attribute.getName()); attributeDTO.setValue(attribute.getValue()); attributeDTO.setType(attribute.getType()); attributeDTO.setMaxOccurs(attribute.getMaxOccurs()); attributeDTO.setMinOccurs(attribute.getMinOccurs()); attributeDTO.setNillable(attribute.isNillable()); return attributeDTO; }