## Copyright 2001-2005 The Apache Software Foundation.
##
## Licensed under the Apache License, Version 2.0 (the "License")
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
##
##     http://www.apache.org/licenses/LICENSE-2.0
##
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
<a name="$table.Name"/>
<h2>$table.Name</h2>
$!table.Description
<p/>
<table border="1" cellspacing="0">
  <tr>
    <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">Default</th>
    <th class="normalFont" bgcolor="#CCCCCC">JavaName</th>
    <th class="normalFont" bgcolor="#CCCCCC">PK</th>
    <th class="normalFont" bgcolor="#CCCCCC">FK</th>
    <th class="normalFont" bgcolor="#CCCCCC">not null</th>
    <th class="normalFont" bgcolor="#CCCCCC">Description</th>
  </tr>
#foreach ($col in $table.Columns)
  <tr>
    <td class="normalFont" id="$table.Name$col.Name">#if ($col.isForeignKey() == true)
<a href="#$col.RelatedTableName">$col.Name</a>
#else$col.Name#end</td>
    <td class="normalFont">$col.Type</td>
    <td class="normalFont">#if ($col.printSize() && $col.printSize().length() > 0) $col.printSize() #else &nbsp;#end</td>
    <td class="normalFont">#if ($col.DefaultValue) $col.DefaultValue#else &nbsp;#end</td>
    <td class="normalFont">$col.JavaName</td>
    <td class="normalFont"><center> #if ($col.isPrimaryKey()==true)X#else &nbsp;#end </center></td>
    <td class="normalFont"><center> #if ($col.isForeignKey()==true)X#else &nbsp;#end </center></td>
    <td class="normalFont"><center> #if ($col.isNotNull()==true)X#else &nbsp;#end </center></td>
    <td class="normalFont">#if ($col.Description) $col.Description#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>
