Exemplo n.º 1
0
  /** Initializes the group. */
  public void initGroup(int size, boolean[] isGroupByFields) {
    _groupItem = _tempGroupItem;

    _groupItem.init(size, isGroupByFields);

    if (_groupMap == null) _groupMap = new HashMap<GroupItem, GroupItem>();
  }
Exemplo n.º 2
0
  /** Initializes the query state. */
  public void init(DbTransaction xa, TableIterator[] tableIterators, boolean isReadOnly) {
    if (_isLocked) throw new IllegalStateException();

    Thread thread = Thread.currentThread();

    if (_thread != null && _thread != thread)
      throw new IllegalStateException(toString() + " attempted query reuse without close");

    _thread = thread;

    _xa = xa;
    _isWrite = !isReadOnly;
    _tableIterators = tableIterators;

    _blockLockLength = tableIterators.length;

    if (_blockLocks == null || _blockLocks.length < _blockLockLength)
      _blockLocks = new Block[_blockLockLength];
    else {
      for (int i = _blockLockLength - 1; i >= 0; i--) _blockLocks[i] = null;
    }

    _rowUpdateCount = 0;
    _groupItem = _tempGroupItem;
    _groupItem.init(0, null);
  }