[pal-cvs 2496] [228] added mydbflute

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2007年 7月 10日 (火) 22:19:59 JST


Revision: 228
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=228
Author:   takeharu
Date:     2007-07-10 22:19:59 +0900 (Tue, 10 Jul 2007)

Log Message:
-----------
added mydbflute

Added Paths:
-----------
    pompei/trunk/mydbflute/dbflute-0.5.2/templates/doc/
    pompei/trunk/mydbflute/dbflute-0.5.2/templates/doc/Control.vm
    pompei/trunk/mydbflute/dbflute-0.5.2/templates/doc/anakia/
    pompei/trunk/mydbflute/dbflute-0.5.2/templates/doc/anakia/datamodel.vm
    pompei/trunk/mydbflute/dbflute-0.5.2/templates/doc/anakia/table.vm
    pompei/trunk/mydbflute/dbflute-0.5.2/templates/doc/html/
    pompei/trunk/mydbflute/dbflute-0.5.2/templates/doc/html/datamodel.vm
    pompei/trunk/mydbflute/dbflute-0.5.2/templates/doc/html/table.vm


-------------- next part --------------
Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/doc/Control.vm
===================================================================
--- pompei/trunk/mydbflute/dbflute-0.5.2/templates/doc/Control.vm	2007-07-10 13:19:34 UTC (rev 227)
+++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/doc/Control.vm	2007-07-10 13:19:59 UTC (rev 228)
@@ -0,0 +1,14 @@
+#set ( $basepath = $generator.OutputPath)
+
+#foreach ($dataModel in $dataModels)
+
+  #if ($outputFormat=="html")
+    #set ( $outFile = "${dataModel.name}.html" )
+  #else
+    #set ( $outFile = "${dataModel.name}.xml" )
+  #end
+
+  File to be created: $outFile
+
+  $generator.parse("doc/$outputFormat/datamodel.vm",$outFile,"dataModel",$dataModel)
+#end

Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/doc/anakia/datamodel.vm
===================================================================
--- pompei/trunk/mydbflute/dbflute-0.5.2/templates/doc/anakia/datamodel.vm	2007-07-10 13:19:34 UTC (rev 227)
+++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/doc/anakia/datamodel.vm	2007-07-10 13:19:59 UTC (rev 228)
@@ -0,0 +1,34 @@
+#set ( $database = $dataModel.database )
+<?xml version="1.0"?>
+
+<document>
+  <properties>
+    <title>$dataModel.name</title>
+  </properties>
+
+  <body>
+
+  <section name="$dataModel.name">
+  <table>
+    <tr>
+      <th>Table Name</th>
+      <th>OM Class</th>
+      <th>Description</th>
+    </tr>
+  #foreach ($tbl in $database.tables)
+    <tr>
+      <td><a href="#$tbl.Name">$tbl.Name</a></td>
+      <td>$tbl.JavaName</td>
+      <td>$!tbl.Description</td>
+    </tr>
+  #end
+  </table>
+  <p/>
+
+  #foreach ($tbl in $database.tables)
+    $generator.parse("doc/anakia/table.vm",$outFile,"table",$tbl)
+  #end
+
+  </section>
+</body>
+</document>

Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/doc/anakia/table.vm
===================================================================
--- pompei/trunk/mydbflute/dbflute-0.5.2/templates/doc/anakia/table.vm	2007-07-10 13:19:34 UTC (rev 227)
+++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/doc/anakia/table.vm	2007-07-10 13:19:59 UTC (rev 228)
@@ -0,0 +1,37 @@
+<subsection name="$table.Name">
+  <p>
+    $!table.Description
+  </p>
+
+  <table>
+    <tr>
+      <th>Name</th>
+      <th>Type</th>
+      <th>Size</th>
+      <th>Default</th>
+      <th>JavaName</th>
+      <th>PK</th>
+      <th>FK</th>
+      <th>not null</th>
+      <th>Description</th>
+    </tr>
+  #foreach ($col in $table.Columns)
+    <tr>
+      <td>$col.Name</td>
+      <td>$col.Type</td>
+      <td>$col.printSize()</td>
+    #if ($col.DefaultValue && !$col.DefaultValue.equalsIgnoreCase("NULL") )
+      <td>$escape.getText($col.DefaultValue)</td>
+    #else
+      <td></td>
+    #end
+      <td>$col.JavaName</td>
+      <td>#if ($col.isPrimaryKey()==true)X#end</td>
+      <td>#if ($col.isForeignKey()==true)X#end</td>
+      <td>#if ($col.isNotNull()==true)X#end</td>
+      <td>$!col.Description</td>
+    </tr>
+  #end
+  </table>
+
+</subsection>

Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/doc/html/datamodel.vm
===================================================================
--- pompei/trunk/mydbflute/dbflute-0.5.2/templates/doc/html/datamodel.vm	2007-07-10 13:19:34 UTC (rev 227)
+++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/doc/html/datamodel.vm	2007-07-10 13:19:59 UTC (rev 228)
@@ -0,0 +1,37 @@
+#set ( $database = $dataModel.database )
+${database.initializeClassificationDeployment()}
+
+<html>
+<header>
+  <title>$dataModel.name</title>
+  <style>
+  .normalFont {
+    $docHtmlNormalFont
+  }
+  </style>
+</header>
+
+<body class="normalFont">
+  <table border="1" cellspacing="0" cellpadding="0">
+    <tr bgcolor="#CCCCCC">
+      <th class="normalFont">Table Name</th>
+      <th class="normalFont">Entity Name</th>
+      <th class="normalFont">Foreign Table</th>
+      <th class="normalFont">Refferer Table</th>
+    </tr>
+  #foreach ($tbl in $database.tables)
+    <tr>
+      <td class="normalFont"><a href="#$tbl.Name">$tbl.Name</a></td>
+      <td class="normalFont">$tbl.JavaName</td>
+      <td class="normalFont">$tbl.ForeignTableNameCommaStringWithHtmlHref</td>
+      <td class="normalFont">$tbl.ReferrerTableNameCommaStringWithHtmlHref</td>
+    </tr>
+  #end
+  </table>
+
+  #foreach ($tbl in $database.tables)
+    $generator.parse("doc/html/table.vm",$outFile,"table",$tbl)
+  #end
+
+</body>
+</html>

