日期:2014-05-20 浏览次数:20812 次
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); }