| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- <#include "../function.ftl">
- <#include "../variable.ftl">
- <#assign pkVar=convertUnderLine(pk) >
- <#if isBaseModule = 'true'>
- package com.${cAlias}.${cPlatform}.${sys}.persistence.entity;
- <#else>
- package com.${cAlias}.${cPlatform}.${sys}.${module}.persistence.entity;
- </#if>
- <#if subtables?exists && subtables?size!=0>
- import java.util.ArrayList;
- import java.util.List;
- </#if>
- import org.apache.commons.lang.builder.ToStringBuilder;
- import com.${scAlias}.${scPlatform}.base.framework.persistence.entity.AbstractPo;
- /**
- * ${model.tabComment} 表对象
- *
- *<pre>
- <#if vars.company?exists>
- * 开发公司:${vars.company}
- </#if>
- <#if vars.developer?exists>
- * 开发人员:${vars.developer}
- </#if>
- <#if vars.email?exists>
- * 邮箱地址:${vars.email}
- </#if>
- * 创建时间:${date?string("yyyy-MM-dd HH:mm:ss")}
- *</pre>
- */
- @SuppressWarnings("serial")
- public class ${class}Tbl extends AbstractPo<String>{
- <#list model.columnList as col>
- protected ${col.colType} ${convertUnderLine(col.columnName)}; /*${col.comment}*/
- </#list>
- <#if (pkVar!="id")>
- @Override
- public void setId(String ${pkVar}) {
- this.${pkVar} = ${pkVar};
- }
- @Override
- public String getId() {
- return ${pkVar};
- }
- </#if>
- <#list model.columnList as col>
- <#assign colName=convertUnderLine(col.columnName)>
- public void set${colName?cap_first}(${col.colType} ${colName})
- {
- this.${colName} = ${colName};
- }
- /**
- * 返回 ${col.comment}
- * @return
- */
- public ${col.colType} get${colName?cap_first}()
- {
- return this.${colName};
- }
- </#list>
- /**
- * @see java.lang.Object#toString()
- */
- public String toString()
- {
- return new ToStringBuilder(this)
- <#list model.columnList as col>
- <#assign colName=convertUnderLine(col.columnName)>
- .append("${colName}", this.${colName})
- </#list>
- .toString();
- }
- }
|