日期:2014-05-17 浏览次数:20775 次
@*
Razor注释:编写Template(BySchema)可以使用下面的变量
@Model.Context.IsFirst, @Model.Context.IsLast, @Model.TableName, @Model.Columns(多行)
*@
/* FileName: @ConvNameUpper(Model.TableName)Entity.java
* (c)Copyright XXX Corporation 2012 All Rights Reserved.
*
* History
* Ver Author Date Comment
* Ver.1.00 XXX @DateTime.Now.ToString("yyyy/MM/dd") Created
*/
package xxx.xxx.xxx.common.entity;
import java.math.BigDecimal;
import java.io.Serializable;
public final class @ConvNameUpper(Model.TableName)Entity extends BaseEntity {
private static final long serialVersionUID = 1L;
@foreach(dynamic x in Model.Columns)
{
var javaType = GetDbType(x.DataType.ToString(), x.NumericScale.ToString());
@(" //") @x.Description @("\r\n")
@(" private ") @javaType @(" ") @ConvNameLower(x.ColumnName) @(";\r\n")
}
@foreach(dynamic x in Model.Columns)
{
var javaType = GetDbType(x.DataType.ToString(), x.NumericScale.ToString());
@(" /**\r\n")
@(" * 「") @x.Description @("」 getter\r\n")
@(" */\r\n")
@(" public ") @javaType @(" ") @Getter(x.ColumnName) @("() {\r\n")
@(" return ") @ConvNameLower(x.ColumnName) @(";\r\n")