db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r965168 - in /db/torque/torque4/trunk/torque-templates: ./ src/main/java/org/apache/torque/templates/platform/ src/main/java/org/apache/torque/templates/sourcefilter/ src/main/java/org/apache/torque/templates/transformer/ src/main/java/org/...
Date Sun, 18 Jul 2010 06:23:47 GMT
Author: tfischer
Date: Sun Jul 18 06:23:46 2010
New Revision: 965168

URL: http://svn.apache.org/viewvc?rev=965168&view=rev
Log:
adjusted to changes in generator
- renamed Filter classes to SkipDecider classes
- inserted xsi:type attributes to source elements in control files
- added jdbc2schema package
- added jdbc2schema test using derby memdb

Added:
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/sourcefilter/BeanSkipDecider.java
      - copied, changed from r944878, db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/sourcefilter/BeanSourceFilter.java
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/sourcefilter/InterfaceSkipDecider.java
      - copied, changed from r944878, db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/sourcefilter/InterfaceSourceFilter.java
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/sourcefilter/ManagerSkipDecider.java
      - copied, changed from r944878, db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/sourcefilter/ManagerSourceFilter.java
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/sourcefilter/MapInitSkipDecider.java
      - copied, changed from r944878, db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/sourcefilter/MapInitSourceFilter.java
    db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/jdbc2schema/
    db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/jdbc2schema/conf/
    db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/jdbc2schema/conf/control.xml
    db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/jdbc2schema/conf/options.properties
    db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/jdbc2schema/outlets/
    db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/jdbc2schema/outlets/jdbc2schema.xml
    db/torque/torque4/trunk/torque-templates/src/test/java/org/apache/torque/templates/jdbc2schema/
    db/torque/torque4/trunk/torque-templates/src/test/java/org/apache/torque/templates/jdbc2schema/Jdbc2SchemaTest.java
    db/torque/torque4/trunk/torque-templates/src/test/resources/
    db/torque/torque4/trunk/torque-templates/src/test/resources/org/
    db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/
    db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/
    db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/
    db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/jdbc2schema/
    db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/jdbc2schema/expected-schema.xml
    db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/jdbc2schema/jdbc2schemaTest.sql
Removed:
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/sourcefilter/BeanSourceFilter.java
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/sourcefilter/InterfaceSourceFilter.java
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/sourcefilter/ManagerSourceFilter.java
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/sourcefilter/MapInitSourceFilter.java
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/typemapping/SchemaType.java
Modified:
    db/torque/torque4/trunk/torque-templates/pom.xml
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/Platform.java
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformAxionImpl.java
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformCloudscapeImpl.java
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformDb2400Impl.java
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformDb2Impl.java
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformDefaultImpl.java
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformDerbyImpl.java
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformHypersonicImpl.java
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformInterbaseImpl.java
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformMsaccessImpl.java
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformMssqlImpl.java
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformMysqlImpl.java
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformOracleImpl.java
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformPostgresqlImpl.java
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformSapdbImpl.java
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformSybaseImpl.java
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/SchemaTypeHelper.java
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/LoadExternalSchemaTransformer.java
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/OMColumnTransformer.java
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/sql/SQLTransformer.java
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/typemapping/TypeMap.java
    db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/doc/html/conf/control.xml
    db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/doc/xdoc/conf/control.xml
    db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/idtable/conf/control.xml
    db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/conf/control.xml
    db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/conf/control.xml
    db/torque/torque4/trunk/torque-templates/src/test/java/org/apache/torque/templates/TestProcessing.java

Modified: db/torque/torque4/trunk/torque-templates/pom.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/pom.xml?rev=965168&r1=965167&r2=965168&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/pom.xml (original)
+++ db/torque/torque4/trunk/torque-templates/pom.xml Sun Jul 18 06:23:46 2010
@@ -50,12 +50,32 @@
       <artifactId>commons-logging</artifactId>
       <version>1.0.4</version>
     </dependency>
+    
+    <!-- Test dependencies -->
     <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
       <version>4.4</version>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>junit-addons</groupId>
+      <artifactId>junit-addons</artifactId>
+      <version>1.4</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.derby</groupId>
+      <artifactId>derby</artifactId>
+      <version>10.5.3.0_1</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.derby</groupId>
+      <artifactId>derbyclient</artifactId>
+      <version>10.5.3.0_1</version>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 
   <build>

Modified: db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/Platform.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/Platform.java?rev=965168&r1=965167&r2=965168&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/Platform.java (original)
+++ db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/Platform.java Sun Jul 18 06:23:46 2010
@@ -19,7 +19,7 @@ package org.apache.torque.templates.plat
  * under the License.
  */
 
-import org.apache.torque.templates.typemapping.SchemaType;
+import org.apache.torque.generator.jdbc.SchemaType;
 import org.apache.torque.templates.typemapping.SqlType;
 
 /**

Modified: db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformAxionImpl.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformAxionImpl.java?rev=965168&r1=965167&r2=965168&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformAxionImpl.java (original)
+++ db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformAxionImpl.java Sun Jul 18 06:23:46 2010
@@ -19,8 +19,8 @@ package org.apache.torque.templates.plat
  * under the License.
  */
 
+import org.apache.torque.generator.jdbc.SchemaType;
 import org.apache.torque.templates.typemapping.SqlType;
-import org.apache.torque.templates.typemapping.SchemaType;
 
 /**
  * Axion Platform implementation.

Modified: db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformCloudscapeImpl.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformCloudscapeImpl.java?rev=965168&r1=965167&r2=965168&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformCloudscapeImpl.java (original)
+++ db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformCloudscapeImpl.java Sun Jul 18 06:23:46 2010
@@ -19,7 +19,7 @@ package org.apache.torque.templates.plat
  * under the License.
  */
 
