Retrieves the system table corresponding to the specified index. <p>

@param tableIndex index identifying the system table to generate
@return the system table corresponding to the specified index
342461
protected Table generateTable(int tableIndex) {

        switch (tableIndex) {

            case SYSTEM_UDTS :
                return SYSTEM_UDTS();

            case SYSTEM_VERSIONCOLUMNS :
                return SYSTEM_VERSIONCOLUMNS();

            // HSQLDB-specific
            case SYSTEM_CACHEINFO :
                return SYSTEM_CACHEINFO();

            case SYSTEM_SESSIONINFO :
                return SYSTEM_SESSIONINFO();

            case SYSTEM_PROPERTIES :
                return SYSTEM_PROPERTIES();

            case SYSTEM_SESSIONS :
                return SYSTEM_SESSIONS();

            case SYSTEM_TEXTTABLES :
                return SYSTEM_TEXTTABLES();

            // SQL views
            case ADMINISTRABLE_ROLE_AUTHORIZATIONS :
                return ADMINISTRABLE_ROLE_AUTHORIZATIONS();

            case APPLICABLE_ROLES :
                return APPLICABLE_ROLES();

            case ASSERTIONS :
                return ASSERTIONS();

            case AUTHORIZATIONS :
                return AUTHORIZATIONS();

            case CHARACTER_SETS :
                return CHARACTER_SETS();

            case CHECK_CONSTRAINT_ROUTINE_USAGE :
                return CHECK_CONSTRAINT_ROUTINE_USAGE();

            case CHECK_CONSTRAINTS :
                return CHECK_CONSTRAINTS();

            case COLLATIONS :
                return COLLATIONS();

            case COLUMN_COLUMN_USAGE :
                return COLUMN_COLUMN_USAGE();

            case COLUMN_DOMAIN_USAGE :
                return COLUMN_DOMAIN_USAGE();

            case COLUMN_UDT_USAGE :
                return COLUMN_UDT_USAGE();

            case CONSTRAINT_COLUMN_USAGE :
                return CONSTRAINT_COLUMN_USAGE();

            case CONSTRAINT_TABLE_USAGE :
                return CONSTRAINT_TABLE_USAGE();

            case COLUMNS :
                return COLUMNS();

            case DATA_TYPE_PRIVILEGES :
                return DATA_TYPE_PRIVILEGES();

            case DOMAIN_CONSTRAINTS :
                return DOMAIN_CONSTRAINTS();

            case DOMAINS :
                return DOMAINS();

            case ENABLED_ROLES :
                return ENABLED_ROLES();

            case JAR_JAR_USAGE :
                return JAR_JAR_USAGE();

            case JARS :
                return JARS();

            case KEY_COLUMN_USAGE :
                return KEY_COLUMN_USAGE();

            case METHOD_SPECIFICATIONS :
                return METHOD_SPECIFICATIONS();

            case MODULE_COLUMN_USAGE :
                return MODULE_COLUMN_USAGE();

            case MODULE_PRIVILEGES :
                return MODULE_PRIVILEGES();

            case MODULE_TABLE_USAGE :
                return MODULE_TABLE_USAGE();

            case MODULES :
                return MODULES();

            case PARAMETERS :
                return PARAMETERS();

            case REFERENTIAL_CONSTRAINTS :
                return REFERENTIAL_CONSTRAINTS();

            case ROLE_AUTHORIZATION_DESCRIPTORS :
                return ROLE_AUTHORIZATION_DESCRIPTORS();

            case ROLE_COLUMN_GRANTS :
                return ROLE_COLUMN_GRANTS();

            case ROLE_ROUTINE_GRANTS :
                return ROLE_ROUTINE_GRANTS();

            case ROLE_TABLE_GRANTS :
                return ROLE_TABLE_GRANTS();

            case ROLE_USAGE_GRANTS :
                return ROLE_USAGE_GRANTS();

            case ROLE_UDT_GRANTS :
                return ROLE_UDT_GRANTS();

            case ROUTINE_COLUMN_USAGE :
                return ROUTINE_COLUMN_USAGE();

            case ROUTINE_JAR_USAGE :
                return ROUTINE_JAR_USAGE();

            case ROUTINE_PRIVILEGES :
                return ROUTINE_PRIVILEGES();

            case ROUTINE_ROUTINE_USAGE :
                return ROUTINE_ROUTINE_USAGE();

            case ROUTINE_SEQUENCE_USAGE :
                return ROUTINE_SEQUENCE_USAGE();

            case ROUTINE_TABLE_USAGE :
                return ROUTINE_TABLE_USAGE();

            case ROUTINES :
                return ROUTINES();

            case SCHEMATA :
                return SCHEMATA();

            case SEQUENCES :
                return SEQUENCES();

            case SQL_FEATURES :
                return SQL_FEATURES();

            case SQL_IMPLEMENTATION_INFO :
                return SQL_IMPLEMENTATION_INFO();

            case SQL_PACKAGES :
                return SQL_PACKAGES();

            case SQL_PARTS :
                return SQL_PARTS();

            case SQL_SIZING :
                return SQL_SIZING();

            case SQL_SIZING_PROFILES :
                return SQL_SIZING_PROFILES();

            case TABLE_CONSTRAINTS :
                return TABLE_CONSTRAINTS();

            case TABLES :
                return TABLES();

            case TRANSLATIONS :
                return TRANSLATIONS();

            case TRIGGERED_UPDATE_COLUMNS :
                return TRIGGERED_UPDATE_COLUMNS();

            case TRIGGER_COLUMN_USAGE :
                return TRIGGER_COLUMN_USAGE();

            case TRIGGER_ROUTINE_USAGE :
                return TRIGGER_ROUTINE_USAGE();

            case TRIGGER_SEQUENCE_USAGE :
                return TRIGGER_SEQUENCE_USAGE();

            case TRIGGER_TABLE_USAGE :
                return TRIGGER_TABLE_USAGE();

            case TRIGGERS :
                return TRIGGERS();

            case USAGE_PRIVILEGES :
                return USAGE_PRIVILEGES();

            case USER_DEFINED_TYPES :
                return USER_DEFINED_TYPES();

            case VIEW_COLUMN_USAGE :
                return VIEW_COLUMN_USAGE();

            case VIEW_ROUTINE_USAGE :
                return VIEW_ROUTINE_USAGE();

            case VIEW_TABLE_USAGE :
                return VIEW_TABLE_USAGE();

            case VIEWS :
                return VIEWS();

            default :
                return super.generateTable(tableIndex);
        }
    }
