#set ($basePath = $generator.OutputPath)

#foreach ($dataModel in $dataModels)

  #foreach ($database in $dataModel.Databases)

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

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

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

        #set ( $fname = "${firstcap}${omServiceSimpleSuffix}.java" )
        #set ( $path = "${strings.getPackageAsPath( $omServiceSimplePackage )}$fname" )
        ##if (!$files.file($basePath,$path).exists())
          $generator.parse("om/service/simple/simpleServiceInterface.vm",$path,"table",$tbl)
        ##end

        #set ( $fname = "${firstcap}${omServiceSimpleImplSuffix}.java" )
        #set ( $path = "${strings.getPackageAsPath( $omServiceSimpleImplPackage )}$fname" )
        ##if (!$files.file($basePath,$path).exists())
          $generator.parse("om/service/simple/simpleServiceImpl.vm",$path,"table",$tbl)
        ##end

      #end
    #end
    
  #end
#end

#set ( $fname = "EntityServiceManagerImpl.java" )
#set ( $path = "${strings.getPackageAsPath($omServiceSimpleImplPackage)}$fname" )
##if (!$files.file($basePath,$path).exists())
  $generator.parse("om/service/simple/EntityServiceManagerImpl_java.vm",$path)
##end

#set ( $fname = "simpleService.dicon" )
#set ( $path = "${strings.getPackageAsPath($omServiceSimplePackage)}$fname" )
##if (!$files.file($basePath,$path).exists())
  $generator.parse("om/service/simple/simpleService_dicon.vm",$path)
##end
