Examples of TableManager


Examples of com.haulmont.yarg.formatters.impl.doc.TableManager

    protected void fillTables(XDispatchHelper xDispatchHelper) throws com.sun.star.uno.Exception {
        List<String> tablesNames = TableManager.getTablesNames(xComponent);

        for (String tableName : tablesNames) {
            TableManager tableManager = new TableManager(xComponent, tableName);
            BandFinder bandFinder = new BandFinder(tableManager).find();

            BandData band = bandFinder.getBand();
            String bandName = bandFinder.getBandName();
            int numberOfRowWithAliases = tableManager.findRowWithAliases();

            if (band != null && numberOfRowWithAliases > -1) {
                XTextTable xTextTable = tableManager.getXTextTable();

                // try to select one cell without it workaround
                int columnCount = xTextTable.getColumns().getCount();
                if (columnCount < 2) {
                    xTextTable.getColumns().insertByIndex(columnCount, 1);
                }

                fillTable(band.getName(), band.getParentBand(), tableManager, xDispatchHelper, numberOfRowWithAliases);

                // end of workaround ->
                if (columnCount < 2) {
                    xTextTable.getColumns().removeByIndex(columnCount, 1);
                }
            } else if (numberOfRowWithAliases > -1
                    && rootBand.getFirstLevelBandDefinitionNames() != null
                    && rootBand.getFirstLevelBandDefinitionNames().contains(bandName)) {
                //if table is linked with band and has aliases on it, but no band data found -
                //we are removing the row
                tableManager.deleteRow(numberOfRowWithAliases);
            }
        }
    }
View Full Code Here

Examples of com.threerings.parlor.server.TableManager

    @Override
    protected void didStartup ()
    {
        super.didStartup();
        // now that we have our place object, we can create our table manager
        _tmgr = new TableManager(_omgr, _invmgr, _registry, getPlaceObject());
    }
View Full Code Here

