@Test public void testReadTablespaceAuthorities() throws SQLException { testee.readTablespaceAuthorities(testUser); }
Collection<DB2Authority> readTablespaceAuthorities(String user) throws SQLException { String accountIDUC = user.toUpperCase(); String sql = "SELECT * FROM SYSIBM.SYSTBSPACEAUTH, SYSIBM.SYSTABLESPACES" + " WHERE SYSIBM.SYSTBSPACEAUTH.GRANTEE = '" + accountIDUC + "' AND SYSIBM.SYSTBSPACEAUTH.GRANTEETYPE = 'U' " + "AND (SYSIBM.SYSTBSPACEAUTH.USEAUTH = 'Y' OR SYSIBM.SYSTBSPACEAUTH.USEAUTH = 'G') " + "AND SYSIBM.SYSTBSPACEAUTH.TBSPACEID = SYSIBM.SYSTABLESPACES.TBSPACEID"; Collection<DB2Authority> grants = new ArrayList<DB2Authority>(); ResultSet rs = executeQuery(sql); while (rs.next()) { grants.add(new DB2Authority(AUTH_TYPE_TABLESPACE, "USE", rs.getString("TBSPACE"), accountIDUC)); } return grants; }
DB2AuthorityReader { Collection<DB2Authority> readTablespaceAuthorities(String user) throws SQLException { String accountIDUC = user.toUpperCase(); String sql = "SELECT * FROM SYSIBM.SYSTBSPACEAUTH, SYSIBM.SYSTABLESPACES" + " WHERE SYSIBM.SYSTBSPACEAUTH.GRANTEE = '" + accountIDUC + "' AND SYSIBM.SYSTBSPACEAUTH.GRANTEETYPE = 'U' " + "AND (SYSIBM.SYSTBSPACEAUTH.USEAUTH = 'Y' OR SYSIBM.SYSTBSPACEAUTH.USEAUTH = 'G') " + "AND SYSIBM.SYSTBSPACEAUTH.TBSPACEID = SYSIBM.SYSTABLESPACES.TBSPACEID"; Collection<DB2Authority> grants = new ArrayList<DB2Authority>(); ResultSet rs = executeQuery(sql); while (rs.next()) { grants.add(new DB2Authority(AUTH_TYPE_TABLESPACE, "USE", rs.getString("TBSPACE"), accountIDUC)); } return grants; } }
DB2AuthorityReader { Collection<DB2Authority> readTablespaceAuthorities(String user) throws SQLException { String accountIDUC = user.toUpperCase(); String sql = "SELECT * FROM SYSIBM.SYSTBSPACEAUTH, SYSIBM.SYSTABLESPACES" + " WHERE SYSIBM.SYSTBSPACEAUTH.GRANTEE = '" + accountIDUC + "' AND SYSIBM.SYSTBSPACEAUTH.GRANTEETYPE = 'U' " + "AND (SYSIBM.SYSTBSPACEAUTH.USEAUTH = 'Y' OR SYSIBM.SYSTBSPACEAUTH.USEAUTH = 'G') " + "AND SYSIBM.SYSTBSPACEAUTH.TBSPACEID = SYSIBM.SYSTABLESPACES.TBSPACEID"; Collection<DB2Authority> grants = new ArrayList<DB2Authority>(); ResultSet rs = executeQuery(sql); while (rs.next()) { grants.add(new DB2Authority(AUTH_TYPE_TABLESPACE, "USE", rs.getString("TBSPACE"), accountIDUC)); } return grants; } DB2AuthorityReader(Connection adminConn); }
DB2AuthorityReader { Collection<DB2Authority> readTablespaceAuthorities(String user) throws SQLException { String accountIDUC = user.toUpperCase(); String sql = "SELECT * FROM SYSIBM.SYSTBSPACEAUTH, SYSIBM.SYSTABLESPACES" + " WHERE SYSIBM.SYSTBSPACEAUTH.GRANTEE = '" + accountIDUC + "' AND SYSIBM.SYSTBSPACEAUTH.GRANTEETYPE = 'U' " + "AND (SYSIBM.SYSTBSPACEAUTH.USEAUTH = 'Y' OR SYSIBM.SYSTBSPACEAUTH.USEAUTH = 'G') " + "AND SYSIBM.SYSTBSPACEAUTH.TBSPACEID = SYSIBM.SYSTABLESPACES.TBSPACEID"; Collection<DB2Authority> grants = new ArrayList<DB2Authority>(); ResultSet rs = executeQuery(sql); while (rs.next()) { grants.add(new DB2Authority(AUTH_TYPE_TABLESPACE, "USE", rs.getString("TBSPACE"), accountIDUC)); } return grants; } DB2AuthorityReader(Connection adminConn);  }
DB2AuthorityReader { Collection<DB2Authority> readTablespaceAuthorities(String user) throws SQLException { String accountIDUC = user.toUpperCase(); String sql = "SELECT * FROM SYSIBM.SYSTBSPACEAUTH, SYSIBM.SYSTABLESPACES" + " WHERE SYSIBM.SYSTBSPACEAUTH.GRANTEE = '" + accountIDUC + "' AND SYSIBM.SYSTBSPACEAUTH.GRANTEETYPE = 'U' " + "AND (SYSIBM.SYSTBSPACEAUTH.USEAUTH = 'Y' OR SYSIBM.SYSTBSPACEAUTH.USEAUTH = 'G') " + "AND SYSIBM.SYSTBSPACEAUTH.TBSPACEID = SYSIBM.SYSTABLESPACES.TBSPACEID"; Collection<DB2Authority> grants = new ArrayList<DB2Authority>(); ResultSet rs = executeQuery(sql); while (rs.next()) { grants.add(new DB2Authority(AUTH_TYPE_TABLESPACE, "USE", rs.getString("TBSPACE"), accountIDUC)); } return grants; } DB2AuthorityReader(Connection adminConn);   }