Related to issue 24682. Fixed compilation problems
authorAntonio Moreno <antonio.moreno@openbravo.com>
Wed, 04 Sep 2013 10:03:01 +0200
changeset 459 1ee907d016ed
parent 458 912c4ac086e0
child 460 bb0a0fbcfe5a
Related to issue 24682. Fixed compilation problems
src/org/apache/ddlutils/platform/maxdb/MaxDbBuilder.java
src/org/apache/ddlutils/platform/mssql/MSSqlBuilder.java
src/org/apache/ddlutils/platform/mysql/MySqlBuilder.java
src/org/apache/ddlutils/platform/sapdb/SapDbBuilder.java
src/org/apache/ddlutils/platform/sybase/SybaseBuilder.java
src/org/openbravo/ddlutils/task/AlterXML2SQL.java
--- a/src/org/apache/ddlutils/platform/maxdb/MaxDbBuilder.java	Tue Sep 03 18:29:22 2013 +0200
+++ b/src/org/apache/ddlutils/platform/maxdb/MaxDbBuilder.java	Wed Sep 04 10:03:01 2013 +0200
@@ -64,7 +64,7 @@
   /**
    * {@inheritDoc}
    */
-  protected void writeExternalForeignKeyCreateStmt(Database database, Table table, ForeignKey key)
+  public void writeExternalForeignKeyCreateStmt(Database database, Table table, ForeignKey key)
       throws IOException {
     if (key.getForeignTableName() == null) {
       _log.warn("Foreign key table is null for key " + key);
@@ -87,7 +87,7 @@
   /**
    * {@inheritDoc}
    */
-  protected void writeExternalForeignKeyDropStmt(Table table, ForeignKey foreignKey)
+  public void writeExternalForeignKeyDropStmt(Table table, ForeignKey foreignKey)
       throws IOException {
     writeTableAlterStmt(table);
     print("DROP CONSTRAINT ");
--- a/src/org/apache/ddlutils/platform/mssql/MSSqlBuilder.java	Tue Sep 03 18:29:22 2013 +0200
+++ b/src/org/apache/ddlutils/platform/mssql/MSSqlBuilder.java	Wed Sep 04 10:03:01 2013 +0200
@@ -226,7 +226,7 @@
   /**
    * {@inheritDoc}
    */
-  protected void writeExternalForeignKeyDropStmt(Table table, ForeignKey foreignKey)
+  public void writeExternalForeignKeyDropStmt(Table table, ForeignKey foreignKey)
       throws IOException {
     String constraintName = getForeignKeyName(table, foreignKey);
 
@@ -457,8 +457,8 @@
         changeIt.remove();
       } else if (change instanceof PrimaryKeyChange) {
         PrimaryKeyChange pkChange = (PrimaryKeyChange) change;
-        RemovePrimaryKeyChange removePkChange = new RemovePrimaryKeyChange(pkChange
-            .getChangedTable(), pkChange.getOldPrimaryKeyColumns());
+        RemovePrimaryKeyChange removePkChange = new RemovePrimaryKeyChange(
+            pkChange.getChangedTable(), pkChange.getOldPrimaryKeyColumns());
 
         processChange(currentModel, desiredModel, removePkChange);
       }
--- a/src/org/apache/ddlutils/platform/mysql/MySqlBuilder.java	Tue Sep 03 18:29:22 2013 +0200
+++ b/src/org/apache/ddlutils/platform/mysql/MySqlBuilder.java	Wed Sep 04 10:03:01 2013 +0200
@@ -136,7 +136,7 @@
   /**
    * {@inheritDoc}
    */
-  protected void writeExternalForeignKeyDropStmt(Table table, ForeignKey foreignKey)
+  public void writeExternalForeignKeyDropStmt(Table table, ForeignKey foreignKey)
       throws IOException {
     writeTableAlterStmt(table);
     print("DROP FOREIGN KEY ");
@@ -299,8 +299,8 @@
     printIndent();
     print("DROP PRIMARY KEY");
     printEndOfStatement();
-    writeExternalPrimaryKeysCreateStmt(change.getChangedTable(), change.getNewName(), change
-        .getNewPrimaryKeyColumns());
+    writeExternalPrimaryKeysCreateStmt(change.getChangedTable(), change.getNewName(),
+        change.getNewPrimaryKeyColumns());
     change.apply(currentModel, getPlatform().isDelimitedIdentifierModeOn());
   }
 
--- a/src/org/apache/ddlutils/platform/sapdb/SapDbBuilder.java	Tue Sep 03 18:29:22 2013 +0200
+++ b/src/org/apache/ddlutils/platform/sapdb/SapDbBuilder.java	Wed Sep 04 10:03:01 2013 +0200
@@ -92,7 +92,7 @@
   /**
    * {@inheritDoc}
    */
-  protected void writeExternalForeignKeyCreateStmt(Database database, Table table, ForeignKey key)
+  public void writeExternalForeignKeyCreateStmt(Database database, Table table, ForeignKey key)
       throws IOException {
     if (key.getForeignTableName() == null) {
       _log.warn("Foreign key table is null for key " + key);
@@ -115,7 +115,7 @@
   /**
    * {@inheritDoc}
    */
-  protected void writeExternalForeignKeyDropStmt(Table table, ForeignKey foreignKey)
+  public void writeExternalForeignKeyDropStmt(Table table, ForeignKey foreignKey)
       throws IOException {
     writeTableAlterStmt(table);
     print("DROP FOREIGN KEY ");
@@ -162,8 +162,8 @@
         changeIt.remove();
       } else if (change instanceof PrimaryKeyChange) {
         PrimaryKeyChange pkChange = (PrimaryKeyChange) change;
-        RemovePrimaryKeyChange removePkChange = new RemovePrimaryKeyChange(pkChange
-            .getChangedTable(), pkChange.getOldPrimaryKeyColumns());
+        RemovePrimaryKeyChange removePkChange = new RemovePrimaryKeyChange(
+            pkChange.getChangedTable(), pkChange.getOldPrimaryKeyColumns());
 
         processChange(currentModel, desiredModel, removePkChange);
       }
--- a/src/org/apache/ddlutils/platform/sybase/SybaseBuilder.java	Tue Sep 03 18:29:22 2013 +0200
+++ b/src/org/apache/ddlutils/platform/sybase/SybaseBuilder.java	Wed Sep 04 10:03:01 2013 +0200
@@ -192,7 +192,7 @@
   /**
    * {@inheritDoc}
    */
-  protected void writeExternalForeignKeyDropStmt(Table table, ForeignKey foreignKey)
+  public void writeExternalForeignKeyDropStmt(Table table, ForeignKey foreignKey)
       throws IOException {
     String constraintName = getForeignKeyName(table, foreignKey);
 
@@ -365,8 +365,8 @@
         changeIt.remove();
       } else if (change instanceof PrimaryKeyChange) {
         PrimaryKeyChange pkChange = (PrimaryKeyChange) change;
-        RemovePrimaryKeyChange removePkChange = new RemovePrimaryKeyChange(pkChange
-            .getChangedTable(), pkChange.getOldPrimaryKeyColumns());
+        RemovePrimaryKeyChange removePkChange = new RemovePrimaryKeyChange(
+            pkChange.getChangedTable(), pkChange.getOldPrimaryKeyColumns());
 
         processChange(currentModel, desiredModel, removePkChange);
       }
@@ -425,8 +425,8 @@
         // different handler
         if ((changesPerColumn.size() == 1)
             && (changesPerColumn.get(0) instanceof ColumnDefaultValueChange)) {
-          processChange(currentModel, desiredModel, (ColumnDefaultValueChange) changesPerColumn
-              .get(0));
+          processChange(currentModel, desiredModel,
+              (ColumnDefaultValueChange) changesPerColumn.get(0));
         } else {
           Column targetColumn = targetTable.findColumn(sourceColumn.getName(), getPlatform()
               .isDelimitedIdentifierModeOn());
--- a/src/org/openbravo/ddlutils/task/AlterXML2SQL.java	Tue Sep 03 18:29:22 2013 +0200
+++ b/src/org/openbravo/ddlutils/task/AlterXML2SQL.java	Wed Sep 04 10:03:01 2013 +0200
@@ -123,7 +123,7 @@
       platform.alterData(db, dataComparator.getChanges(), w);
       getLog().info("Removing invalid rows.");
       platform.getSqlBuilder().setWriter(w);
-      platform.getSqlBuilder().deleteInvalidConstraintRows(db, true);
+      platform.getSqlBuilder().deleteInvalidConstraintRows(db, ad, true);
       getLog().info("Recreating Primary Keys");
       List changes = platform.getSqlBuilder().alterDatabaseRecreatePKs(oldModel, db, null);
       getLog().info("Recreating not null constraints");