db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1394910 - in /db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates: om/templates/mapInit/baseMapInit.vm transformer/om/mapInit/DatabaseMapInitTableTransformer.properties
Date Sat, 06 Oct 2012 03:22:03 GMT
Author: tfischer
Date: Sat Oct  6 03:22:03 2012
New Revision: 1394910

URL: http://svn.apache.org/viewvc?rev=1394910&view=rev
Log:
TORQUE-231 BaseMapInit classes should import peer classes by import per class

Modified:
    db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/mapInit/baseMapInit.vm
    db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/transformer/om/mapInit/DatabaseMapInitTableTransformer.properties

Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/mapInit/baseMapInit.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/mapInit/baseMapInit.vm?rev=1394910&r1=1394909&r2=1394910&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/mapInit/baseMapInit.vm
(original)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/mapInit/baseMapInit.vm
Sat Oct  6 03:22:03 2012
@@ -26,8 +26,14 @@
 ##
 package ${mapInitPackage};
 
-#if ($peerPackage != $mapInitPackage)
-import ${peerPackage}.*;
+#set ( $databaseSetElement = $torqueGen.getSourceElement() )
+#set ( $tableElements = $databaseSetElement.getChildren("table") )
+#foreach ( $tableElement in $tableElements )
+  #set ( $peerClassName = $tableElement.getAttribute("peerClassName") )
+  #set ( $tablePeerPackage = $tableElement.getAttribute("peerPackage") )
+  #if ($tablePeerPackage != $mapInitPackage)
+import ${tablePeerPackage}.${peerClassName};
+  #end
 #end
 /**
  * This is a Torque Generated class that is used to load all database map 
@@ -41,8 +47,6 @@ public class ${baseDatabaseMapInitClassN
 {
     public static final void init()
     {
-#set ( $databaseSetElement = $torqueGen.getSourceElement() )
-#set ( $tableElements = $databaseSetElement.getChildren("table") )
 #foreach ( $tableElement in $tableElements )
   #set ( $peerClassName = $tableElement.getAttribute("peerClassName") )
   #set ( $peerImplGetter = $tableElement.getAttribute("peerImplGetter") )

Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/transformer/om/mapInit/DatabaseMapInitTableTransformer.properties
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/transformer/om/mapInit/DatabaseMapInitTableTransformer.properties?rev=1394910&r1=1394909&r2=1394910&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/transformer/om/mapInit/DatabaseMapInitTableTransformer.properties
(original)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/transformer/om/mapInit/DatabaseMapInitTableTransformer.properties
Sat Oct  6 03:22:03 2012
@@ -18,3 +18,4 @@
 ${attribute(noOverride):mapInitPackage}=${option:torque.om.package.package}${option:torque.om.package.mapInitPackageSuffix}
 ${attribute(noOverride):peerClassName}=${option:torque.om.className.peerClassNamePrefix}${attribute:javaName}${option:torque.om.className.peerClassNameSuffix}
 ${attribute(noOverride):peerImplClassName}=${option:torque.om.className.peerImplClassNamePrefix}${attribute:javaName}${option:torque.om.className.peerImplClassNameSuffix}
+${attribute(noOverride):peerPackage}=${option:torque.om.package.package}${option:torque.om.package.peerPackageSuffix}



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