一个数据访问层Torque3.1的生成器的源代码
源代码在线查看: object.vm
package ${package}; #if ($table.BaseClass) #set ($extendsBaseClass = "extends $table.BaseClass" ) #else #set ($extendsBaseClass = "" ) #end import java.io.Serializable; import java.util.Date; import java.math.BigDecimal; /** * ${table.JavaName} #if ($addTimeStamp) * This class was autogenerated by Torque on: * * [$now] * #end */ public class ${table.JavaName} { #foreach ($col in $table.Columns) private $col.JavaPrimitive $col.UncapitalisedJavaName; #end #foreach ($col in $table.Columns) /** * Get the $col.JavaName * @return $col.JavaPrimitive */ public $col.JavaPrimitive get${col.JavaName}() { return $col.UncapitalisedJavaName; } /** * Set the value of $cfc */ public void set${col.JavaName}($col.JavaPrimitive v) { this.$col.UncapitalisedJavaName = v; } #end }