db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1394348 - in /db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates: dbObject/base/ peer/base/ peer/impl/base/ recordmapper/base/
Date Fri, 05 Oct 2012 02:22:39 GMT
Author: tfischer
Date: Fri Oct  5 02:22:38 2012
New Revision: 1394348

URL: http://svn.apache.org/viewvc?rev=1394348&view=rev
Log:
TORQUE-228 Imports not generated correctly if classes are generated into different packages

TORQUE-230 Deprecated BasePeer class should not be imported in generated files

Modified:
    db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/baseDbObjectForView.vm
    db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/imports.vm
    db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/imports.vm
    db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/imports.vm
    db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/recordmapper/base/recordMapperBase.vm

Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/baseDbObjectForView.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/baseDbObjectForView.vm?rev=1394348&r1=1394347&r2=1394348&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/baseDbObjectForView.vm
(original)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/baseDbObjectForView.vm
Fri Oct  5 02:22:38 2012
@@ -76,9 +76,12 @@ $torqueGen.mergepoint("imports")##
 #if ($torqueGen.booleanOption("torque.om.generateBeans"))
 $torqueGen.mergepoint("objectBeanImports")
 #end
-#if ($peerPackage != $dbObjectPackage)
+#if ($peerPackage != $baseDbObjectPackage)
 import ${peerPackage}.${peerClassName};
 #end
+#if ($dbObjectPackage != $baseDbObjectPackage)
+import ${dbObjectPackage}.${dbObjectClassName};
+#end
 $torqueGen.mergepoint("classJavadoc")
 #if ($baseClass == "")
   #set ($extendsBaseClass = "" )

Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/imports.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/imports.vm?rev=1394348&r1=1394347&r2=1394348&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/imports.vm
(original)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/imports.vm
Fri Oct  5 02:22:38 2012
@@ -74,6 +74,9 @@ import $tblFK.Interface;
 #if ($torqueGen.booleanOption("torque.om.generateBeans"))
 $torqueGen.mergepoint("objectBeanImports")
 #end
-#if ($peerPackage != $dbObjectPackage)
+#if ($peerPackage != $baseDbObjectPackage)
 import ${peerPackage}.${peerClassName};
 #end
+#if ($dbObjectPackage != $baseDbObjectPackage)
+import ${dbObjectPackage}.*;
+#end

Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/imports.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/imports.vm?rev=1394348&r1=1394347&r2=1394348&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/imports.vm
(original)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/imports.vm
Fri Oct  5 02:22:38 2012
@@ -60,11 +60,14 @@ import org.apache.torque.om.NumberKey;
 import org.apache.torque.om.StringKey;
 import org.apache.torque.om.ObjectKey;
 import org.apache.torque.om.SimpleKey;
-import org.apache.torque.util.BasePeer;
 import org.apache.torque.util.Transaction;
 import org.apache.torque.util.ColumnValues;
 import org.apache.torque.util.JdbcTypedValue;
 
 #if ($basePeerPackage != $dbObjectPackage)
 import ${dbObjectPackage}.*;
-#end
\ No newline at end of file
+#end
+#if ($basePeerPackage != $peerPackage)
+import ${peerPackage}.${peerClassName};
+import ${peerPackage}.${peerImplClassName};
+#end

Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/imports.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/imports.vm?rev=1394348&r1=1394347&r2=1394348&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/imports.vm
(original)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/imports.vm
Fri Oct  5 02:22:38 2012
@@ -70,7 +70,6 @@ import org.apache.torque.om.ObjectKey;
 import org.apache.torque.om.SimpleKey;
 import org.apache.torque.om.ComboKey;
 import org.apache.torque.map.TableMap;
-import org.apache.torque.util.BasePeer;
 import org.apache.torque.util.Transaction;
 import org.apache.torque.util.ColumnValues;
 import org.apache.torque.util.JdbcTypedValue;
@@ -78,9 +77,9 @@ import org.apache.torque.util.JdbcTypedV
 #if ($basePeerPackage != $dbObjectPackage)
 import ${dbObjectPackage}.*;
 #end
-#if ($basePeerPackage != $recordMapperPackage)
+#if (($basePeerPackage != $recordMapperPackage) && ($recordMapperPackage != $dbObjectPackage))
 import ${recordMapperPackage}.*;
 #end
 #if ($basePeerPackage != $peerPackage)
-import ${peerPackage}.${peerClassName}
+import ${peerPackage}.*;
 #end
\ No newline at end of file

Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/recordmapper/base/recordMapperBase.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/recordmapper/base/recordMapperBase.vm?rev=1394348&r1=1394347&r2=1394348&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/recordmapper/base/recordMapperBase.vm
(original)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/recordmapper/base/recordMapperBase.vm
Fri Oct  5 02:22:38 2012
@@ -38,13 +38,15 @@ import org.apache.torque.om.mapper.Recor
 #if (${baseRecordMapperPackage} != $dbObjectPackage)
 import ${dbObjectPackage}.${dbObjectClassName};
 #end
+#if (${baseRecordMapperPackage} != $peerPackage)
+import ${peerPackage}.${peerClassName};
+#end
 #set ( $inheritanceBaseColumnElements = $torqueGen.getChildren("inheritance-column"))
 ## there should at most be one inheritance-column in each table
 #foreach ($inheritanceBaseColumnElement in $inheritanceBaseColumnElements)
   #set ( $columnElement = $inheritanceBaseColumnElement.getChild("column") )
   #set ( $inheritanceElements = $columnElement.getChildren("inheritance"))
   #if ($inheritanceElements.size() > 0)
-import ${peerPackage}.${peerClassName};
     #if (${baseRecordMapperPackage} != $dbObjectPackage)
       #foreach ($inheritanceElement in $inheritanceElements)
         #set ( $inheritanceClassName = $inheritanceElement.getAttribute("className") )



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