Obtains a {@link Table} associated with this session.
322430
private Table resolve(boolean createIfNotExist) {
        HttpSession session = Stapler.getCurrentRequest().getSession(createIfNotExist);
        if (session==null) return null;

        Table t = (Table) session.getAttribute(Table.class.getName());
        if (t==null) {
            if (createIfNotExist)
                session.setAttribute(Table.class.getName(), t=new Table());
            else
                return null;
        }
        return t;
    }
767702
public Table update() {
    // [START ]
    Table updatedTable = table.toBuilder().setDescription("new description").build().update();
    // [END ]
    return updatedTable;
  }
1026312
public Table getTable(){
        final Table table = new Table("Name", "Long Name", "URL", "Comment");

        // Create row(s) per dependency
        for(final License license: licenses){
            table.addRow(license.getName(), license.getLongName(), license.getUrl(), license.getComments());
        }

        return table;
    }
980757
function() {
		var tables = {};
		curr = scanner.next();
		while(curr.value !== 'EOF') {
			if(groupIs(0, 'ENDSEC'))
				break;

			if(groupIs(0, 'TABLE')) {
				curr = scanner.next();

				var tableDefinition = tableDefinitions[curr.value];
				if(tableDefinition) {
					log.debug(curr.value + ' Table {');
					tables[tableDefinitions[curr.value].tableName] = parseTable();
					log.debug('}');
				} else {
					log.debug('Unhandled Table ' + curr.value);
				}
			} else {
				// else ignored
				curr = scanner.next();
			}
		}

		curr = scanner.next();
		return tables;
	}
1204516
private Map<String, Table> getIndex(Table table)
   {
      Map<String, Table> result;

      if (!table.getResourceFlag())
      {
         result = m_taskTablesByName;
      }
      else
      {
         result = m_resourceTablesByName;
      }
      return result;
   }
1215419
public static HiveTable getHiveTable(Table table) {
    State tableProps = getTableProps(table);
    State storageProps = getStorageProps(table.getSd());
    State serDeProps = getSerDeProps(table.getSd().getSerdeInfo());
    HiveTable hiveTable = new HiveTable.Builder().withDbName(table.getDbName()).withTableName(table.getTableName())
        .withPartitionKeys(getColumns(table.getPartitionKeys())).withProps(tableProps).withStorageProps(storageProps)
        .withSerdeProps(serDeProps).build();
    if (table.getCreateTime() > 0) {
      hiveTable.setCreateTime(table.getCreateTime());
    }
    if (table.getSd().getCols() != null) {
      hiveTable.setColumns(getColumns(table.getSd().getCols()));
    }
    if (table.getSd().getBucketCols() != null) {
      hiveTable.setBucketColumns(table.getSd().getBucketCols());
    }
    return hiveTable;
  }
300377
@SuppressWarnings("unchecked")
    public static <T> Set<T> getTableValue(final Table table) {
        final Object value = table.getValue();
        Set<T> idsReturn;
        if (value == null) {
            idsReturn = Collections.emptySet();
        } else if (value instanceof Collection) {
            final Collection<T> ids = (Collection<T>) value;
            idsReturn = ids.stream().filter(Objects::nonNull).collect(Collectors.toSet());
        } else {
            final T id = (T) value;
            idsReturn = Collections.singleton(id);
        }
        return idsReturn;
    }
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;
    }
663684
@Override
    public HTable getTable(String tableName) {
	logger.debug("NATIVE Begin of getTable for " + tableName);
        HTable table = tableNameHandleMap.get(tableName);
        if (table != null) {
            logger.debug("NATIVE Found a cached handle for table " + tableName);
            return table;
        }
        try {
            logger.debug("NATIVE Looking for a handle of table: " + tableName);
            HBaseAdmin admin = new HBaseAdmin(this.getHbcfg());
            HTableDescriptor[] resources = admin.listTables(tableName);
	    Preconditions.checkElementIndex(0, resources.length, "no table " + tableName + " found");
            admin.close();
            table = new HTable(this.getHbcfg(), tableName);
        } catch (IOException e) {
            logger.error("NATIVE Error while trying to obtain table: " + tableName);
            logger.error(e.getMessage());
        };
        tableNameHandleMap.put(tableName, table);
        logger.debug("NATIVE Cached a handle of table: " + tableName);
        return table;
    }
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;
  }
857136
public synchronized static Session getSession() {
        if(session == null){
            Properties properties = IOUtil.loadProperties("jdbc.properties");
            session = getSession(properties);
        }

        return session;
    }
1181895
public Table findSessionTable(Session session, String name,
                                  String schemaName) {
        return session.findSessionTable(name);
    }
295560
public function getTable()
    {
        if ($this->_table !== false)
        {
            if (!($this->_table instanceof KDatabaseTableInterface))
            {
                //Make sure we have a table identifier
                if (!($this->_table instanceof KObjectIdentifier)) {
                    $this->setTable($this->_table);
                }

                try {
                    $this->_table = $this->getObject($this->_table);
                } catch (RuntimeException $e) {
                    $this->_table = false;
                }
            }
        }

        return $this->_table;
    }
365005
public Set<String> getTableNamesInvolvedInEntity() {
        Set<String> tableNames = newTreeSet();

        for (Attribute attribute : getCurrentAttributes()) {
            tableNames.add(attribute.getTableName());
        }

        return tableNames;
    }
1365434
public List<List<String>> getTableAsList(final By tableBy) {
		List<List<String>> all = new ArrayList<List<String>>();
		WebElement table = driver.findElement(tableBy);

		List<WebElement> rows = table.findElements(By.tagName("tr"));
		for (WebElement row : rows) {
			List<String> toAdd = new ArrayList<String>();
			List<WebElement> columns = row.findElements(By.tagName("td"));
			for (WebElement column : columns) {
				toAdd.add(column.getText());
			}
			all.add(toAdd);
		}
		return all;
	}
439981
public Page<Table> list() {
    // [START ]
    Page<Table> tables = dataset.list();
    for (Table table : tables.iterateAll()) {
      // do something with the table
    }
    // [END ]
    return tables;
  }
650466
def get(self, table_name):
        """"""
        assert table_name in self.tabs, \
            "Table not avaiable. Avaiable tables: {}".format(
                ", ".join(self.tabs.keys())
            )
        return self.tabs[table_name]