@Test public void testReadServerAuthorities() throws SQLException { testee.readServerAuthorities(testUser); }
Collection<DB2Authority> readServerAuthorities(String user) throws SQLException { String accountIDUC = user.toUpperCase(); String sql = "SELECT * FROM SYSIBM.SYSPASSTHRUAUTH" + " WHERE GRANTEE = '" + accountIDUC + "' AND GRANTEETYPE = 'U'"; Collection<DB2Authority> grants = new ArrayList<DB2Authority>(); ResultSet rs = executeQuery(sql); while (rs.next()) { grants.add(new DB2Authority(AUTH_TYPE_SERVER, "PASSTHRU", rs.getString("SERVERNAME"), accountIDUC)); } return grants; }
DB2AuthorityReader { Collection<DB2Authority> readServerAuthorities(String user) throws SQLException { String accountIDUC = user.toUpperCase(); String sql = "SELECT * FROM SYSIBM.SYSPASSTHRUAUTH" + " WHERE GRANTEE = '" + accountIDUC + "' AND GRANTEETYPE = 'U'"; Collection<DB2Authority> grants = new ArrayList<DB2Authority>(); ResultSet rs = executeQuery(sql); while (rs.next()) { grants.add(new DB2Authority(AUTH_TYPE_SERVER, "PASSTHRU", rs.getString("SERVERNAME"), accountIDUC)); } return grants; } }
DB2AuthorityReader { Collection<DB2Authority> readServerAuthorities(String user) throws SQLException { String accountIDUC = user.toUpperCase(); String sql = "SELECT * FROM SYSIBM.SYSPASSTHRUAUTH" + " WHERE GRANTEE = '" + accountIDUC + "' AND GRANTEETYPE = 'U'"; Collection<DB2Authority> grants = new ArrayList<DB2Authority>(); ResultSet rs = executeQuery(sql); while (rs.next()) { grants.add(new DB2Authority(AUTH_TYPE_SERVER, "PASSTHRU", rs.getString("SERVERNAME"), accountIDUC)); } return grants; } DB2AuthorityReader(Connection adminConn); }
DB2AuthorityReader { Collection<DB2Authority> readServerAuthorities(String user) throws SQLException { String accountIDUC = user.toUpperCase(); String sql = "SELECT * FROM SYSIBM.SYSPASSTHRUAUTH" + " WHERE GRANTEE = '" + accountIDUC + "' AND GRANTEETYPE = 'U'"; Collection<DB2Authority> grants = new ArrayList<DB2Authority>(); ResultSet rs = executeQuery(sql); while (rs.next()) { grants.add(new DB2Authority(AUTH_TYPE_SERVER, "PASSTHRU", rs.getString("SERVERNAME"), accountIDUC)); } return grants; } DB2AuthorityReader(Connection adminConn);  }
DB2AuthorityReader { Collection<DB2Authority> readServerAuthorities(String user) throws SQLException { String accountIDUC = user.toUpperCase(); String sql = "SELECT * FROM SYSIBM.SYSPASSTHRUAUTH" + " WHERE GRANTEE = '" + accountIDUC + "' AND GRANTEETYPE = 'U'"; Collection<DB2Authority> grants = new ArrayList<DB2Authority>(); ResultSet rs = executeQuery(sql); while (rs.next()) { grants.add(new DB2Authority(AUTH_TYPE_SERVER, "PASSTHRU", rs.getString("SERVERNAME"), accountIDUC)); } return grants; } DB2AuthorityReader(Connection adminConn);   }