[no dbmanager] remove excludedObjects as it is unused
authorStefan Hühner <stefan.huehner@openbravo.com>
Sun, 26 Mar 2017 14:09:21 +0200
changeset 934 3ba47e3e9f16
parent 933 2b0b1ed837e2
child 935 7ba7847bffb2
[no dbmanager] remove excludedObjects as it is unused
- exlcudedObjects member of both
- AlterDatabaseData (aka update.database with taskdef)
- AlterDatabaseDataMod (aka update.database.mod with taskdef)
was already unused.
- Remove it from both functions but keep setter (as deprecated) to allow
easier dbsm backporting
- Update all callers to avoid calling the deprecated dummy method.
- Keep args index of the *Java (via main method) classes to avoid
needing to update dbsm + pi in lock-step
src/org/openbravo/ddlutils/task/AlterDatabaseDataAll.java
src/org/openbravo/ddlutils/task/AlterDatabaseDataMod.java
src/org/openbravo/ddlutils/task/AlterDatabaseJava.java
src/org/openbravo/ddlutils/task/AlterDatabaseModJava.java
--- a/src/org/openbravo/ddlutils/task/AlterDatabaseDataAll.java	Sun Mar 26 14:00:55 2017 +0200
+++ b/src/org/openbravo/ddlutils/task/AlterDatabaseDataAll.java	Sun Mar 26 14:09:21 2017 +0200
@@ -50,8 +50,6 @@
  */
 public class AlterDatabaseDataAll extends BaseDatabaseTask {
 
-  protected String excludeobjects = "org.apache.ddlutils.platform.ExcludeFilter";
-
   protected File prescript = null;
   protected File postscript = null;
 
@@ -367,12 +365,11 @@
     return db;
   }
 
-  public String getExcludeobjects() {
-    return excludeobjects;
-  }
-
+  /**
+   * Function is kept to not require lock-step update of dbsm.jar & build.xml
+   */
+  @Deprecated
   public void setExcludeobjects(String excludeobjects) {
-    this.excludeobjects = excludeobjects;
   }
 
   public File getOriginalmodel() {
--- a/src/org/openbravo/ddlutils/task/AlterDatabaseDataMod.java	Sun Mar 26 14:00:55 2017 +0200
+++ b/src/org/openbravo/ddlutils/task/AlterDatabaseDataMod.java	Sun Mar 26 14:09:21 2017 +0200
@@ -50,8 +50,6 @@
  */
 public class AlterDatabaseDataMod extends BaseDatabaseTask {
 
-  private String excludeobjects = "org.apache.ddlutils.platform.ExcludeFilter";
-
   private File prescript = null;
   private File postscript = null;
 
@@ -189,7 +187,6 @@
       ada.setUrl(getUrl());
       ada.setUser(getUser());
       ada.setPassword(getPassword());
-      ada.setExcludeobjects(excludeobjects);
       ada.setModel(model);
       ada.setInput(input);
       ada.setObject(object);
@@ -390,12 +387,11 @@
     }
   }
 
-  public String getExcludeobjects() {
-    return excludeobjects;
-  }
-
+  /**
+   * Function is kept to not require lock-step update of dbsm.jar & build.xml
+   */
+  @Deprecated
   public void setExcludeobjects(String excludeobjects) {
-    this.excludeobjects = excludeobjects;
   }
 
   public File getOriginalmodel() {
--- a/src/org/openbravo/ddlutils/task/AlterDatabaseJava.java	Sun Mar 26 14:00:55 2017 +0200
+++ b/src/org/openbravo/ddlutils/task/AlterDatabaseJava.java	Sun Mar 26 14:09:21 2017 +0200
@@ -16,7 +16,7 @@
     ada.setUrl(args[1]);
     ada.setUser(args[2]);
     ada.setPassword(args[3]);
-    ada.setExcludeobjects(args[4]);
+    // args[4] was 'excludedobjects' not unused
     ada.setModel(new File(args[5]));
     // args[6] was 'filter' now unused
     ada.setInput(new File(args[7]));
--- a/src/org/openbravo/ddlutils/task/AlterDatabaseModJava.java	Sun Mar 26 14:00:55 2017 +0200
+++ b/src/org/openbravo/ddlutils/task/AlterDatabaseModJava.java	Sun Mar 26 14:09:21 2017 +0200
@@ -16,7 +16,7 @@
     ada.setUrl(args[1]);
     ada.setUser(args[2]);
     ada.setPassword(args[3]);
-    ada.setExcludeobjects(args[4]);
+    // args[4] was 'excludedObjects' now unused
     ada.setModel(new File(args[5]));
     // args[6] was 'filter' now unused
     ada.setInput(new File(args[7]));