use of com.ctrip.platform.dal.dao.sqlbuilder.SelectSqlBuilder in project dal by ctripcorp.
the class ChildwithallfieldsDao method queryAll.
/**
* Get all records from table
*/
public List<ChildWithAllFields> queryAll(DalHints hints) throws SQLException {
hints = DalHints.createIfAbsent(hints);
SelectSqlBuilder builder = new SelectSqlBuilder().selectAll().orderBy("grandParentId", ASC);
return client.query(builder, hints);
}
use of com.ctrip.platform.dal.dao.sqlbuilder.SelectSqlBuilder in project dal by ctripcorp.
the class ChildwithallfieldsDao method queryAllByPage.
/**
* Query ChildWithAllFields with paging function The pageSize and pageNo must be greater than zero.
*/
public List<ChildWithAllFields> queryAllByPage(int pageNo, int pageSize, DalHints hints) throws SQLException {
hints = DalHints.createIfAbsent(hints);
SelectSqlBuilder builder = new SelectSqlBuilder();
builder.selectAll().atPage(pageNo, pageSize).orderBy("grandParentId", ASC);
return client.query(builder, hints);
}
use of com.ctrip.platform.dal.dao.sqlbuilder.SelectSqlBuilder in project dal by ctripcorp.
the class ChildwithallfieldsDao method count.
/**
* Get the all records count
*/
public int count(DalHints hints) throws SQLException {
hints = DalHints.createIfAbsent(hints);
SelectSqlBuilder builder = new SelectSqlBuilder().selectCount();
return client.count(builder, hints).intValue();
}
Aggregations