예제 #1
0
 /** 获取总记录数 */
 @Override
 public int total(String className, Dictionary dictionary) {
   return dictionaryDao.total(
       className,
       new String[] {"dict_type", "dict_item", "dict_value"},
       new String[] {
         dictionary.getDict_type(), dictionary.getDict_item(), dictionary.getDict_value()
       });
 }
예제 #2
0
 /** 分页查询 */
 @Override
 public List<Dictionary> selectByPage(
     String className, int pageNo, int pageSize, Dictionary dictionary) {
   return dictionaryDao.selectByPage(
       className,
       pageNo,
       pageSize,
       new String[] {"dict_type", "dict_item", "dict_value"},
       new String[] {
         dictionary.getDict_type(), dictionary.getDict_item(), dictionary.getDict_value()
       });
 }
예제 #3
0
 /** 获取总页数 */
 @Override
 public int totalPage(int line, String className, Dictionary dictionary) {
   int total =
       dictionaryDao.total(
           className,
           new String[] {"dict_type", "dict_item", "dict_value"},
           new String[] {
             dictionary.getDict_type(), dictionary.getDict_item(), dictionary.getDict_value()
           });
   int pageNo = total / line;
   if (total % line > 0) {
     pageNo++;
   }
   return pageNo;
 }
예제 #4
0
 /** 查询所有字典数据类型 */
 @Override
 public List<Dictionary> selectAllType() {
   return dictionaryDao.selectAllType();
 }
예제 #5
0
 /** 按类型查找 */
 @Override
 public List<Dictionary> selectByType(String type) {
   return dictionaryDao.selectByType(type);
 }
예제 #6
0
 /** 删除 */
 @Override
 public boolean delete(Dictionary dictionary) {
   return dictionaryDao.delete(dictionary);
 }
예제 #7
0
 /** 更新字典数据 */
 @Override
 public boolean update(Dictionary dictionary) {
   return dictionaryDao.update(dictionary);
 }
예제 #8
0
 /** 获取某个字典数据 */
 @Override
 public Dictionary selectById(int id) {
   return dictionaryDao.selectById(id);
 }
예제 #9
0
 /** 添加字典数据 */
 @Override
 public boolean add(Dictionary dictionary) {
   return dictionaryDao.add(dictionary);
 }