@Test public void testReadIndexAuthorities() throws SQLException { testee.readIndexAuthorities(testUser); }
Collection<DB2Authority> readIndexAuthorities(String user) throws SQLException { String accountIDUC = user.toUpperCase(); String sql = "SELECT * FROM SYSIBM.SYSINDEXAUTH WHERE GRANTEE = '" + accountIDUC + "' AND GRANTEETYPE = 'U'"; Collection<DB2Authority> grants = new ArrayList<DB2Authority>(); ResultSet rs = executeQuery(sql); while (rs.next()) { if (rs.getString("CONTROLAUTH").equals("Y")) { grants.add(new DB2Authority(AUTH_TYPE_INDEX, "CONTROL", rs.getString("CREATOR") .trim() + "." + rs.getString("NAME"), accountIDUC)); } } return grants; }
DB2AuthorityReader { Collection<DB2Authority> readIndexAuthorities(String user) throws SQLException { String accountIDUC = user.toUpperCase(); String sql = "SELECT * FROM SYSIBM.SYSINDEXAUTH WHERE GRANTEE = '" + accountIDUC + "' AND GRANTEETYPE = 'U'"; Collection<DB2Authority> grants = new ArrayList<DB2Authority>(); ResultSet rs = executeQuery(sql); while (rs.next()) { if (rs.getString("CONTROLAUTH").equals("Y")) { grants.add(new DB2Authority(AUTH_TYPE_INDEX, "CONTROL", rs.getString("CREATOR") .trim() + "." + rs.getString("NAME"), accountIDUC)); } } return grants; } }
DB2AuthorityReader { Collection<DB2Authority> readIndexAuthorities(String user) throws SQLException { String accountIDUC = user.toUpperCase(); String sql = "SELECT * FROM SYSIBM.SYSINDEXAUTH WHERE GRANTEE = '" + accountIDUC + "' AND GRANTEETYPE = 'U'"; Collection<DB2Authority> grants = new ArrayList<DB2Authority>(); ResultSet rs = executeQuery(sql); while (rs.next()) { if (rs.getString("CONTROLAUTH").equals("Y")) { grants.add(new DB2Authority(AUTH_TYPE_INDEX, "CONTROL", rs.getString("CREATOR") .trim() + "." + rs.getString("NAME"), accountIDUC)); } } return grants; } DB2AuthorityReader(Connection adminConn); }
DB2AuthorityReader { Collection<DB2Authority> readIndexAuthorities(String user) throws SQLException { String accountIDUC = user.toUpperCase(); String sql = "SELECT * FROM SYSIBM.SYSINDEXAUTH WHERE GRANTEE = '" + accountIDUC + "' AND GRANTEETYPE = 'U'"; Collection<DB2Authority> grants = new ArrayList<DB2Authority>(); ResultSet rs = executeQuery(sql); while (rs.next()) { if (rs.getString("CONTROLAUTH").equals("Y")) { grants.add(new DB2Authority(AUTH_TYPE_INDEX, "CONTROL", rs.getString("CREATOR") .trim() + "." + rs.getString("NAME"), accountIDUC)); } } return grants; } DB2AuthorityReader(Connection adminConn);  }
DB2AuthorityReader { Collection<DB2Authority> readIndexAuthorities(String user) throws SQLException { String accountIDUC = user.toUpperCase(); String sql = "SELECT * FROM SYSIBM.SYSINDEXAUTH WHERE GRANTEE = '" + accountIDUC + "' AND GRANTEETYPE = 'U'"; Collection<DB2Authority> grants = new ArrayList<DB2Authority>(); ResultSet rs = executeQuery(sql); while (rs.next()) { if (rs.getString("CONTROLAUTH").equals("Y")) { grants.add(new DB2Authority(AUTH_TYPE_INDEX, "CONTROL", rs.getString("CREATOR") .trim() + "." + rs.getString("NAME"), accountIDUC)); } } return grants; } DB2AuthorityReader(Connection adminConn);   }