if (tableNamePattern == null || "".equals(tableNamePattern)) tableNamePattern = "%";
    public ResultSet getTables(String catalog, String schemaPattern,        String tableNamePattern, String types[]) throws SQLException {        checkCatalogAndSchema(catalog, schemaPattern);        if (types == null) {            types = ALL_TYPES;        }        String sql = "";        ArrayList params = new ArrayList();        if (isAllCondition(tableNamePattern)) {            sql = GET_TABLES_ALL;            params.add(getWantsSystemTables(types));            params.add(getWantsTables(types));            params.add(getWantsViews(types));        }        else if (hasNoWildcards(tableNamePattern)) {            tableNamePattern = stripQuotes(stripEscape(tableNamePattern));            sql = (GET_TABLES_EXACT);            params.add(getWantsSystemTables(types));            params.add(tableNamePattern);            params.add(getWantsTables(types));            params.add(tableNamePattern);            params.add(getWantsViews(types));            params.add(tableNamePattern);        }        else {            tableNamePattern = stripQuotes(tableNamePattern) + SPACES + "%";            sql = (GET_TABLES_LIKE);            params.add(getWantsSystemTables(types));            params.add(tableNamePattern);            params.add(getWantsTables(types));            params.add(tableNamePattern);            params.add(getWantsViews(types));            params.add(tableNamePattern);        }        return doQuery(sql, params);    }