class JDBCConnection implements ObjectStoreConnection {

    Map<String, List<String>> getRolePrincipals(String principal, boolean awsQuery,
            String userDomain, String caller) {

        Map<String, List<String>> rolePrincipals = new HashMap<>();
        try (PreparedStatement ps = prepareRolePrincipalsStatement(principal, userDomain, awsQuery)) {
            long now = System.currentTimeMillis();
            try (ResultSet rs = executeQuery(ps, caller)) {
                while (rs.next()) {

                    // first check make sure the member is not expired

                    String principalName = rs.getString(ZMSConsts.DB_COLUMN_NAME);
                    java.sql.Timestamp expiration = rs.getTimestamp(ZMSConsts.DB_COLUMN_EXPIRATION);
                    if (expiration != null && now > expiration.getTime()) {
                        if (LOG.isDebugEnabled()) {
                            LOG.debug("{}: skipping expired principal {}", caller, principalName);
                        }
                        continue;
                    }

                    String roleName = rs.getString(ZMSConsts.DB_COLUMN_ROLE_NAME);
                    String index = roleIndex(rs.getString(ZMSConsts.DB_COLUMN_DOMAIN_ID), roleName);
                    List<String> principals = rolePrincipals.computeIfAbsent(index, k -> new ArrayList<>());

                    if (LOG.isDebugEnabled()) {
                        LOG.debug("{}: adding principal {} for {}", caller, principalName, index);
                    }
                    
                    principals.add(principalName);
                }
            }
        } catch (SQLException ex) {
            throw sqlError(ex, caller);
        }
        
        return rolePrincipals;
    }

    public  JDBCConnection(Connection con, boolean autoCommit);

}