ys.artifact-orm.1.0.1.source-code.bean-mysql.btl Maven / Gradle / Ivy
/**
* 写数据
*/
public Object write(){
Object[] values = new Object[${table.columns.~size}];
<%for(column in table.columns){%>
values[${columnLP.index-1}] = this.${column.fieldName};
<%}%>
return values;
}
/**
* 读数据
*/
public ${table.className} read(Object object){
Object[] array = (Object[])object;
<%for(column in table.columns){%>
this.${column.fieldName} = (${column.type})array[${columnLP.index-1}];
<%}%>
return this;
}