コード例 #1
0
 public List<Authority> find(Role role) {
   Connection conn = null;
   List<Authority> auths = null;
   try {
     conn = ConnectionUtils.getConnection();
     auths = authDAO.find(conn, role);
   } catch (SQLException e) {
     logger.error(e.getMessage());
   } finally {
     DbUtils.closeQuietly(conn);
   }
   return auths;
 }
コード例 #2
0
 public List<Authority> find(Authority auth) {
   if (null == auth) return this.getAll();
   Connection conn = null;
   List<Authority> auths = null;
   try {
     conn = ConnectionUtils.getConnection();
     auths = authDAO.find(conn, auth);
   } catch (SQLException e) {
     logger.error(e.getMessage());
   } finally {
     DbUtils.closeQuietly(conn);
   }
   return auths;
 }