db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r505194 - in /db/ddlutils/trunk/src: java/org/apache/ddlutils/platform/oracle/Oracle8ModelReader.java test/org/apache/ddlutils/io/TestDatatypes.java test/org/apache/ddlutils/io/TestMisc.java
Date Fri, 09 Feb 2007 06:08:42 GMT
Author: tomdz
Date: Thu Feb  8 22:08:41 2007
New Revision: 505194

URL: http://svn.apache.org/viewvc?view=rev&rev=505194
Log:
Fixed tests
Added system table filter to the Oracle model reader

Modified:
    db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/oracle/Oracle8ModelReader.java
    db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestDatatypes.java
    db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestMisc.java

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/oracle/Oracle8ModelReader.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/oracle/Oracle8ModelReader.java?view=diff&rev=505194&r1=505193&r2=505194
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/oracle/Oracle8ModelReader.java
(original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/oracle/Oracle8ModelReader.java
Thu Feb  8 22:08:41 2007
@@ -91,6 +91,14 @@
      */
     protected Table readTable(DatabaseMetaDataWrapper metaData, Map values) throws SQLException
     {
+        String tableName = (String)values.get("TABLE_NAME");
+
+        // system table ?
+        if (tableName.indexOf('$') > 0)
+        {
+            return null;
+        }
+
         Table table = super.readTable(metaData, values);
 
         if (table != null)

Modified: db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestDatatypes.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestDatatypes.java?view=diff&rev=505194&r1=505193&r2=505194
==============================================================================
--- db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestDatatypes.java (original)
+++ db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestDatatypes.java Thu Feb  8 22:08:41
2007
@@ -121,7 +121,7 @@
         StringWriter   stringWriter = new StringWriter();
         DatabaseDataIO dataIO       = new DatabaseDataIO();
 
-        dataIO.writeDataToXML(getPlatform(), stringWriter, "UTF-8");
+        dataIO.writeDataToXML(getPlatform(), getModel(), stringWriter, "UTF-8");
 
         String dataSql = stringWriter.toString();
         
@@ -131,7 +131,7 @@
 
         createDatabase(modelXml);
 
-        dataIO.writeDataToDatabase(getPlatform(), new Reader[] { new StringReader(dataSql)
});
+        dataIO.writeDataToDatabase(getPlatform(), getModel(), new Reader[] { new StringReader(dataSql)
});
 
         beans = getRows("roundtrip");
 

Modified: db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestMisc.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestMisc.java?view=diff&rev=505194&r1=505193&r2=505194
==============================================================================
--- db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestMisc.java (original)
+++ db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestMisc.java Thu Feb  8 22:08:41 2007
@@ -89,7 +89,7 @@
         StringWriter   stringWriter = new StringWriter();
         DatabaseDataIO dataIO       = new DatabaseDataIO();
 
-        dataIO.writeDataToXML(getPlatform(), stringWriter, "UTF-8");
+        dataIO.writeDataToXML(getPlatform(), getModel(), stringWriter, "UTF-8");
 
         String    dataAsXml = stringWriter.toString();
         SAXReader reader    = new SAXReader();
@@ -128,7 +128,7 @@
 
         StringReader stringReader = new StringReader(dataAsXml);
 
-        dataIO.writeDataToDatabase(getPlatform(), new Reader[] { stringReader });
+        dataIO.writeDataToDatabase(getPlatform(), getModel(), new Reader[] { stringReader
});
 
         List beans = getRows("misc1");
 
@@ -188,7 +188,7 @@
         StringWriter   stringWriter = new StringWriter();
         DatabaseDataIO dataIO       = new DatabaseDataIO();
 
-        dataIO.writeDataToXML(getPlatform(), stringWriter, "UTF-8");
+        dataIO.writeDataToXML(getPlatform(), getModel(), stringWriter, "UTF-8");
 
         String    dataAsXml = stringWriter.toString();
         SAXReader reader    = new SAXReader();
@@ -229,7 +229,7 @@
 
         StringReader stringReader = new StringReader(dataAsXml);
 
-        dataIO.writeDataToDatabase(getPlatform(), new Reader[] { stringReader });
+        dataIO.writeDataToDatabase(getPlatform(), getModel(), new Reader[] { stringReader
});
 
         List beans = getRows("misc1");
 
@@ -278,7 +278,7 @@
         StringWriter   stringWriter = new StringWriter();
         DatabaseDataIO dataIO       = new DatabaseDataIO();
 
-        dataIO.writeDataToXML(getPlatform(), stringWriter, "UTF-8");
+        dataIO.writeDataToXML(getPlatform(), getModel(), stringWriter, "UTF-8");
 
         String    dataAsXml = stringWriter.toString();
         SAXReader reader    = new SAXReader();
@@ -310,7 +310,7 @@
 
         StringReader stringReader = new StringReader(dataAsXml);
 
-        dataIO.writeDataToDatabase(getPlatform(), new Reader[] { stringReader });
+        dataIO.writeDataToDatabase(getPlatform(), getModel(), new Reader[] { stringReader
});
 
         List beans = getRows("misc");
 
@@ -360,7 +360,7 @@
         StringWriter   stringWriter = new StringWriter();
         DatabaseDataIO dataIO       = new DatabaseDataIO();
 
-        dataIO.writeDataToXML(getPlatform(), stringWriter, "UTF-8");
+        dataIO.writeDataToXML(getPlatform(), getModel(), stringWriter, "UTF-8");
 
         String    dataAsXml = stringWriter.toString();
         SAXReader reader    = new SAXReader();
@@ -392,7 +392,7 @@
 
         StringReader stringReader = new StringReader(dataAsXml);
 
-        dataIO.writeDataToDatabase(getPlatform(), new Reader[] { stringReader });
+        dataIO.writeDataToDatabase(getPlatform(), getModel(), new Reader[] { stringReader
});
 
         List beans = getRows("misc");
 
@@ -452,7 +452,7 @@
         DatabaseDataIO dataIO       = new DatabaseDataIO();
         StringReader   stringReader = new StringReader(dataXml);
 
-        dataIO.writeDataToDatabase(getPlatform(), new Reader[] { stringReader });
+        dataIO.writeDataToDatabase(getPlatform(), getModel(), new Reader[] { stringReader
});
 
         List beans = getRows("misc", "id");
 
@@ -528,7 +528,7 @@
         DatabaseDataIO dataIO       = new DatabaseDataIO();
         StringReader   stringReader = new StringReader(dataXml);
 
-        dataIO.writeDataToDatabase(getPlatform(), new Reader[] { stringReader });
+        dataIO.writeDataToDatabase(getPlatform(), getModel(), new Reader[] { stringReader
});
 
         List beans = getRows("misc", "id");
 
@@ -638,7 +638,7 @@
         StringWriter   stringWriter = new StringWriter();
         DatabaseDataIO dataIO       = new DatabaseDataIO();
 
-        dataIO.writeDataToXML(getPlatform(), stringWriter, "UTF-8");
+        dataIO.writeDataToXML(getPlatform(), getModel(), stringWriter, "UTF-8");
 
         String dataAsXml = stringWriter.toString();
 
@@ -691,7 +691,7 @@
 
         StringReader stringReader = new StringReader(dataAsXml);
 
-        dataIO.writeDataToDatabase(getPlatform(), new Reader[] { stringReader });
+        dataIO.writeDataToDatabase(getPlatform(), getModel(), new Reader[] { stringReader
});
 
         assertEquals(2, getRows("A").size());
         assertEquals(2, getRows("B").size());



Mime
View raw message