hibernate 操作mysql 语句_HIbernate的数据库操作用法

Dear 丶 2022-10-27 00:26 303阅读 0赞

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;

发表评论

表情:
评论列表 (有 0 条评论,303人围观)

还没有评论,来说两句吧...

相关阅读