Added: pompei/trunk/mydbflute/dbflute-0.5.2/templates/doc/html/table.vm
===================================================================
--- pompei/trunk/mydbflute/dbflute-0.5.2/templates/doc/html/table.vm	2007-07-10 13:19:34 UTC (rev 227)
+++ pompei/trunk/mydbflute/dbflute-0.5.2/templates/doc/html/table.vm	2007-07-10 13:19:59 UTC (rev 228)
@@ -0,0 +1,48 @@
+<a name="$table.Name"/>
+<h2>$table.Name</h2>
+$!table.Description
+<p/>
+<table border="1" cellspacing="0">
+  <tr>
+    <th class="normalFont" bgcolor="#CCCCCC">PK</th>
+    <th class="normalFont" bgcolor="#CCCCCC">INC</th>
+    <th class="normalFont" bgcolor="#CCCCCC">UQ</th>
+    <th class="normalFont" bgcolor="#CCCCCC">Name</th>
+    <th class="normalFont" bgcolor="#CCCCCC">Type</th>
+    <th class="normalFont" bgcolor="#CCCCCC">Size</th>
+    <th class="normalFont" bgcolor="#CCCCCC">NotNull</th>
+    <th class="normalFont" bgcolor="#CCCCCC">Default</th>
+    <th class="normalFont" bgcolor="#CCCCCC">ForeignTable</th>
+    <th class="normalFont" bgcolor="#CCCCCC">ReffererTable</th>
+    <th class="normalFont" bgcolor="#CCCCCC">CapPropName</th>
+    <th class="normalFont" bgcolor="#CCCCCC">${table.database.targetLanguageInitCap}Type</th>
+    <th class="normalFont" bgcolor="#CCCCCC">Classification</th>
+  </tr>
+#foreach ($col in $table.Columns)
+  <tr>
+    <td class="normalFont"><center> #if ($col.isPrimaryKey()==true)o#else &nbsp;#end </center></td>
+    <td class="normalFont"><center> #if ($col.isAutoIncrement()==true)o#else &nbsp;#end </center></td>
+    <td class="normalFont"><center> #if ($col.isUnique()==true)o#else &nbsp;#end </center></td>
+    <td class="normalFont" id="$table.Name$col.Name">$col.Name</td>
+    <td class="normalFont">$col.dbType</td>
+    <td class="normalFont">#if ($col.printSize() && $col.printSize().length() > 0) $col.printSize() #else &nbsp;#end</td>
+    <td class="normalFont"><center> #if ($col.isNotNull()==true)o#else &nbsp;#end </center></td>
+    <td class="normalFont">#if ($col.DefaultValue) $col.DefaultValue#else &nbsp;#end</td>
+    <td class="normalFont"><a href="#${col.ForeignTableName}">${col.ForeignTableName}</a>&nbsp;</td>
+    <td class="normalFont">${col.ReferrerCommaStringWithHtmlHref}&nbsp;</td>
+    <td class="normalFont">$col.JavaName</td>
+    <td class="normalFont">$col.JavaNative</td>
+    <td class="normalFont">#if ($col.hasClassification()==true)${col.ClassificationName}#else &nbsp;#end</td>
+  </tr>
+#end
+</table>
+<script>
+#foreach ( $fk in $table.ForeignKeys )
+if( document.getElementById  )
+{
+var col = document.getElementById("$table.Name$fk.LocalColumnNames");
+col.style.backgroundColor = "$docHtmlFkColor";
+col.title="Foreignkey from $fk.ForeignTableName.$fk.ForeignColumnNames";
+}
+#end
+</script>


pal-cvs メーリングリストの案内
Back to archive index