db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mpoes...@apache.org
Subject cvs commit: db-torque/src/generator/src/templates/om Control.vm
Date Sat, 28 Jun 2003 15:38:28 GMT
mpoeschl    2003/06/28 08:38:28

  Modified:    src/generator/src/templates/om Control.vm
  Log:
  formatting
  
  Revision  Changes    Path
  1.3       +59 -66    db-torque/src/generator/src/templates/om/Control.vm
  
  Index: Control.vm
  ===================================================================
  RCS file: /home/cvs/db-torque/src/generator/src/templates/om/Control.vm,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Control.vm	23 Feb 2003 20:02:51 -0000	1.2
  +++ Control.vm	28 Jun 2003 15:38:28 -0000	1.3
  @@ -32,87 +32,80 @@
     $files.mkdir("$outputDirectory/$path")
   
     #foreach ($tbl in $database.Tables)
  -   #if (!$tbl.isForReferenceOnly())
  -    $tbl.Name
  -    #set ( $firstcap=$tbl.JavaName )
  -
  -    #set ( $fname = "$basePrefix${firstcap}Peer.java" )
  -    #set ( $path = "${strings.getPackageAsPath($pkbase)}$fname" )
  -    $generator.parse("om/Peer.vm",$path,"table",$tbl)
  -
  -    #if (!$tbl.isAlias())
  -      #set ( $fname = "${firstcap}MapBuilder.java" )
  -      #set ( $path = "${strings.getPackageAsPath($pkmap)}$fname" )
  -      $generator.parse("om/MapBuilder.vm",$path,"table",$tbl)
  -    #end
  -
  -#if ($useManagers && $tbl.PrimaryKey.size() > 0)
  -
  -    #set ($interfaceName = $table.JavaName)
  -    #if ($table.Interface)
  -        #set ($interfaceName = $table.Interface)
  -    #end
  -
  -    #set ( $fname = "${basePrefix}${interfaceName}Manager.java" )
  -    #set ( $path = "${strings.getPackageAsPath($pkbase)}$fname" )
  -    $generator.parse("om/BaseManager.vm",$path,"table",$tbl)
  -
  -    #set ( $fname = "${interfaceName}Manager.java" )
  -    #set ( $path = "${strings.getPackageAsPath($package)}$fname" )
  -    #if (!$files.file($basePath,$path).exists())
  -      $generator.parse("om/ExtensionManager.vm",$path,"table",$tbl)
  -    #end
  -
  -#end
  -#if ($useManagers)
  -
  -    #set ( $fname = "${basePrefix}${firstcap}.java" )
  -    #set ( $path = "${strings.getPackageAsPath($pkbase)}$fname" )
  -    $generator.parse("om/ObjectWithManager.vm",$path,"table",$tbl)
  -
  -#else
  +    #if (!$tbl.isForReferenceOnly())
  +      $tbl.Name
  +      #set ( $firstcap=$tbl.JavaName )
  +
  +      #set ( $fname = "$basePrefix${firstcap}Peer.java" )
  +      #set ( $path = "${strings.getPackageAsPath($pkbase)}$fname" )
  +      $generator.parse("om/Peer.vm",$path,"table",$tbl)
  +
  +      #if (!$tbl.isAlias())
  +        #set ( $fname = "${firstcap}MapBuilder.java" )
  +        #set ( $path = "${strings.getPackageAsPath($pkmap)}$fname" )
  +        $generator.parse("om/MapBuilder.vm",$path,"table",$tbl)
  +      #end
   
  -    #set ( $fname = "${basePrefix}${firstcap}.java" )
  -    #set ( $path = "${strings.getPackageAsPath($pkbase)}$fname" )
  -    $generator.parse("om/Object.vm",$path,"table",$tbl)
  +      #if ($useManagers && $tbl.PrimaryKey.size() > 0)
  +        #set ($interfaceName = $table.JavaName)
  +        #if ($table.Interface)
  +          #set ($interfaceName = $table.Interface)
  +        #end
   
  -#end
  +        #set ( $fname = "${basePrefix}${interfaceName}Manager.java" )
  +        #set ( $path = "${strings.getPackageAsPath($pkbase)}$fname" )
  +        $generator.parse("om/BaseManager.vm",$path,"table",$tbl)
   
  -    #set ( $fname = "${firstcap}.java" )
  -    #set ( $path = "${strings.getPackageAsPath($package)}$fname" )
  -    #if (!$files.file($basePath,$path).exists())
  -      $generator.parse("om/ExtensionObject.vm",$path,"table",$tbl)
  -    #end
  +        #set ( $fname = "${interfaceName}Manager.java" )
  +        #set ( $path = "${strings.getPackageAsPath($package)}$fname" )
  +        #if (!$files.file($basePath,$path).exists())
  +           $generator.parse("om/ExtensionManager.vm",$path,"table",$tbl)
  +        #end
  +      #end
  +      
  +      #if ($useManagers)
  +        #set ( $fname = "${basePrefix}${firstcap}.java" )
  +        #set ( $path = "${strings.getPackageAsPath($pkbase)}$fname" )
  +        $generator.parse("om/ObjectWithManager.vm",$path,"table",$tbl)
  +      #else
  +        #set ( $fname = "${basePrefix}${firstcap}.java" )
  +        #set ( $path = "${strings.getPackageAsPath($pkbase)}$fname" )
  +        $generator.parse("om/Object.vm",$path,"table",$tbl)
  +      #end
   
  -    #set ( $fname = "${firstcap}Peer.java" )
  -    #set ( $path = "${strings.getPackageAsPath($pkpeer)}$fname" )
  -    #if (!$files.file($basePath,$path).exists())
  -      $generator.parse("om/ExtensionPeer.vm",$path,"table",$tbl)
  -    #end
  +      #set ( $fname = "${firstcap}.java" )
  +      #set ( $path = "${strings.getPackageAsPath($package)}$fname" )
  +      #if (!$files.file($basePath,$path).exists())
  +        $generator.parse("om/ExtensionObject.vm",$path,"table",$tbl)
  +      #end
   
  -    #if ($tbl.Interface)
  +      #set ( $fname = "${firstcap}Peer.java" )
  +      #set ( $path = "${strings.getPackageAsPath($pkpeer)}$fname" )
  +      #if (!$files.file($basePath,$path).exists())
  +        $generator.parse("om/ExtensionPeer.vm",$path,"table",$tbl)
  +      #end
   
  +      #if ($tbl.Interface)
           #set ( $fname = "${tbl.Interface}.java" )
           #set ( $path = "${strings.getPackageAsPath($pkbase)}$fname" )
           #if (!$files.file($basePath,$path).exists())
               $generator.parse("om/Interface.vm",$path,"table",$tbl)
           #end
  +      #end
   
  -    #end
  -
  -    #if ($tbl.ChildrenColumn)
  -      #set ($col = $tbl.ChildrenColumn)
  -      #if ($col.isEnumeratedClasses())
  -        #foreach ($child in $col.Children)
  -        #set ( $fname = "${child.ClassName}.java" )
  -        #set ( $path = "${strings.getPackageAsPath($package)}$fname" )
  -        #if (!$files.file($basePath,$path).exists())
  -          $generator.parse("om/MultiExtendObject.vm",$path,"child",$child)
  -        #end
  +      #if ($tbl.ChildrenColumn)
  +        #set ($col = $tbl.ChildrenColumn)
  +        #if ($col.isEnumeratedClasses())
  +          #foreach ($child in $col.Children)
  +            #set ( $fname = "${child.ClassName}.java" )
  +            #set ( $path = "${strings.getPackageAsPath($package)}$fname" )
  +            #if (!$files.file($basePath,$path).exists())
  +              $generator.parse("om/MultiExtendObject.vm",$path,"child",$child)
  +            #end
  +          #end
           #end
         #end
       #end
  -   #end
     #end
   #end
   #end
  
  
  

Mime
View raw message