62,614
社区成员
发帖
与我相关
我的任务
分享
/**
* Return the persistent instance of the given entity class with the given identifier,
* or null if there is no such persistent instance. (If the instance is already associated
* with the session, return that instance. This method never returns an uninitialized instance.)
*
* @param clazz a persistent class
* @param id an identifier
*
* @return a persistent instance or null
*/
public Object get(Class clazz, Serializable id);
如果是要查询表的所有数据,必需写sql,配合泛型才能实现统一查询接口。