Package org.apache.ddlutils.alteration

Examples of org.apache.ddlutils.alteration.ColumnChange


        {
            HashSet processedColumns = new HashSet();

            for (Iterator changeIt = columnChanges.iterator(); changeIt.hasNext();)
            {
                ColumnChange change       = (ColumnChange)changeIt.next();
                Column       sourceColumn = change.getChangedColumn();
                Column       targetColumn = targetTable.findColumn(sourceColumn.getName(), getPlatform().isDelimitedIdentifierModeOn());

                if (!processedColumns.contains(targetColumn))
                {
                    processColumnChange(sourceTable,
                                        targetTable,
                                        sourceColumn,
                                        targetColumn,
                                        (change instanceof ColumnDataTypeChange) || (change instanceof ColumnSizeChange));
                    processedColumns.add(targetColumn);
                }
                changes.remove(change);
                change.apply(currentModel, getPlatform().isDelimitedIdentifierModeOn());
            }
        }
        // Finally we add primary keys
        for (Iterator changeIt = changes.iterator(); changeIt.hasNext();)
        {
View Full Code Here


            }
            else if ((change instanceof ColumnChange) && (columnChanges != null))
            {
                // we gather all changed columns because we can use the ALTER TABLE ALTER COLUMN
                // statement for them
                ColumnChange columnChange     = (ColumnChange)change;
                ArrayList    changesPerColumn = (ArrayList)columnChanges.get(columnChange.getChangedColumn());

                if (changesPerColumn == null)
                {
                    changesPerColumn = new ArrayList();
                    columnChanges.put(columnChange.getChangedColumn(), changesPerColumn);
                }
                changesPerColumn.add(change);
            }
        }
        if (columnChanges != null)
View Full Code Here

TOP

Related Classes of org.apache.ddlutils.alteration.ColumnChange

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.