mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
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:
@@ -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))
|
||||
{
|
||||
|
Reference in New Issue
Block a user