-import org.apache.torque.templates.typemapping.SchemaType;
+import org.apache.torque.generator.jdbc.SchemaType;
 import org.apache.torque.templates.typemapping.SqlType;
 
 /**

Modified: db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformDb2400Impl.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformDb2400Impl.java?rev=965168&r1=965167&r2=965168&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformDb2400Impl.java (original)
+++ db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformDb2400Impl.java Sun Jul 18 06:23:46 2010
@@ -19,8 +19,8 @@ package org.apache.torque.templates.plat
  * under the License.
  */
 
+import org.apache.torque.generator.jdbc.SchemaType;
 import org.apache.torque.templates.typemapping.SqlType;
-import org.apache.torque.templates.typemapping.SchemaType;
 
 /**
  * DB2-AS400 Platform implementation.

Modified: db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformDb2Impl.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformDb2Impl.java?rev=965168&r1=965167&r2=965168&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformDb2Impl.java (original)
+++ db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformDb2Impl.java Sun Jul 18 06:23:46 2010
@@ -19,8 +19,8 @@ package org.apache.torque.templates.plat
  * under the License.
  */
 
+import org.apache.torque.generator.jdbc.SchemaType;
 import org.apache.torque.templates.typemapping.SqlType;
-import org.apache.torque.templates.typemapping.SchemaType;
 
 /**
  * DB2 Platform implementation.

Modified: db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformDefaultImpl.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformDefaultImpl.java?rev=965168&r1=965167&r2=965168&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformDefaultImpl.java (original)
+++ db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformDefaultImpl.java Sun Jul 18 06:23:46 2010
@@ -23,7 +23,7 @@ import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
 
-import org.apache.torque.templates.typemapping.SchemaType;
+import org.apache.torque.generator.jdbc.SchemaType;
 import org.apache.torque.templates.typemapping.SqlType;
 
 

Modified: db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformDerbyImpl.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformDerbyImpl.java?rev=965168&r1=965167&r2=965168&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformDerbyImpl.java (original)
+++ db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformDerbyImpl.java Sun Jul 18 06:23:46 2010
@@ -19,9 +19,9 @@ package org.apache.torque.templates.plat
  * under the License.
  */
 
+import org.apache.torque.generator.jdbc.SchemaType;
 import org.apache.torque.templates.typemapping.SizedForBitDataSqlType;
 import org.apache.torque.templates.typemapping.SqlType;
-import org.apache.torque.templates.typemapping.SchemaType;
 
 /**
  * Derby Platform implementation.

Modified: db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformHypersonicImpl.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformHypersonicImpl.java?rev=965168&r1=965167&r2=965168&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformHypersonicImpl.java (original)
+++ db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformHypersonicImpl.java Sun Jul 18 06:23:46 2010
@@ -19,7 +19,7 @@ package org.apache.torque.templates.plat
  * under the License.
  */
 
-import org.apache.torque.templates.typemapping.SchemaType;
+import org.apache.torque.generator.jdbc.SchemaType;
 import org.apache.torque.templates.typemapping.SqlType;
 
 /**

Modified: db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformInterbaseImpl.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformInterbaseImpl.java?rev=965168&r1=965167&r2=965168&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformInterbaseImpl.java (original)
+++ db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformInterbaseImpl.java Sun Jul 18 06:23:46 2010
@@ -19,8 +19,8 @@ package org.apache.torque.templates.plat
  * under the License.
  */
 
+import org.apache.torque.generator.jdbc.SchemaType;
 import org.apache.torque.templates.typemapping.SqlType;
-import org.apache.torque.templates.typemapping.SchemaType;
 
 /**
  * Interbase Platform implementation.

Modified: db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformMsaccessImpl.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformMsaccessImpl.java?rev=965168&r1=965167&r2=965168&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformMsaccessImpl.java (original)
+++ db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformMsaccessImpl.java Sun Jul 18 06:23:46 2010
@@ -19,8 +19,8 @@ package org.apache.torque.templates.plat
  * under the License.
  */
 
+import org.apache.torque.generator.jdbc.SchemaType;
 import org.apache.torque.templates.typemapping.SqlType;
-import org.apache.torque.templates.typemapping.SchemaType;
 
 /**
  * MS Access Platform implementation.

Modified: db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformMssqlImpl.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformMssqlImpl.java?rev=965168&r1=965167&r2=965168&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformMssqlImpl.java (original)
+++ db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformMssqlImpl.java Sun Jul 18 06:23:46 2010
@@ -19,8 +19,8 @@ package org.apache.torque.templates.plat
  * under the License.
  */
 
+import org.apache.torque.generator.jdbc.SchemaType;
 import org.apache.torque.templates.typemapping.SqlType;
-import org.apache.torque.templates.typemapping.SchemaType;
 
 /**
  * MS SQL Platform implementation.

Modified: db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformMysqlImpl.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformMysqlImpl.java?rev=965168&r1=965167&r2=965168&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformMysqlImpl.java (original)
+++ db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformMysqlImpl.java Sun Jul 18 06:23:46 2010
@@ -19,8 +19,8 @@ package org.apache.torque.templates.plat
  * under the License.
  */
 
+import org.apache.torque.generator.jdbc.SchemaType;
 import org.apache.torque.templates.typemapping.SqlType;
-import org.apache.torque.templates.typemapping.SchemaType;
 
 /**
  * MySql Platform implementation.

Modified: db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformOracleImpl.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformOracleImpl.java?rev=965168&r1=965167&r2=965168&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformOracleImpl.java (original)
+++ db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformOracleImpl.java Sun Jul 18 06:23:46 2010
@@ -19,8 +19,8 @@ package org.apache.torque.templates.plat
  * under the License.
  */
 
+import org.apache.torque.generator.jdbc.SchemaType;
 import org.apache.torque.templates.typemapping.SqlType;
-import org.apache.torque.templates.typemapping.SchemaType;
 
 /**
  * Oracle Platform implementation.

Modified: db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformPostgresqlImpl.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformPostgresqlImpl.java?rev=965168&r1=965167&r2=965168&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformPostgresqlImpl.java (original)
+++ db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformPostgresqlImpl.java Sun Jul 18 06:23:46 2010
@@ -19,8 +19,8 @@ package org.apache.torque.templates.plat
  * under the License.
  */
 
