}
return element;
}
private XmlElement addColumn(final XmlElement parent, final PropertyDescriptor propertyDescriptor, final Column column) {
XmlElement element = parent.addElement("column");
element.setAttribute("name", column.name());
element.setAttribute("nullable", Boolean.toString(column.nullable()));
if (propertyDescriptor.getType() == String.class) {
element.setAttribute("length", Integer.toString(column.length()));
} else if (Number.class.isAssignableFrom(propertyDescriptor.getType())) {
if (column.scale() > 0) {
element.setAttribute("scale", Integer.toString(column.scale()));
}
if (column.precision() > 0) {
element.setAttribute("precision", Integer.toString(column.precision()));
}
}
if (propertyDescriptor.isAnnotationPresent(Temporal.class)) {
Temporal t = propertyDescriptor.getAnnotation(Temporal.class);