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; }