+import org.apache.torque.generator.jdbc.SchemaType;
 import org.apache.torque.templates.typemapping.SqlType;
-import org.apache.torque.templates.typemapping.SchemaType;
 
 /**
  * Postgresql Platform implementation.

Modified: db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformSapdbImpl.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformSapdbImpl.java?rev=965168&r1=965167&r2=965168&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformSapdbImpl.java (original)
+++ db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformSapdbImpl.java Sun Jul 18 06:23:46 2010
@@ -19,8 +19,8 @@ package org.apache.torque.templates.plat
  * under the License.
  */
 
+import org.apache.torque.generator.jdbc.SchemaType;
 import org.apache.torque.templates.typemapping.SqlType;
-import org.apache.torque.templates.typemapping.SchemaType;
 
 /**
  * SAP DB Platform implementation.

Modified: db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformSybaseImpl.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformSybaseImpl.java?rev=965168&r1=965167&r2=965168&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformSybaseImpl.java (original)
+++ db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/platform/PlatformSybaseImpl.java Sun Jul 18 06:23:46 2010
@@ -19,8 +19,8 @@ package org.apache.torque.templates.plat
  * under the License.
  */
 
+import org.apache.torque.generator.jdbc.SchemaType;
 import org.apache.torque.templates.typemapping.SqlType;
-import org.apache.torque.templates.typemapping.SchemaType;
 
 /**
  * Sybase Platform implementation.

Copied: db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/sourcefilter/BeanSkipDecider.java (from r944878, db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/sourcefilter/BeanSourceFilter.java)
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/sourcefilter/BeanSkipDecider.java?p2=db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/sourcefilter/BeanSkipDecider.java&p1=db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/sourcefilter/BeanSourceFilter.java&r1=944878&r2=965168&rev=965168&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/sourcefilter/BeanSourceFilter.java (original)
+++ db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/sourcefilter/BeanSkipDecider.java Sun Jul 18 06:23:46 2010
@@ -20,16 +20,16 @@ package org.apache.torque.templates.sour
  */
 
 import org.apache.torque.generator.control.ControllerState;
-import org.apache.torque.generator.source.filter.SourceFilter;
+import org.apache.torque.generator.source.skipDecider.SkipDecider;
 import org.apache.torque.templates.TemplateOptionName;
 
 /**
- * A source filter which returns true if the option
+ * A skipSourceDecider which returns true if the option
  * "torque.om.generateBeans" is true.
  *
  * @version $Id: $
  */
