db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1394911 - in /db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base: imports.vm initDatabaseMap.vm
Date Sat, 06 Oct 2012 03:39:01 GMT
Author: tfischer
Date: Sat Oct  6 03:39:01 2012
New Revision: 1394911

URL: http://svn.apache.org/viewvc?rev=1394911&view=rev
Log:
TORQUE-232 generated peer's initDatabaseMap() methods should call the init method of the DatabaseMapInit
class
TORQUE-228 Imports not generated correctly if classes are generated into different package:
correct generated MapInit imports in BasePeer classes

Modified:
    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/base/initDatabaseMap.vm

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=1394911&r1=1394910&r2=1394911&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
Sat Oct  6 03:39:01 2012
@@ -71,3 +71,10 @@ import ${dbObjectPackage}.*;
 import ${peerPackage}.${peerClassName};
 import ${peerPackage}.${peerImplClassName};
 #end
+#if (${generateMapInit} == "true")
+  #set ($databaseMapInitPackage = $torqueGen.option("torque.om.mapInit.databaseMapInitPackage"))
+  #set ($databaseMapInitClassName = $torqueGen.getParent().getAttribute("databaseMapInitClassName"))
+  #if (($basePeerPackage != $databaseMapInitPackage))
+import ${databaseMapInitPackage}.${databaseMapInitClassName};
+  #end
+#end

Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/initDatabaseMap.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/initDatabaseMap.vm?rev=1394911&r1=1394910&r2=1394911&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/initDatabaseMap.vm
(original)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/initDatabaseMap.vm
Sat Oct  6 03:39:01 2012
@@ -29,12 +29,12 @@
 ##
 #set ( $databaseElement = $torqueGen.getParent() )
 #set ( $databaseName = $databaseElement.getAttribute("name") )
-#set ( $baseDatabaseMapInitClassName = $databaseElement.getAttribute("baseDatabaseMapInitClassName")
)
+#set ( $databaseMapInitClassName = $databaseElement.getAttribute("databaseMapInitClassName")
)
 #set ( $databaseOptionElements = $databaseElement.getChildren("option") )
     public static void initDatabaseMap()
     {
 #if (${generateMapInit} == "true")
-        ${baseDatabaseMapInitClassName}.init();
+        ${databaseMapInitClassName}.init();
 #end
 ## TODO the following needs not be executed for every table
 ## but it causes no harm



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