use of org.beetl.sql.core.SQLReady in project act-eagle-allone by mailtous.
the class BeetlSqlDao method count.
@Override
public Long count(String sql, Object... args) {
List<Long> countList = sqlm.execute(new SQLReady(sql, args), Long.class);
Long count = C.isEmpty(countList) ? new Long(0) : countList.get(0);
return count;
}
use of org.beetl.sql.core.SQLReady in project act-eagle-allone by mailtous.
the class BeetlSqlDao method getPage.
@Override
public Page<T> getPage(Class<T> clz, Page page, String frameSql, Object[] args) {
PageQuery<T> pq = page.myPageToPageQuery(page, new PageQuery());
SQLReady sqlReady = new SQLReady(frameSql, args);
pq = sqlm.execute(sqlReady, clz, pq);
return page.pageQueryToMyPage(pq, page);
}
use of org.beetl.sql.core.SQLReady in project act-eagle-allone by mailtous.
the class BeetlSqlDao method getPage.
@Override
public Page<T> getPage(Page page, String frameSql, Object[] args) {
PageQuery<T> pq = page.myPageToPageQuery(page, new PageQuery());
SQLReady sqlReady = new SQLReady(frameSql, args);
pq = sqlm.execute(sqlReady, this.persistentClass, pq);
return page.pageQueryToMyPage(pq, page);
}
use of org.beetl.sql.core.SQLReady in project act-eagle-allone by mailtous.
the class Qe method toPage.
/**
* 返回 PAGE 查询结果集
* 注意不要传入 limit 语句
* @param clz 返回的class
* @param page
* @param <CLZ>
* @return
*/
public <CLZ> Page<CLZ> toPage(Class<CLZ> clz, Page page) {
PageQuery<CLZ> pq = page.myPageToPageQuery(page, new PageQuery());
pq = sqlManager.execute(new SQLReady(build()), clz, pq);
return page.pageQueryToMyPage(pq, page);
}
use of org.beetl.sql.core.SQLReady in project act-eagle-allone by mailtous.
the class SysPermissionDao method realDelByFuncId.
public boolean realDelByFuncId(Long func_id) {
// String sql = " delete from sys_permission where func_id = ?";
String sql = Qe.del(table).where(new Qe().eq(funcId, func_id)).build();
super.sqlm.executeUpdate(new SQLReady(sql, new Object[] { funcId }));
return true;
}