读书人

代码生成札记

发布时间: 2012-07-23 09:42:19 作者: rapoo

代码生成笔记
${columnTemplate.columnCode?lower_case?cap_first}() 首字母大写

public int hashCode() {
int result = 17;
<#list tableTemplate.columnTemplateList as columnTemplate>
<#if columnTemplate.columnType =="PrimaryKey" && tableTemplate.containCompositeid == "true">
result = 37 * result + (this.get${columnTemplate.columnCode?lower_case?cap_first}() == null ? 0 : this.get${columnTemplate.columnCodeWithGet}().hashCode());
</#if>
</#list>
return result;
}

读书人网 >软件开发

热点推荐