一个数据访问层Torque3.1的生成器的源代码
源代码在线查看: table.vm
$table.Name $!table.Description Name Type Size Default JavaName PK FK not null Description #foreach ($col in $table.Columns) $col.Name $col.Type #if ($col.printSize() && $col.printSize().length() > 0) $col.printSize() #else #end #if ($col.DefaultValue) $col.DefaultValue#else #end $col.JavaName #if ($col.isPrimaryKey()==true)X#else #end #if ($col.isForeignKey()==true)X#else #end #if ($col.isNotNull()==true)X#else #end #if ($col.Description) $col.Description#else #end #end #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