-public class BeanSourceFilter implements SourceFilter
+public class BeanSkipDecider implements SkipDecider
 {
     public boolean proceed(ControllerState controllerState)
     {

Copied: db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/sourcefilter/InterfaceSkipDecider.java (from r944878, db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/sourcefilter/InterfaceSourceFilter.java)
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/sourcefilter/InterfaceSkipDecider.java?p2=db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/sourcefilter/InterfaceSkipDecider.java&p1=db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/sourcefilter/InterfaceSourceFilter.java&r1=944878&r2=965168&rev=965168&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/sourcefilter/InterfaceSourceFilter.java (original)
+++ db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/sourcefilter/InterfaceSkipDecider.java Sun Jul 18 06:23:46 2010
@@ -21,17 +21,17 @@ package org.apache.torque.templates.sour
 
 import org.apache.torque.generator.control.ControllerState;
 import org.apache.torque.generator.source.SourceElement;
-import org.apache.torque.generator.source.filter.SourceFilter;
+import org.apache.torque.generator.source.skipDecider.SkipDecider;
 import org.apache.torque.templates.TorqueSchemaAttributeName;
 
 /**
- * A source filter which returns true if the attribute "interface"
+ * A skip decider which returns true if the attribute "interface"
  * is set on the current source element and if the name does not contain
  * a dot.
  *
  * @version $Id: $
  */
-public class InterfaceSourceFilter implements SourceFilter
+public class InterfaceSkipDecider implements SkipDecider
 {
     public boolean proceed(ControllerState controllerState)
     {

Copied: db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/sourcefilter/ManagerSkipDecider.java (from r944878, db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/sourcefilter/ManagerSourceFilter.java)
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/sourcefilter/ManagerSkipDecider.java?p2=db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/sourcefilter/ManagerSkipDecider.java&p1=db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/sourcefilter/ManagerSourceFilter.java&r1=944878&r2=965168&rev=965168&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/sourcefilter/ManagerSourceFilter.java (original)
+++ db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/sourcefilter/ManagerSkipDecider.java Sun Jul 18 06:23:46 2010
@@ -23,12 +23,12 @@ import java.util.List;
 
 import org.apache.torque.generator.control.ControllerState;
 import org.apache.torque.generator.source.SourceElement;
-import org.apache.torque.generator.source.filter.SourceFilter;
+import org.apache.torque.generator.source.skipDecider.SkipDecider;
 import org.apache.torque.templates.TemplateOptionName;
 import org.apache.torque.templates.TorqueSchemaElementName;
 import org.apache.torque.templates.transformer.om.TableChildElementName;
 
-public class ManagerSourceFilter implements SourceFilter
+public class ManagerSkipDecider implements SkipDecider
 {
     public boolean proceed(ControllerState controllerState)
     {

Copied: db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/sourcefilter/MapInitSkipDecider.java (from r944878, db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/sourcefilter/MapInitSourceFilter.java)
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/sourcefilter/MapInitSkipDecider.java?p2=db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/sourcefilter/MapInitSkipDecider.java&p1=db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/sourcefilter/MapInitSourceFilter.java&r1=944878&r2=965168&rev=965168&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/sourcefilter/MapInitSourceFilter.java (original)
+++ db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/sourcefilter/MapInitSkipDecider.java Sun Jul 18 06:23:46 2010
@@ -20,7 +20,7 @@ package org.apache.torque.templates.sour
  */
 
 import org.apache.torque.generator.control.ControllerState;
-import org.apache.torque.generator.source.filter.SourceFilter;
+import org.apache.torque.generator.source.skipDecider.SkipDecider;
 import org.apache.torque.templates.TemplateOptionName;
 
 /**
@@ -29,7 +29,7 @@ import org.apache.torque.templates.Templ
  *
  * @version $Id: $
  */
-public class MapInitSourceFilter implements SourceFilter
+public class MapInitSkipDecider implements SkipDecider
 {
     public boolean proceed(ControllerState controllerState)
     {

Modified: db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/SchemaTypeHelper.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/SchemaTypeHelper.java?rev=965168&r1=965167&r2=965168&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/SchemaTypeHelper.java (original)
+++ db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/SchemaTypeHelper.java Sun Jul 18 06:23:46 2010
@@ -20,13 +20,13 @@ package org.apache.torque.templates.tran
  */
 
 import org.apache.torque.generator.control.ControllerState;
+import org.apache.torque.generator.jdbc.SchemaType;
 import org.apache.torque.generator.source.SourceElement;
 import org.apache.torque.generator.source.transform.SourceTransformerException;
 import org.apache.torque.templates.TemplateOptionName;
 import org.apache.torque.templates.TorqueSchemaAttributeName;
 import org.apache.torque.templates.platform.Platform;
 import org.apache.torque.templates.platform.PlatformFactory;
-import org.apache.torque.templates.typemapping.SchemaType;
 import org.apache.torque.templates.typemapping.SqlType;
 
 /**

Modified: db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/LoadExternalSchemaTransformer.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/LoadExternalSchemaTransformer.java?rev=965168&r1=965167&r2=965168&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/LoadExternalSchemaTransformer.java (original)
+++ db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/LoadExternalSchemaTransformer.java Sun Jul 18 06:23:46 2010
@@ -1,21 +1,18 @@
 package org.apache.torque.templates.transformer.om;
 
 import java.io.File;
-import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.torque.generator.configuration.ConfigurationException;
 import org.apache.torque.generator.control.ControllerState;
-import org.apache.torque.generator.source.FileSource;
 import org.apache.torque.generator.source.SourceElement;
 import org.apache.torque.generator.source.SourceException;
-import org.apache.torque.generator.source.TransformerDefinition;
+import org.apache.torque.generator.source.stream.FileSource;
+import org.apache.torque.generator.source.stream.XmlSourceFormat;
 import org.apache.torque.generator.source.transform.SourceTransformer;
 import org.apache.torque.generator.source.transform.SourceTransformerException;
-import org.apache.torque.generator.source.xml.XmlSourceType;
 import org.apache.torque.templates.TorqueSchemaAttributeName;
 import org.apache.torque.templates.TorqueSchemaElementName;
 
@@ -52,11 +49,8 @@ public class LoadExternalSchemaTransform
             try
             {
                 FileSource fileSource = new FileSource(
-                        new XmlSourceType(),
-                        externalSchemaPath,
-                        null,
-                        null,
-                        new ArrayList<TransformerDefinition>());
+                        new XmlSourceFormat(),
+                        externalSchemaPath);
                 SourceElement externalSchemaRootElement 
                         = fileSource.getRootElement();
                 this.transform(externalSchemaRootElement, controllerState);
@@ -74,13 +68,6 @@ public class LoadExternalSchemaTransform
                     childIt.remove();
                 }
             } 
-            catch (ConfigurationException e)
-            {
-                log.error("Could not load external schema file "
-                        + externalSchemaPath,
-                    e);
-                throw new SourceTransformerException(e);
-            }
             catch (SourceException e)
             {
                 log.error("Could not construct source from schema file "

Modified: db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/OMColumnTransformer.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/OMColumnTransformer.java?rev=965168&r1=965167&r2=965168&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/OMColumnTransformer.java (original)
+++ db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/OMColumnTransformer.java Sun Jul 18 06:23:46 2010
@@ -25,6 +25,7 @@ import java.util.Set;
 
 import org.apache.commons.lang.StringUtils;
 import org.apache.torque.generator.control.ControllerState;
+import org.apache.torque.generator.jdbc.SchemaType;
 import org.apache.torque.generator.processor.string.Camelbacker;
 import org.apache.torque.generator.source.SourceElement;
 import org.apache.torque.generator.source.transform.SourceTransformerException;
@@ -33,7 +34,6 @@ import org.apache.torque.templates.Torqu
 import org.apache.torque.templates.TorqueSchemaJavaType;
 import org.apache.torque.templates.transformer.SchemaTypeHelper;
 import org.apache.torque.templates.typemapping.JavaType;
-import org.apache.torque.templates.typemapping.SchemaType;
 import org.apache.torque.templates.typemapping.TypeMap;
 import org.apache.torque.templates.typemapping.VillageMethod;
 

Modified: db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/sql/SQLTransformer.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/sql/SQLTransformer.java?rev=965168&r1=965167&r2=965168&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/sql/SQLTransformer.java (original)
+++ db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/sql/SQLTransformer.java Sun Jul 18 06:23:46 2010
@@ -25,6 +25,7 @@ import java.util.List;
 import org.apache.commons.lang.ObjectUtils;
 import org.apache.commons.lang.StringUtils;
 import org.apache.torque.generator.control.ControllerState;
+import org.apache.torque.generator.jdbc.SchemaType;
 import org.apache.torque.generator.source.SourceElement;
 import org.apache.torque.generator.source.SourcePath;
 import org.apache.torque.generator.source.transform.SourceTransformer;
@@ -39,7 +40,6 @@ import org.apache.torque.templates.trans
 import org.apache.torque.templates.transformer.SchemaTypeHelper;
 import org.apache.torque.templates.transformer.om.TableChildElementName;
 import org.apache.torque.templates.typemapping.SqlType;
-import org.apache.torque.templates.typemapping.SchemaType;
 import org.apache.torque.templates.typemapping.TypeMap;
 
 /**

Modified: db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/typemapping/TypeMap.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/typemapping/TypeMap.java?rev=965168&r1=965167&r2=965168&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/typemapping/TypeMap.java (original)
+++ db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/typemapping/TypeMap.java Sun Jul 18 06:23:46 2010
@@ -23,6 +23,8 @@ import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
 
+import org.apache.torque.generator.jdbc.SchemaType;
+
 /**
  * Various mappings for schema types, e.g. to their corresponding
  * Java object types, and Java native types.

Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/doc/html/conf/control.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/doc/html/conf/control.xml?rev=965168&r1=965167&r2=965168&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/doc/html/conf/control.xml (original)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/doc/html/conf/control.xml Sun Jul 18 06:23:46 2010
@@ -26,7 +26,7 @@
   
   <!-- Documentation css -->
   <output name="torque.doc.html.css" file="datamodel.css">
-    <source elements="database">
+    <source xsi:type="fileSource" elements="database">
       <include>*schema.xml</include>
     </source>
     <outlet name="torque.doc.html.css"/>
@@ -34,9 +34,9 @@
 
   <!-- Documentation html -->
   <output name="torque.doc.html.html" file="datamodel.html">
-    <source elements="database">
-      <include>*schema.xml</include>
+    <source xsi:type="fileSource" elements="database">
       <transformer class="org.apache.torque.templates.transformer.om.OMTransformer"/>
+      <include>*schema.xml</include>
     </source>
     <outlet name="torque.doc.html.html"/>
   </output>

Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/doc/xdoc/conf/control.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/doc/xdoc/conf/control.xml?rev=965168&r1=965167&r2=965168&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/doc/xdoc/conf/control.xml (original)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/doc/xdoc/conf/control.xml Sun Jul 18 06:23:46 2010
@@ -26,9 +26,9 @@
   
   <!-- Documentation xdoc -->
   <output name="torque.doc.xdoc.xdoc"  file="datamodel.xml">
-    <source elements="database">
-      <include>*schema.xml</include>
+    <source xsi:type="fileSource" elements="database">
       <transformer class="org.apache.torque.templates.transformer.om.OMTransformer"/>
+      <include>*schema.xml</include>
     </source>
     <outlet name="torque.doc.xdoc.xdoc"/>
   </output>

Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/idtable/conf/control.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/idtable/conf/control.xml?rev=965168&r1=965167&r2=965168&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/idtable/conf/control.xml (original)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/idtable/conf/control.xml Sun Jul 18 06:23:46 2010
@@ -30,12 +30,11 @@
       <discardFrom>.</discardFrom>
       <suffix>-idtable-init.sql</suffix>
     </filenameOutlet>
-    <source elements="database">
+    <source xsi:type="fileSource" elements="database">
       <include>*schema.xml</include>
       <exclude>id-table-schema.xml</exclude>
      </source>
     <outlet name="torque.sql.idtable.idtable"/>
   </output>
-  
 </control>
   
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/jdbc2schema/conf/control.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/jdbc2schema/conf/control.xml?rev=965168&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/jdbc2schema/conf/control.xml (added)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/jdbc2schema/conf/control.xml Sun Jul 18 06:23:46 2010
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<control loglevel="info"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://db.apache.org/torque/4.0/generator/configuration http://db.apache.org/torque/4.0/generator/configuration.xsd"
+    xmlns="http://db.apache.org/torque/4.0/generator/configuration">
+
+  <options xsi:type="propertiesOptions" path="options.properties"/>
+
+  <output name="torque.jdbc2schema">
+    <filenameOutlet
+        xsi:type="javaOutlet"
+        class="org.apache.torque.generator.outlet.java.OptionOutlet">
+      <option>torque.jdbc2schema.filename</option>
+    </filenameOutlet>
+    <source xsi:type="jdbcMetadataSource"
+        urlOption="torque.jdbc2schema.url"
+        driverOption="torque.jdbc2schema.driver"
+        usernameOption="torque.jdbc2schema.user"
+        passwordOption="torque.jdbc2schema.password"
+        schemaOption="torque.jdbc2schema.schema">
+    </source>
+    <outlet name="torque.jdbc2schema"/>
+  </output>
+  
+</control>
+  
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/jdbc2schema/conf/options.properties
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/jdbc2schema/conf/options.properties?rev=965168&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/jdbc2schema/conf/options.properties (added)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/jdbc2schema/conf/options.properties Sun Jul 18 06:23:46 2010
@@ -0,0 +1 @@
+torque.jdbc2schema.filename = schema.xml
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/jdbc2schema/outlets/jdbc2schema.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/jdbc2schema/outlets/jdbc2schema.xml?rev=965168&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/jdbc2schema/outlets/jdbc2schema.xml (added)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/jdbc2schema/outlets/jdbc2schema.xml Sun Jul 18 06:23:46 2010
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<outlets xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://db.apache.org/torque/4.0/generator/configuration http://db.apache.org/torque/4.0/generator/configuration.xsd"
+    xmlns="http://db.apache.org/torque/4.0/generator/configuration">
+  <outlet name="torque.jdbc2schema"
+      xsi:type="javaOutlet" 
+      class="org.apache.torque.generator.outlet.java.XmlOutlet">
+  </outlet>
+</outlets>
\ No newline at end of file

Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/conf/control.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/conf/control.xml?rev=965168&r1=965167&r2=965168&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/conf/control.xml (original)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/conf/control.xml Sun Jul 18 06:23:46 2010
@@ -43,10 +43,10 @@
             acceptNotSet="false"/>
       </mergepoint>
     </filenameOutlet>
-    <source elements="database/table">
+    <source xsi:type="fileSource" elements="database/table">
+      <transformer class="org.apache.torque.templates.transformer.om.OMTransformer"/>
       <include>*schema.xml</include>
       <exclude>id-table-schema.xml</exclude>
-      <transformer class="org.apache.torque.templates.transformer.om.OMTransformer"/>
     </source>
     <outlet name="torque.om.dbObject"/>
   </output>
@@ -69,11 +69,11 @@
             acceptNotSet="false"/>
       </mergepoint>
     </filenameOutlet>
-    <source elements="database/table">
-      <include>*schema.xml</include>
-      <exclude>id-table-schema.xml</exclude>
+    <source xsi:type="fileSource" elements="database/table">
       <transformer class="org.apache.torque.templates.transformer.om.OMTransformer"/>
       <transformer class="org.apache.torque.templates.transformer.om.dbobject.base.BaseDbObjectTransformer"/>
+      <include>*schema.xml</include>
+      <exclude>id-table-schema.xml</exclude>
     </source>
     <outlet name="torque.om.baseDbObject"/>
   </output>
@@ -97,10 +97,10 @@
             acceptNotSet="false"/>
       </mergepoint>
     </filenameOutlet>
-    <source elements="database/table/column/inheritance">
+    <source xsi:type="fileSource" elements="database/table/column/inheritance">
+      <transformer class="org.apache.torque.templates.transformer.om.OMTransformer"/>
       <include>*schema.xml</include>
       <exclude>id-table-schema.xml</exclude>
-      <transformer class="org.apache.torque.templates.transformer.om.OMTransformer"/>
     </source>
     <outlet name="torque.om.inheritanceDbObject"/>
   </output>
@@ -124,11 +124,11 @@
             acceptNotSet="true"/>
       </mergepoint>
     </filenameOutlet>
-    <source elements="database/table"
-        filter="org.apache.torque.templates.sourcefilter.InterfaceSourceFilter">
+    <source xsi:type="fileSource" elements="database/table"
+        skipDecider="org.apache.torque.templates.sourcefilter.InterfaceSkipDecider">
+      <transformer class="org.apache.torque.templates.transformer.om.OMTransformer"/>
       <include>*schema.xml</include>
       <exclude>id-table-schema.xml</exclude>
-      <transformer class="org.apache.torque.templates.transformer.om.OMTransformer"/>
     </source>
     <outlet name="torque.om.interface"/>
   </output>
@@ -152,10 +152,10 @@
             acceptNotSet="false"/>
       </mergepoint>
     </filenameOutlet>
-    <source elements="database/table">
+    <source xsi:type="fileSource" elements="database/table">
+      <transformer class="org.apache.torque.templates.transformer.om.OMTransformer"/>
       <include>*schema.xml</include>
       <exclude>id-table-schema.xml</exclude>
-      <transformer class="org.apache.torque.templates.transformer.om.OMTransformer"/>
     </source>
     <outlet name="torque.om.peer"/>
   </output>
@@ -179,10 +179,10 @@
             acceptNotSet="false"/>
       </mergepoint>
     </filenameOutlet>
-    <source elements="database/table">
+    <source xsi:type="fileSource" elements="database/table">
+      <transformer class="org.apache.torque.templates.transformer.om.OMTransformer"/>
       <include>*schema.xml</include>
       <exclude>id-table-schema.xml</exclude>
-      <transformer class="org.apache.torque.templates.transformer.om.OMTransformer"/>
     </source>
     <outlet name="torque.om.basePeer"/>
   </output>
@@ -206,10 +206,10 @@
             acceptNotSet="false"/>
       </mergepoint>
     </filenameOutlet>
-    <source elements="database/table">
+    <source xsi:type="fileSource" elements="database/table">
+      <transformer class="org.apache.torque.templates.transformer.om.OMTransformer"/>
       <include>*schema.xml</include>
       <exclude>id-table-schema.xml</exclude>
-      <transformer class="org.apache.torque.templates.transformer.om.OMTransformer"/>
     </source>
     <outlet name="torque.om.mapBuilder"/>
   </output>
@@ -233,11 +233,11 @@
             acceptNotSet="false"/>
       </mergepoint>
     </filenameOutlet>
-    <source elements="database/table"
-        filter="org.apache.torque.templates.sourcefilter.BeanSourceFilter">
+    <source xsi:type="fileSource" elements="database/table"
+        skipDecider="org.apache.torque.templates.sourcefilter.BeanSkipDecider">
+      <transformer class="org.apache.torque.templates.transformer.om.OMTransformer"/>
       <include>*schema.xml</include>
       <exclude>id-table-schema.xml</exclude>
-      <transformer class="org.apache.torque.templates.transformer.om.OMTransformer"/>
     </source>
     <outlet name="torque.om.bean.bean"/>
   </output>
@@ -261,11 +261,11 @@
             acceptNotSet="false"/>
       </mergepoint>
     </filenameOutlet>
-    <source elements="database/table"
-        filter="org.apache.torque.templates.sourcefilter.BeanSourceFilter">
+    <source xsi:type="fileSource" elements="database/table"
+        skipDecider="org.apache.torque.templates.sourcefilter.BeanSkipDecider">
+      <transformer class="org.apache.torque.templates.transformer.om.OMTransformer"/>
       <include>*schema.xml</include>
       <exclude>id-table-schema.xml</exclude>
-      <transformer class="org.apache.torque.templates.transformer.om.OMTransformer"/>
     </source>
     <outlet name="torque.om.bean.baseBean"/>
   </output>
@@ -289,11 +289,11 @@
             acceptNotSet="false"/>
       </mergepoint>
     </filenameOutlet>
-    <source elements="database/table/column/inheritance"
-        filter="org.apache.torque.templates.sourcefilter.BeanSourceFilter">
+    <source xsi:type="fileSource" elements="database/table/column/inheritance"
+        skipDecider="org.apache.torque.templates.sourcefilter.BeanSkipDecider">
+      <transformer class="org.apache.torque.templates.transformer.om.OMTransformer"/>
       <include>*schema.xml</include>
       <exclude>id-table-schema.xml</exclude>
-      <transformer class="org.apache.torque.templates.transformer.om.OMTransformer"/>
     </source>
     <outlet name="torque.om.inheritanceBean"/>
   </output>
@@ -316,11 +316,11 @@
             acceptNotSet="false"/>
       </mergepoint>
     </filenameOutlet>
-    <source elements="database" 
-        filter="org.apache.torque.templates.sourcefilter.MapInitSourceFilter">
+    <source xsi:type="fileSource" elements="database" 
+        skipDecider="org.apache.torque.templates.sourcefilter.MapInitSkipDecider">
+      <transformer class="org.apache.torque.templates.transformer.om.mapInit.MapInitDatabaseTransformer"/>
       <include>*schema.xml</include>
       <exclude>id-table-schema.xml</exclude>
-      <transformer class="org.apache.torque.templates.transformer.om.mapInit.MapInitDatabaseTransformer"/>
     </source>
     <outlet name="torque.om.mapInit.mapInit"/>
   </output>
@@ -344,12 +344,12 @@
             acceptNotSet="false"/>
       </mergepoint>
     </filenameOutlet>
-    <source elements="database" 
-        filter="org.apache.torque.templates.sourcefilter.MapInitSourceFilter">
-      <include>*schema.xml</include>
-      <exclude>id-table-schema.xml</exclude>
+    <source xsi:type="fileSource" elements="database" 
+        skipDecider="org.apache.torque.templates.sourcefilter.MapInitSkipDecider">
       <transformer class="org.apache.torque.templates.transformer.om.mapInit.MapInitDatabaseTransformer"/>
       <transformer class="org.apache.torque.templates.transformer.om.OMTransformer"/>
+      <include>*schema.xml</include>
+      <exclude>id-table-schema.xml</exclude>
     </source>
     <outlet name="torque.om.mapInit.baseMapInit"/>
   </output>
@@ -373,11 +373,11 @@
             acceptNotSet="false"/>
       </mergepoint>
     </filenameOutlet>
-    <source elements="database/table" 
-        filter="org.apache.torque.templates.sourcefilter.ManagerSourceFilter">
+    <source xsi:type="fileSource" elements="database/table" 
+        skipDecider="org.apache.torque.templates.sourcefilter.ManagerSkipDecider">
+      <transformer class="org.apache.torque.templates.transformer.om.OMTransformer"/>
       <include>*schema.xml</include>
       <exclude>id-table-schema.xml</exclude>
-      <transformer class="org.apache.torque.templates.transformer.om.OMTransformer"/>
     </source>
     <outlet name="torque.om.manager.manager"/>
   </output>
@@ -402,11 +402,11 @@
             acceptNotSet="false"/>
       </mergepoint>
     </filenameOutlet>
-    <source elements="database/table"
-        filter="org.apache.torque.templates.sourcefilter.ManagerSourceFilter">
+    <source xsi:type="fileSource" elements="database/table"
+        skipDecider="org.apache.torque.templates.sourcefilter.ManagerSkipDecider">
+      <transformer class="org.apache.torque.templates.transformer.om.OMTransformer"/>
       <include>*schema.xml</include>
       <exclude>id-table-schema.xml</exclude>
-      <transformer class="org.apache.torque.templates.transformer.om.OMTransformer"/>
     </source>
     <outlet name="torque.om.manager.baseManager"/>
   </output>

Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/conf/control.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/conf/control.xml?rev=965168&r1=965167&r2=965168&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/conf/control.xml (original)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/conf/control.xml Sun Jul 18 06:23:46 2010
@@ -32,9 +32,9 @@
       <discardFrom>.</discardFrom>
       <suffix>.sql</suffix>
     </filenameOutlet>
-    <source elements="database">
-      <include>*schema.xml</include>
+    <source xsi:type="fileSource" elements="database">
       <transformer class="org.apache.torque.templates.transformer.sql.SQLTransformer"/>
+      <include>*schema.xml</include>
     </source>
     <outlet name="torque.sql.ddl.database"/>
   </output>

Modified: db/torque/torque4/trunk/torque-templates/src/test/java/org/apache/torque/templates/TestProcessing.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/test/java/org/apache/torque/templates/TestProcessing.java?rev=965168&r1=965167&r2=965168&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/test/java/org/apache/torque/templates/TestProcessing.java (original)
+++ db/torque/torque4/trunk/torque-templates/src/test/java/org/apache/torque/templates/TestProcessing.java Sun Jul 18 06:23:46 2010
@@ -34,6 +34,8 @@ import org.apache.torque.generator.confi
 import org.apache.torque.generator.configuration.paths.Maven2DirectoryProjectPaths;
 import org.apache.torque.generator.control.Controller;
 import org.apache.torque.generator.file.Fileset;
+import org.apache.torque.generator.source.SourceProvider;
+import org.apache.torque.generator.source.stream.FileSourceProvider;
 import org.junit.Test;
 
 public class TestProcessing
@@ -61,12 +63,17 @@ public class TestProcessing
         Set<String> sourceIncludes = new HashSet<String>();
         sourceIncludes.add("schema.xml");
         sourceFileset.setIncludes(sourceIncludes);
+        sourceFileset.setBasedir(projectPaths.getDefaultSourcePath());
+        SourceProvider sourceProvider 
+                = new FileSourceProvider(
+                        null,
+                        sourceFileset);
         unitDescriptors.add(new UnitDescriptor(
                 UnitDescriptor.Packaging.DIRECTORY,
                 projectPaths,
                 new DefaultTorqueGeneratorPaths(),
                 null,
-                sourceFileset,
+                sourceProvider,
                 new MapOptionsConfiguration(overrideOptions),
                 null));
 

Added: db/torque/torque4/trunk/torque-templates/src/test/java/org/apache/torque/templates/jdbc2schema/Jdbc2SchemaTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/test/java/org/apache/torque/templates/jdbc2schema/Jdbc2SchemaTest.java?rev=965168&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/test/java/org/apache/torque/templates/jdbc2schema/Jdbc2SchemaTest.java (added)
+++ db/torque/torque4/trunk/torque-templates/src/test/java/org/apache/torque/templates/jdbc2schema/Jdbc2SchemaTest.java Sun Jul 18 06:23:46 2010
@@ -0,0 +1,141 @@
+package org.apache.torque.templates.jdbc2schema;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.StringTokenizer;
+
+import junitx.framework.FileAssert;
+
+import org.apache.log4j.BasicConfigurator;
+import org.apache.log4j.Logger;
+import org.apache.torque.generator.configuration.UnitDescriptor;
+import org.apache.torque.generator.configuration.option.MapOptionsConfiguration;
+import org.apache.torque.generator.configuration.paths.CustomProjectPaths;
+import org.apache.torque.generator.configuration.paths.DefaultTorqueGeneratorPaths;
+import org.apache.torque.generator.configuration.paths.Maven2DirectoryProjectPaths;
+import org.apache.torque.generator.control.Controller;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class Jdbc2SchemaTest
+{
+    private static Logger logger 
+            = Logger.getLogger(Jdbc2SchemaTest.class);
+    
+    private static String SQL_FILENAME = "jdbc2schemaTest.sql";
+
+    private static String SQL_CHARSET = "iso-8859-1";
+
+    private static String URL = "jdbc:derby:memory:myDb;create=true";
+
+    private static String DRIVER = "org.apache.derby.jdbc.ClientDriver";
+
+    @BeforeClass
+    public static void beforeClass() throws Exception
+    {
+        Class.forName(DRIVER).newInstance();
+    }
+
+    @Before
+    public void setUp() throws Exception
+    {
+        BasicConfigurator.configure();
+        Connection connection = DriverManager.getConnection(URL);
+        InputStream inputStream = getClass().getResourceAsStream(SQL_FILENAME);
+        BufferedReader bufferedReader = new BufferedReader(
+                new InputStreamReader(inputStream, SQL_CHARSET));
+        String line;
+        StringBuilder queryBuffer = new StringBuilder();
+        while ((line = bufferedReader.readLine()) != null)
+        {
+            if (line.trim().length() == 0 || line.trim().startsWith("--"))
+            {
+                continue;
+            }
+            queryBuffer.append(line);
+        }
+        StringTokenizer tokenizer
+            = new StringTokenizer(queryBuffer.toString(), ";", false);
+        while (tokenizer.hasMoreTokens())
+        {
+          String sqlQuery = tokenizer.nextToken();
+          Statement statement = connection.createStatement();
+          try
+          {
+            statement.execute(sqlQuery);
+          }
+          catch (SQLException e)
+          {
+            logger.info(e.getMessage());
+          }
+          statement.close();
+        }
+        connection.close();
+    }
+
+    @Test
+    public void testExecute() throws Exception
+    {
+        Controller controller = new Controller();
+        List<UnitDescriptor> unitDescriptors = new ArrayList<UnitDescriptor>();
+        Map<String, String> overrideOptions = new HashMap<String, String>();
+        overrideOptions.put("torque.jdbc2schema.url", URL);
+        overrideOptions.put("torque.jdbc2schema.driver", DRIVER);
+
+        CustomProjectPaths projectPaths
+                = new CustomProjectPaths(
+                    new Maven2DirectoryProjectPaths(new File(".")));
+        projectPaths.setConfigurationDir(
+                new File("src/main/resources/org/apache/torque/templates/jdbc2schema"));
+        projectPaths.setNewFileTargetDir(
+                new File("target/generated-schema"));
+        unitDescriptors.add(new UnitDescriptor(
+                UnitDescriptor.Packaging.DIRECTORY,
+                projectPaths,
+                new DefaultTorqueGeneratorPaths(),
+                null,
+                null,
+                new MapOptionsConfiguration(overrideOptions),
+                null));
+
+        controller.run(unitDescriptors);
+        
+        File generatedFile = new File("target/generated-schema/schema.xml");
+        assertTrue(generatedFile.exists());
+        File referenceFile = new File(
+                "src/test/resources/org/apache/torque/templates/jdbc2schema/expected-schema.xml");
+        FileAssert.assertEquals(referenceFile, generatedFile);
+    }
+}

Added: db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/jdbc2schema/expected-schema.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/jdbc2schema/expected-schema.xml?rev=965168&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/jdbc2schema/expected-schema.xml (added)
+++ db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/jdbc2schema/expected-schema.xml Sun Jul 18 06:23:46 2010
@@ -0,0 +1,15 @@
+<database>
+  <table name="AUTHOR">
+    <column default="GENERATED_BY_DEFAULT" primaryKey="true" name="AUTHOR_ID" type="INTEGER"/>
+    <column name="NAME" required="true" type="VARCHAR" size="50"/>
+  </table>
+  <table name="BOOK">
+    <column default="GENERATED_BY_DEFAULT" primaryKey="true" name="BOOK_ID" type="INTEGER"/>
+    <column name="ISBN" type="VARCHAR" size="15"/>
+    <column name="AUTHOR_ID" required="true" type="INTEGER"/>
+    <column default="no title" name="TITLE" required="true" type="VARCHAR" size="255"/>
+    <foreign-key foreignTable="AUTHOR">
+      <reference local="AUTHOR_ID" foreign="AUTHOR_ID"/>
+    </foreign-key>
+  </table>
+</database>

Added: db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/jdbc2schema/jdbc2schemaTest.sql
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/jdbc2schema/jdbc2schemaTest.sql?rev=965168&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/jdbc2schema/jdbc2schemaTest.sql (added)
+++ db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/jdbc2schema/jdbc2schemaTest.sql Sun Jul 18 06:23:46 2010
@@ -0,0 +1,38 @@
+-- -----------------------------------------------------------------------
+-- derby SQL script for schema bookstore
+-- -----------------------------------------------------------------------
+
+
+
+-- -----------------------------------------------------------------------
+-- book
+-- -----------------------------------------------------------------------
+CREATE TABLE book
+(
+    book_id INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY,
+    isbn VARCHAR(15),
+    author_id INTEGER NOT NULL,
+    title VARCHAR(255) NOT NULL default 'no title',
+    PRIMARY KEY(book_id));
+
+
+
+
+-- -----------------------------------------------------------------------
+-- author
+-- -----------------------------------------------------------------------
+CREATE TABLE author
+(
+    author_id INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY,
+    name VARCHAR(50) NOT NULL,
+    PRIMARY KEY(author_id));
+
+
+
+
+ALTER TABLE book
+    ADD CONSTRAINT book_FK_1 
+    FOREIGN KEY (author_id)
+    REFERENCES author (author_id);
+
+



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message