db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r915702 - in /db/torque/torque4/trunk/torque-templates/src/main: java/org/apache/torque/templates/sourcefilter/ resources/org/apache/torque/templates/om/conf/
Date Wed, 24 Feb 2010 07:07:12 GMT
Author: tfischer
Date: Wed Feb 24 07:07:12 2010
New Revision: 915702

URL: http://svn.apache.org/viewvc?rev=915702&view=rev
Log:
exclude id-table-schema.xml from om generation

Added:
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/sourcefilter/ExcludeIdTableSchemaSourceFilter.java
Modified:
    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/resources/org/apache/torque/templates/om/conf/control.xml

Modified: 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/BeanSourceFilter.java?rev=915702&r1=915701&r2=915702&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/BeanSourceFilter.java
Wed Feb 24 07:07:12 2010
@@ -33,6 +33,10 @@
 {
     public boolean proceed(ControllerState controllerState)
     {
+    	if (!new ExcludeIdTableSchemaSourceFilter().proceed(controllerState))
+    	{
+    		return false;
+    	}
         return controllerState.getBooleanOption(
                 TemplateOptionName.GENERATE_BEANS);
     }

Added: db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/sourcefilter/ExcludeIdTableSchemaSourceFilter.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/sourcefilter/ExcludeIdTableSchemaSourceFilter.java?rev=915702&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/sourcefilter/ExcludeIdTableSchemaSourceFilter.java
(added)
+++ db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/sourcefilter/ExcludeIdTableSchemaSourceFilter.java
Wed Feb 24 07:07:12 2010
@@ -0,0 +1,40 @@
+package org.apache.torque.templates.sourcefilter;
+
+/*
+ * 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 org.apache.torque.gf.control.ControllerState;
+import org.apache.torque.gf.source.filter.SourceFilter;
+
+/**
+ * A source filter which skips the id table schema file.
+ *
+ * @version $Id: $
+ */
+public class ExcludeIdTableSchemaSourceFilter implements SourceFilter
+{
+	/** The name of the id table schema. */
+	private static final String ID_TABLE_SCHEMA_NAME = "id-table-schema.xml";
+	
+    public boolean proceed(ControllerState controllerState)
+    {
+        return !ID_TABLE_SCHEMA_NAME.equals(
+        		controllerState.getSourceFile().getName());
+    }
+}

Modified: 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/InterfaceSourceFilter.java?rev=915702&r1=915701&r2=915702&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/InterfaceSourceFilter.java
Wed Feb 24 07:07:12 2010
@@ -35,6 +35,10 @@
 {
     public boolean proceed(ControllerState controllerState)
     {
+    	if (!new ExcludeIdTableSchemaSourceFilter().proceed(controllerState))
+    	{
+    		return false;
+    	}
         SourceElement sourceElement = controllerState.getSourceElement();
         String interfaceName
                 = (String) sourceElement.getAttribute(

Modified: 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/ManagerSourceFilter.java?rev=915702&r1=915701&r2=915702&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/ManagerSourceFilter.java
Wed Feb 24 07:07:12 2010
@@ -32,6 +32,10 @@
 {
     public boolean proceed(ControllerState controllerState)
     {
+    	if (!new ExcludeIdTableSchemaSourceFilter().proceed(controllerState))
+    	{
+    		return false;
+    	}
         if (!controllerState.getBooleanOption(
                 TemplateOptionName.OM_USE_MANAGERS))
         {

Modified: 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/MapInitSourceFilter.java?rev=915702&r1=915701&r2=915702&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/MapInitSourceFilter.java
Wed Feb 24 07:07:12 2010
@@ -33,6 +33,10 @@
 {
     public boolean proceed(ControllerState controllerState)
     {
+    	if (!new ExcludeIdTableSchemaSourceFilter().proceed(controllerState))
+    	{
+    		return false;
+    	}
         return controllerState.getBooleanOption(
                 TemplateOptionName.OM_GENERATE_MAP_INIT);
     }

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=915702&r1=915701&r2=915702&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
Wed Feb 24 07:07:12 2010
@@ -43,7 +43,9 @@
             acceptNotSet="false"/>
       </mergepoint>
     </filenameGenerator>
-    <source elements="database/table" path="*schema.xml">
+    <source elements="database/table" 
+        path="*schema.xml"
+        filter="org.apache.torque.templates.sourcefilter.ExcludeIdTableSchemaSourceFilter">
       <transformer class="org.apache.torque.templates.transformer.om.OMTransformer"/>
     </source>
     <generator name="torque.om.dbObject"/>
@@ -67,7 +69,9 @@
             acceptNotSet="false"/>
       </mergepoint>
     </filenameGenerator>
-    <source elements="database/table" path="*schema.xml">
+    <source elements="database/table" 
+        path="*schema.xml"
+        filter="org.apache.torque.templates.sourcefilter.ExcludeIdTableSchemaSourceFilter">
       <transformer class="org.apache.torque.templates.transformer.om.OMTransformer"/>
       <transformer class="org.apache.torque.templates.transformer.om.dbobject.base.BaseDbObjectTransformer"/>
     </source>
@@ -93,7 +97,9 @@
             acceptNotSet="false"/>
       </mergepoint>
     </filenameGenerator>
-    <source elements="database/table/column/inheritance" path="*schema.xml">
+    <source elements="database/table/column/inheritance"
+        path="*schema.xml"
+        filter="org.apache.torque.templates.sourcefilter.ExcludeIdTableSchemaSourceFilter">
       <transformer class="org.apache.torque.templates.transformer.om.OMTransformer"/>
     </source>
     <generator name="torque.om.inheritanceDbObject"/>
@@ -145,7 +151,9 @@
             acceptNotSet="false"/>
       </mergepoint>
     </filenameGenerator>
-    <source elements="database/table" path="*schema.xml">
+    <source elements="database/table"
+        path="*schema.xml"
+        filter="org.apache.torque.templates.sourcefilter.ExcludeIdTableSchemaSourceFilter">
       <transformer class="org.apache.torque.templates.transformer.om.OMTransformer"/>
     </source>
     <generator name="torque.om.peer"/>
@@ -170,7 +178,9 @@
             acceptNotSet="false"/>
       </mergepoint>
     </filenameGenerator>
-    <source elements="database/table" path="*schema.xml">
+    <source elements="database/table"
+        path="*schema.xml"
+        filter="org.apache.torque.templates.sourcefilter.ExcludeIdTableSchemaSourceFilter">
       <transformer class="org.apache.torque.templates.transformer.om.OMTransformer"/>
     </source>
     <generator name="torque.om.basePeer"/>
@@ -195,7 +205,9 @@
             acceptNotSet="false"/>
       </mergepoint>
     </filenameGenerator>
-    <source elements="database/table" path="*schema.xml">
+    <source elements="database/table"
+        path="*schema.xml"
+        filter="org.apache.torque.templates.sourcefilter.ExcludeIdTableSchemaSourceFilter">
       <transformer class="org.apache.torque.templates.transformer.om.OMTransformer"/>
     </source>
     <generator name="torque.om.mapBuilder"/>
@@ -274,7 +286,9 @@
             acceptNotSet="false"/>
       </mergepoint>
     </filenameGenerator>
-    <source elements="database/table/column/inheritance" path="*schema.xml">
+    <source elements="database/table/column/inheritance"
+        path="*schema.xml"
+        filter="org.apache.torque.templates.sourcefilter.ExcludeIdTableSchemaSourceFilter">
       <transformer class="org.apache.torque.templates.transformer.om.OMTransformer"/>
     </source>
     <generator name="torque.om.inheritanceBean"/>



---------------------------------------------------------------------
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