ALF-11668: Add position identifiers (same as seq elements in current schema dump tool)

As for current schemadump tool, table columns and primary key column names have order associated with them.



git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@32296 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Matt Ward
2011-11-24 18:17:41 +00:00
parent f939783d70
commit 462994f3eb
16 changed files with 503 additions and 313 deletions

View File

@@ -212,7 +212,22 @@ public class XMLToSchema extends DefaultHandler
}
else if (qName.equals(XML.EL_COLUMN))
{
stack.push(new Column(atts.getValue(XML.ATTR_NAME)));
Column column = new Column(atts.getValue(XML.ATTR_NAME));
if (atts.getValue(XML.ATTR_ORDER) != null)
{
int order = Integer.parseInt(atts.getValue(XML.ATTR_ORDER));
column.setOrder(order);
}
stack.push(column);
}
else if (qName.equals(XML.EL_COLUMN_NAME))
{
if (stack.peek() instanceof PrimaryKey && atts.getValue(XML.ATTR_ORDER) != null)
{
PrimaryKey pk = (PrimaryKey) stack.peek();
Integer columnOrder = Integer.parseInt(atts.getValue(XML.ATTR_ORDER));
pk.getColumnOrders().add(columnOrder);
}
}
else if (qName.equals(XML.EL_PRIMARY_KEY))
{