怎么样使用Hibernate通过配置文件对Char字段进行去Trim?
packagecom.bjjdsy.xb;
importjava.sql.ResultSet;
importjava.sql.SQLException;
importorg.hibernate.type.StringType;
publicclassTrimStringTypeextendsStringType{
publicObjectget(ResultSetrs,Stringname)throwsSQLException{
return((String)super.get(rs,name)).trim();
}
}
importjava.sql.ResultSet;
importjava.sql.SQLException;
importorg.hibernate.type.StringType;
publicclassTrimStringTypeextendsStringType{
publicObjectget(ResultSetrs,Stringname)throwsSQLException{
return((String)super.get(rs,name)).trim();
}
}
本文地址:http://www.45fan.com/dnjc/67392.html