hibernate 操作mysql 语句_HIbernate的数据库操作用法
select name,sex from db 这个SQL语句使用HIbernate的中的哪个方法比较合适,例如:
public T findByID(ID id, I dbName) throws Exception;
public List findAll(I dbName) throws Exception;
public List findByExample(T exampleInstance, I dbName,
String… excludeProperties) throws Exception;
public List findByExample(T exampleInstance, I dbName) throws Exception;
public List findByCriteria(I dbName, Criterion… criterions) throws Exception;
public List findByCriteria(I dbName, List criterions) throws Exception;
public List findByCriteria(I dbName, List criterions,
List orders) throws Exception;
public List findByCriteriaAndLimtSize(I dbName, int size,
Criterion… criterions) throws Exception;
public List findByCriteriaByPage(I dbName, int offsetFrom, int size,
List criterions, List orders) throws Exception;
还没有评论,来说两句吧...