details:   /erp/devel/dbsm-main/rev/35170667afe9
changeset: 274:35170667afe9
user:      Stefan Hühner <stefan.huehner <at> openbravo.com>
date:      Tue Mar 02 15:51:31 2010 +0100
summary:   Remove unused dependency on openbravo DataSetService

details:   /erp/devel/dbsm-main/rev/9fa41c691737
changeset: 275:9fa41c691737
user:      Stefan Hühner <stefan.huehner <at> openbravo.com>
date:      Tue Mar 02 16:16:38 2010 +0100
summary:   Remove the AddRowDALChange class and all users
- no instances of that type are ever created now after the dbsm-dal-removal
changes, so any check for that type will never be true and all code using
it can be removed.

diffstat:

 src/org/apache/ddlutils/alteration/AddRowDALChange.java |  33 -----------------
 src/org/apache/ddlutils/alteration/DataComparator.java  |  16 --------
 src/org/apache/ddlutils/model/Database.java             |   2 -
 src/org/openbravo/ddlutils/util/ValidateAPIData.java    |   7 ---
 4 files changed, 0 insertions(+), 58 deletions(-)

diffs (113 lines):

diff -r 299ccedf6b44 -r 9fa41c691737 
src/org/apache/ddlutils/alteration/AddRowDALChange.java
--- a/src/org/apache/ddlutils/alteration/AddRowDALChange.java   Mon Mar 01 
18:24:54 2010 +0100
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-package org.apache.ddlutils.alteration;
-
-import org.apache.ddlutils.model.DatabaseData;
-import org.apache.ddlutils.model.Table;
-import org.openbravo.base.structure.BaseOBObject;
-
-public class AddRowDALChange implements DataChange {
-
-  Table _table;
-  BaseOBObject _row;
-
-  public AddRowDALChange(Table table, BaseOBObject row) {
-    _table = table;
-    _row = row;
-  }
-
-  public void apply(DatabaseData databaseData, boolean caseSensitive) {
-    // databaseData.addRow(_table, _row, false);
-  }
-
-  public String toString() {
-    return "New row in table [" + _table.getName() + "]: <" + _row + ">";
-  }
-
-  public BaseOBObject getRow() {
-    return _row;
-  }
-
-  public Table getTable() {
-    return _table;
-  }
-
-}
\ No newline at end of file
diff -r 299ccedf6b44 -r 9fa41c691737 
src/org/apache/ddlutils/alteration/DataComparator.java
--- a/src/org/apache/ddlutils/alteration/DataComparator.java    Mon Mar 01 
18:24:54 2010 +0100
+++ b/src/org/apache/ddlutils/alteration/DataComparator.java    Tue Mar 02 
16:16:38 2010 +0100
@@ -51,28 +51,12 @@
     public int compare(Change o1, Change o2) {
       if (o1 instanceof RemoveRowChange && o2 instanceof AddRowChange)
         return -1;
-      else if (o1 instanceof RemoveRowDALChange && o2 instanceof AddRowChange)
-        return -1;
-      else if (o1 instanceof RemoveRowDALChange && o2 instanceof 
AddRowDALChange)
-        return -1;
-      else if (o1 instanceof RemoveRowChange && o2 instanceof AddRowDALChange)
-        return -1;
       else if (o1 instanceof AddRowChange && o2 instanceof RemoveRowChange)
         return 1;
-      else if (o1 instanceof AddRowDALChange && o2 instanceof RemoveRowChange)
-        return 1;
-      else if (o1 instanceof AddRowChange && o2 instanceof RemoveRowDALChange)
-        return 1;
-      else if (o1 instanceof AddRowDALChange && o2 instanceof 
RemoveRowDALChange)
-        return 1;
       else if (o1 instanceof RemoveRowChange && o2 instanceof ColumnDataChange)
         return -1;
-      else if (o1 instanceof RemoveRowDALChange && o2 instanceof 
ColumnDataChange)
-        return -1;
       else if (o1 instanceof AddRowChange && o2 instanceof ColumnDataChange)
         return 1;
-      else if (o1 instanceof AddRowDALChange && o2 instanceof ColumnDataChange)
-        return 1;
       else
         return 0;
     }
diff -r 299ccedf6b44 -r 9fa41c691737 src/org/apache/ddlutils/model/Database.java
--- a/src/org/apache/ddlutils/model/Database.java       Mon Mar 01 18:24:54 
2010 +0100
+++ b/src/org/apache/ddlutils/model/Database.java       Tue Mar 02 16:16:38 
2010 +0100
@@ -38,7 +38,6 @@
 import org.apache.ddlutils.util.ExtTypes;
 import org.openbravo.ddlutils.util.OBDataset;
 import org.openbravo.ddlutils.util.OBDatasetTable;
-import org.openbravo.service.dataset.DataSetService;
 
 /**
  * Represents the database model, ie. the tables in the database. It also 
contains the corresponding
@@ -1558,7 +1557,6 @@
   public void filterByDataset(OBDataset dataset) {
     ArrayList oldTables = _tables;
     _tables = new ArrayList();
-    DataSetService ds = DataSetService.getInstance();
     Vector<OBDatasetTable> tables = dataset.getTableList();
     for (OBDatasetTable table : tables) {
       for (int i = 0; i < oldTables.size(); i++) {
diff -r 299ccedf6b44 -r 9fa41c691737 
src/org/openbravo/ddlutils/util/ValidateAPIData.java
--- a/src/org/openbravo/ddlutils/util/ValidateAPIData.java      Mon Mar 01 
18:24:54 2010 +0100
+++ b/src/org/openbravo/ddlutils/util/ValidateAPIData.java      Tue Mar 02 
16:16:38 2010 +0100
@@ -22,7 +22,6 @@
 import java.util.List;
 
 import org.apache.ddlutils.alteration.AddRowChange;
-import org.apache.ddlutils.alteration.AddRowDALChange;
 import org.apache.ddlutils.alteration.Change;
 import org.apache.ddlutils.alteration.ColumnDataChange;
 import org.apache.ddlutils.alteration.RemoveRowChange;
@@ -92,12 +91,6 @@
         errors.add("Changed column value " + tableName + "." + columnName + " 
-ID:" + c.getPkRow()
             + " from [" + c.getOldValue() + "] to [" + c.getNewValue() + "]");
       }
-    } else if (change instanceof AddRowDALChange) {
-      AddRowDALChange c = (AddRowDALChange) change;
-      if (c.getTable().getName().equalsIgnoreCase("AD_PROCESS_PARA")) {
-        errors.add("Not Allowed insertions in " + c.getTable().getName() + " 
table. ID: "
-            + c.getRow().getId() + " - " + c.getRow().getIdentifier());
-      }
     } else if (change instanceof AddRowChange) {
       AddRowChange c = (AddRowChange) change;
       if (c.getTable().getName().equalsIgnoreCase("AD_PROCESS_PARA")) {

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to