Examples of mage.server.TableManager

    }

    private void startMatch(TournamentPairing pair, MatchOptions matchOptions) {
        try {
            TableManager tableManager = TableManager.getInstance();
            Table table = tableManager.createTable(GamesRoomManager.getInstance().getMainRoomId(), matchOptions);
            table.setTournamentSubTable(true);
            table.setTournament(tournament);
            table.setState(TableState.WAITING);
            TournamentPlayer player1 = pair.getPlayer1();
            TournamentPlayer player2 = pair.getPlayer2();
            tableManager.addPlayer(getPlayerUserId(player1.getPlayer().getId()), table.getId(), player1.getPlayer(), player1.getPlayerType(), player1.getDeck());
            tableManager.addPlayer(getPlayerUserId(player2.getPlayer().getId()), table.getId(), player2.getPlayer(), player2.getPlayerType(), player2.getDeck());
            table.setState(TableState.STARTING);
            tableManager.startTournamentSubMatch(null, table.getId());
            Match match = tableManager.getMatch(table.getId());
            match.setTableId(tableId);
            pair.setMatch(match);
            pair.setTableId(table.getId());
            player1.setState(TournamentPlayerState.DUELING);
            player2.setState(TournamentPlayerState.DUELING);
View Full Code Here

Examples of org.apache.accumulo.server.master.state.tables.TableManager

     * If migrating a tablet for a table that is offline, the migration
     * can never succeed because no tablet server will load the tablet.
     * check for offline tables and remove their migrations.
     */
    private void cleanupOfflineMigrations() {
      TableManager manager = TableManager.getInstance();
      for (String tableId : Tables.getIdToNameMap(instance).keySet()) {
        TableState state = manager.getTableState(tableId);
        if (TableState.OFFLINE == state) {
          clearMigrations(tableId);
        }
      }
    }
View Full Code Here

Examples of org.apache.accumulo.server.master.state.tables.TableManager

    Text meta = new Text(Constants.METADATA_TABLE_ID);
    switch (getMasterState()) {
      case NORMAL:
        // Count offline tablets for online tables
        for (TabletGroupWatcher watcher : watchers) {
          TableManager manager = TableManager.getInstance();
          for (Entry<Text,TableCounts> entry : watcher.getStats().entrySet()) {
            Text tableId = entry.getKey();
            TableCounts counts = entry.getValue();
            TableState tableState = manager.getTableState(tableId.toString());
            if (tableState != null && tableState.equals(TableState.ONLINE)) {
              result += counts.unassigned() + counts.assignedToDeadServers() + counts.assigned();
            }
          }
        }
View Full Code Here

Examples of org.apache.accumulo.server.master.state.tables.TableManager

    if (getMasterState() != MasterState.NORMAL) {
      if (getMasterState() != MasterState.UNLOAD_METADATA_TABLETS)
        result.add(Constants.METADATA_TABLE_ID);
      return result;
    }
    TableManager manager = TableManager.getInstance();
   
    for (String tableId : Tables.getIdToNameMap(instance).keySet()) {
      TableState state = manager.getTableState(tableId);
      if (state != null) {
        if (state == TableState.ONLINE)
          result.add(tableId);
      }
    }
View Full Code Here

Examples of org.apache.accumulo.server.master.state.tables.TableManager

    Text meta = new Text(Constants.METADATA_TABLE_ID);
    switch (getMasterState()) {
      case NORMAL:
        // Count offline tablets for online tables
        for (TabletGroupWatcher watcher : watchers) {
          TableManager manager = TableManager.getInstance();
          for (Entry<Text,TableCounts> entry : watcher.getStats().entrySet()) {
            Text tableId = entry.getKey();
            TableCounts counts = entry.getValue();
            TableState tableState = manager.getTableState(tableId.toString());
            if (tableState != null && tableState.equals(TableState.ONLINE)) {
              result += counts.unassigned() + counts.assignedToDeadServers() + counts.assigned();
            }
          }
        }
View Full Code Here

Examples of org.apache.accumulo.server.master.state.tables.TableManager

    if (getMasterState() != MasterState.NORMAL) {
      if (getMasterState() != MasterState.UNLOAD_METADATA_TABLETS)
        result.add(Constants.METADATA_TABLE_ID);
      return result;
    }
    TableManager manager = TableManager.getInstance();
   
    for (String tableId : Tables.getIdToNameMap(instance).keySet()) {
      TableState state = manager.getTableState(tableId);
      if (state != null) {
        if (state == TableState.ONLINE)
          result.add(tableId);
      }
    }
View Full Code Here

Examples of org.apache.accumulo.server.master.state.tables.TableManager

    Text meta = new Text(Constants.METADATA_TABLE_ID);
    switch (getMasterState()) {
      case NORMAL:
        // Count offline tablets for online tables
        for (TabletGroupWatcher watcher : watchers) {
          TableManager manager = TableManager.getInstance();
          for (Entry<Text,TableCounts> entry : watcher.getStats().entrySet()) {
            Text tableId = entry.getKey();
            TableCounts counts = entry.getValue();
            TableState tableState = manager.getTableState(tableId.toString());
            if (tableState != null && tableState.equals(TableState.ONLINE)) {
              result += counts.unassigned() + counts.assignedToDeadServers() + counts.assigned();
            }
          }
        }
View Full Code Here

Examples of org.apache.accumulo.server.master.state.tables.TableManager

    if (getMasterState() != MasterState.NORMAL) {
      if (getMasterState() != MasterState.UNLOAD_METADATA_TABLETS)
        result.add(Constants.METADATA_TABLE_ID);
      return result;
    }
    TableManager manager = TableManager.getInstance();
   
    for (String tableId : Tables.getIdToNameMap(instance).keySet()) {
      TableState state = manager.getTableState(tableId);
      if (state != null) {
        if (state == TableState.ONLINE)
          result.add(tableId);
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.