示例#1
0
 @Override
 public Page<Map<String, Object>> searchPageMap(
     SqlHelper sqlHelper, Page<Map<String, Object>> page) throws Exception {
   if (sqlHelper == null || StringUtils.isBlank(sqlHelper.getSql())) {
     List<Map<String, Object>> list = new ArrayList<>();
     page.setTotalCount(0);
     page.setResult(list);
     return page;
   }
   return searchPageMap(sqlHelper.getSql(), sqlHelper.getParameters(), page);
 }
示例#2
0
 @Override
 public <T> Page<T> searchPage(SqlHelper sqlHelper, Class<T> clazz, Page<T> page)
     throws Exception {
   if (sqlHelper == null || StringUtils.isBlank(sqlHelper.getSql())) {
     List<T> list = new ArrayList<>();
     page.setTotalCount(0);
     page.setResult(list);
     return page;
   }
   return searchPage(sqlHelper.getSql(), clazz, sqlHelper.getParameters(), page);
 }
示例#3
0
 @Override
 public int searchForCount(SqlHelper sqlHelper) throws Exception {
   return getCount(sqlHelper.getSql(), sqlHelper.getParameters());
 }
示例#4
0
 @Override
 public List<Map<String, Object>> searchAllMap(Class clazz) throws Exception {
   SqlHelper sqlHelper = SqlHelper.getSelectHelper(clazz);
   return searchForListMap(sqlHelper.getSql(), sqlHelper.getParameters());
 }
示例#5
0
 @Override
 public <T> List<T> searchAll(Class<T> clazz) throws Exception {
   SqlHelper sqlHelper = SqlHelper.getSelectHelper(clazz);
   return searchForList(sqlHelper.getSql(), clazz, sqlHelper.getParameters());
 }
示例#6
0
 @Override
 public List<Map<String, Object>> searchForListMap(SqlHelper sqlHelper) throws Exception {
   return searchForListMap(sqlHelper.getSql(), sqlHelper.getParameters());
 }
示例#7
0
 @Override
 public <T> List<T> searchForList(SqlHelper sqlHelper, Class<T> clazz) throws Exception {
   return searchForList(sqlHelper.getSql(), clazz, sqlHelper.getParameters());
 }
示例#8
0
 @Override
 public Map<String, Object> searchMapForOne(SqlHelper sqlHelper) throws Exception {
   return searchMapForOne(sqlHelper.getSql(), sqlHelper.getParameters());
 }
示例#9
0
 @Override
 public int update(SqlHelper sqlHelper) throws Exception {
   return update(sqlHelper.getSql(), sqlHelper.getParameters());
 }