Beispiel #1
0
 public DepartmentList getDepartmentList() throws SQLException {
   DepartmentList depList;
   UserMapper userMapper = sqlSession.getMapper(UserMapper.class);
   if (userMapper != null) {
     List<Department> dList = userMapper.getDepartmentList();
     if (dList == null) {
       depList = new DepartmentList();
       depList.setErrorCode(Configuration.ErrorCodes.ER1001.getCodeName());
       depList.setSubscribe_kor(Configuration.ErrorCodes.ER1001.getSubtitleKor());
       return depList;
     } else {
       depList = new DepartmentList();
       depList.setDepList(dList);
       depList.setErrorCode(Configuration.ErrorCodes.Success.getCodeName());
       depList.setSubscribe_kor(Configuration.ErrorCodes.Success.getSubtitleKor());
       return depList;
     }
   } else {
     depList = new DepartmentList();
     depList.setErrorCode(Configuration.ErrorCodes.ER0000.getCodeName());
     depList.setSubscribe_kor(Configuration.ErrorCodes.ER0000.getSubtitleKor());
     return depList;
   }
 }