Commit 005579a2 authored by liuchao's avatar liuchao

no message

parent a4185125
......@@ -184,9 +184,13 @@ public class AbsDao<E, K extends Serializable> implements IDao<E, K> {
query.executeUpdate();
}
public List<E> excuteBySqlReturnList(String sql) {
public List<E> excuteBySqlReturnList(String sql, final Hints hints) {
SQLQuery query = this.getSession().createSQLQuery(sql);
query.setResultTransformer(CriteriaSpecification.ALIAS_TO_ENTITY_MAP);
if (hints.getOffset() > 0)
query.setFirstResult(hints.getOffset());
if (hints.getLength() > 0)
query.setMaxResults(hints.getLength());
return query.list();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment