torque服务器源代码
源代码在线查看: object.vm
package ${package}; #if ($table.BaseClass) #set ($extendsBaseClass = "extends $table.BaseClass" ) #else #set ($extendsBaseClass = "" ) #end #if ($table.Interface) #if ($ojbUseInterface == true) #set ($interface = "Serializable, ${basePrefix}${table.JavaName}Interface, $table.Interface" ) #else #set ($interface = "Serializable, $table.Interface" ) #end #else #if ($ojbUseInterface == true) #set ($interface = "Serializable, ${basePrefix}${table.JavaName}Interface" ) #else #set ($interface = "Serializable" ) #end #end import java.io.Serializable; import java.util.Date; import java.math.BigDecimal; /** #if ($addTimeStamp) * This class was autogenerated by Torque on: * * [$now] * #end * You should not use this class directly. It should not even be * extended all references should be to $table.JavaName */ public class ${basePrefix}${table.JavaName} $extendsBaseClass implements $interface { #foreach ($col in $table.Columns) #set ( $cjtype = $col.JavaPrimitive ) #set ( $clo=$col.Name.toLowerCase() ) #set ( $defaultValue = "null" ) #if ( $cjtype == "boolean") #set ( $defaultValue = "false" ) #elseif ($cjtype == "int") #set ( $defaultValue = "0" ) #end private $cjtype $clo = $defaultValue; #end #foreach ($col in $table.Columns) #set ( $cfc=$col.JavaName ) #set ( $cfc=$cfc.replaceFirst(".", $cfc.substring(0,1).toUpperCase()) ) #set ( $clo=$col.Name.toLowerCase() ) #set ( $cjtype = $col.JavaPrimitive ) /** * Get the $cfc * @return $cjtype */ public $cjtype get${cfc}() { return $clo; } /** * Set the value of $cfc */ public void set${cfc}($cjtype v ) { this.$clo = v; } #end }