1109109
@Override
  public OperationHandle getTables(SessionHandle sessionHandle, String catalogName,
      String schemaName, String tableName, List<String> tableTypes) throws HiveSQLException {
    return cliService.getTables(sessionHandle, catalogName, schemaName, tableName, tableTypes);
  }
772043
private List<String> listIndexesOnTables(List<String> tables)
  {
    String sql
      = ""
      + "SELECT indexname "
      + "FROM pg_indexes "
      + "WHERE tablename IN (" + StringUtils.repeat("?", ",", tables.size())
      + ") "
      + "AND lower(indexname) NOT IN "
      + "	(SELECT lower(conname) FROM pg_constraint WHERE contype in ('p', 'u'))";

    return getJdbcTemplate().query(sql, tables.toArray(), stringRowMapper());
  }
1172896
public static String getIndexTableName(String schema, String table)
    {
        return schema.equals("default") ? table + "_idx" : schema + '.' + table + "_idx";
    }
240054
private JTable getTable() {
    if (table == null) {
      table = new JTable();
      table.setModel(getModel());
      ProgressBarRenderer.applyTo(table);
    }
    return table;
  }
1055248
public List<CmsSolrIndex> getSearchIndexesSolr() {

        List<CmsSolrIndex> indexes = new ArrayList<CmsSolrIndex>();
        for (I_CmsSearchIndex index : m_indexes) {
            if (index instanceof CmsSolrIndex) {
                indexes.add((CmsSolrIndex)index);
            }
        }
        return Collections.unmodifiableList(indexes);
    }
1262434
public Table getTable(Session session, String name, String schema) {

        Table t = null;

        if (schema == null) {
            t = findSessionTable(session, name, schema);
        }

        if (t == null) {
            schema = session.getSchemaName(schema);
            t      = findUserTable(session, name, schema);
        }

        if (t == null) {
            if (SqlInvariants.INFORMATION_SCHEMA.equals(schema)
                    && database.dbInfo != null) {
                t = database.dbInfo.getSystemTable(session, name);
            }
        }

        if (t == null) {
            throw Error.error(ErrorCode.X_42501, name);
        }

        return t;
    }
