class JDBCConnection implements ObjectStoreConnection {

    boolean skipAwsUserQuery(Map<String, String> awsDomains, String queryPrincipal,
            String rolePincipal, String userDomain) {

        // if no aws domains specified then it's not an aws query
        
        if (awsDomains == null) {
            return false;
        }
        
        // check if our query principal is not specified
        
        if (queryPrincipal != null && !queryPrincipal.isEmpty()) {
            return false;
        }
        
        // so now we know this is a global aws role query so we're only
        // going to keep actual users - everyone else is skipped
        
        // make sure the principal starts with the user domain prefix
        
        String userDomainPrefix = userDomain + ".";
        if (!rolePincipal.startsWith(userDomainPrefix)) {
            return true;
        }
        
        // make sure this is not a service within the user's
        // personal domain

        return rolePincipal.substring(userDomainPrefix.length()).indexOf('.') != -1;
    }

    public  JDBCConnection(Connection con, boolean autoCommit);

}