67,512
社区成员
发帖
与我相关
我的任务
分享
daoClass = Class.forName(daoClassName);//这里是用反射获取一个类名,和它的一个方法
Class methodParameterTypes[] = new Class[1];
methodParameterTypes[0] = Integer.TYPE;
Method targetMethodInfo = daoClass.getMethod("findById", methodParameterTypes);
public TblPotential findById(java.lang.Integer id) {
log.debug("getting TblPotential instance with id: " + id);
try {
TblPotential instance = (TblPotential) getSession().get(
"com.minicrm.hibernate.tables.TblPotential", id);
return instance;
} catch (RuntimeException re) {
log.error("get failed", re);
throw re;
}
}
public TblPotential findById(int id){
return findById(id);
}