235921
private int getTableIndex(String tableName) {

        int index;

        // System.out.println("begin searching for "+tableName);
        for (index = 0; index < vHoldTableNames.size(); index++) {

            // System.out.println("in getTableIndex searching for "+tableName+", index: "+index);
            if (tableName.equals((String) vHoldTableNames.elementAt(index))) {
                return index;
            }    // end of if (tableName.equals(vHoldTableNames.elementAt(index)))
        }        // end of for (index = 0; index < vHoldTableNames.size(); index ++)

        return -1;
    }
1184851
public SQLSelect from(final String _tableName,
                          final int _tableIndex)
    {
        fromTables.add(new FromTable(tablePrefix, _tableName, _tableIndex));
        return this;
    }
142099
public String getKeyByIndex(int index) {
		Set<String> keySet = keyIndexs.keySet();
		for (String key : keySet) {
			int idx = keyIndexs.get(key);
			if (index == idx) {
				return key;
			}
		}
		return null;
	}
913589
public List<CmsSolrIndex> getAllSolrIndexes() {

        List<CmsSolrIndex> result = new ArrayList<CmsSolrIndex>();
        for (String indexName : getIndexNames()) {
            CmsSolrIndex index = getIndexSolr(indexName);
            if (index != null) {
                result.add(index);
            }
        }
        return result;
    }
44446
public void setTableIndex(TableIndex tableIndex) {
		this.tableIndex = tableIndex;
		if (tableIndex != null) {
			tableName = tableIndex.getTableName();
		} else {
			tableName = null;
		}
	}
804802
@Override
  public OperationHandle getTables(SessionHandle sessionHandle,
      String catalogName, String schemaName, String tableName, List<String> tableTypes)
          throws HiveSQLException {
    OperationHandle opHandle = sessionManager.getSession(sessionHandle)
        .getTables(catalogName, schemaName, tableName, tableTypes);
    LOG.debug(sessionHandle + ": getTables()");
    return opHandle;
  }
193069
public List<TableType> getTableTypes() throws SQLException {
        final List<TableType> list = new ArrayList<>();
        try (ResultSet results = databaseMetadata.getTableTypes()) {
            if (results != null) {
                bind(results, TableType.class, list);
            }
        }
        return list;
    }
651793
private String getTable() {
        if (!_tableChecked) {
            if (!_dataStore.getTableExists(_tableName)) {
                _dataStore.createTable(
                        _tableName,
                        new TableOptionsBuilder().setPlacement(_tablePlacement).build(),
                        ImmutableMap.<String, Object>of(),
                        new AuditBuilder().setLocalHost().setComment("Create scan status table").build());

                _tableChecked = true;
            }
        }

        return _tableName;
    }
179976
private static <T> String getTableName(Class<T> clazz) {
		
		Table tableAnno = clazz.getAnnotation(Table.class);
		if(tableAnno != null){
			if(tableAnno.catalog() != null){
				return tableAnno.catalog() + "." + tableAnno.name();
			}
			return tableAnno.name();
		}
		//if Table annotation is null
		String className = clazz.getName();
		return IdUtils.toUnderscore(className.substring(className.lastIndexOf(".")+1));
	}
809556
private List<String> getIndexes(CmsSetupDb dbCon, String tablename) throws SQLException {

        List<String> indexes = new ArrayList<String>();
        String tableIndex = readQuery(QUERY_SHOW_INDEX);
        Map<String, String> replacer = new HashMap<String, String>();
        replacer.put(REPLACEMENT_TABLENAME, tablename);
        CmsSetupDBWrapper db = null;
        try {
            db = dbCon.executeSqlStatement(tableIndex, replacer);
            while (db.getResultSet().next()) {
                String index = db.getResultSet().getString(FIELD_INDEX);

                if (!indexes.contains(index)) {
                    indexes.add(index);
                }

            }
        } finally {
            if (db != null) {
                db.close();
            }
        }
        return indexes;
    }