#set ($basePath = $generator.OutputPath)

#foreach ($dataModel in $dataModels)

  #foreach ($database in $dataModel.Databases)

    #set ( $path = $strings.getPackageAsPath($omPojoPackage) )
    $files.mkdir("$outputDirectory/$path")

    #foreach ($tbl in $database.Tables)
    
      #if (!$tbl.isForReferenceOnly())
        $tbl.Name
        #set ( $firstcap=$tbl.JavaName )

        #set ( $fname = "${basePrefix}${firstcap}.java" )
        #set ( $path = "${strings.getPackageAsPath($omPojoPackage)}$fname" )
        ##if (!$files.file($basePath,$path).exists())
          $generator.parse("om/pojo/base_object.vm",$path,"table",$tbl)
        ##end

        #set ( $fname = "${firstcap}.java" )
        #set ( $path = "${strings.getPackageAsPath($omPojoPackage)}$fname" )
        ##if (!$files.file($basePath,$path).exists())
          $generator.parse("om/pojo/object.vm",$path,"table",$tbl)
        ##end
		
		#if ( $tbl.isLoginUser() )
		    #set ( $fname = "${firstcap}Certifier.java" )
		    #set ( $path = "${strings.getPackageAsPath($omPojoPackage)}$fname" )
          	#if (!$files.file($basePath,$path).exists())
				$generator.parse("om/pojo/Certifier_java.vm",$path, "userTable", $tbl )
			#end
		#end

      #end
    #end
    
	#foreach ( $enum in $database.getEnums() )
        #set ( $fname = "${enum.getName()}.java" )
        #set ( $path = "${strings.getPackageAsPath($omPojoPackage)}$fname" )
        ##if (!$files.file($basePath,$path).exists())
          $generator.parse("om/pojo/enum.vm",$path,"enum",$enum)
        ##end
    #end
    
  #end
#end
