2016-10-13 11:52
你好,问题解决了,解决的不完美。
发现:ColumnMeta-json:{"name":"DTSTAMP","javaType":"java.lang.String","attrName":"dtstamp","type":null,"isNullable":null,"isPrimaryKey":null,"defaultValue":null,"remarks":null}
加字段名判断:
protected void genGetMethodName(ColumnMeta columnMeta, StringBuilder ret) {
if(columnMeta.name.contains("STAMP") ||columnMeta.name.contains("DDMSRECEIEVEDATE") ){
String getterMethodName = "get" + StrKit.firstCharToUpperCase(columnMeta.attrName);
String getter = String.format(getterTemplate, "oracle.sql.TIMESTAMP", getterMethodName, columnMeta.name);
ret.append(getter);
}
else {
String getterMethodName = "get" + StrKit.firstCharToUpperCase(columnMeta.attrName);
String getter = String.format(getterTemplate, columnMeta.javaType, getterMethodName, columnMeta.name);
ret.append(getter);
}
}
2016-10-12 17:41
@JFinal 您好,问题解决了,使用这个类型:oracle.sql.TIMESTAMP,谢谢
public void setDtstamp(oracle.sql.TIMESTAMP dtstamp) {
set("DTSTAMP", dtstamp);
}
public oracle.sql.TIMESTAMP getDtstamp() {
return get("DTSTAMP");
}
2016-10-12 16:23
@JFinal 非常感谢你的回复,代码生成器生产的类型是String
public void setDtstamp(java.lang.String dtstamp) {
set("DTSTAMP", dtstamp);
}
public java.lang.String getDtstamp() {
return get("DTSTAMP");
}