## org.h2.table
Class JoinBatch

    java.lang.Object
      org.h2.table.JoinBatch

    public final class JoinBatch

extends java.lang.Object

Support for asynchronous batched index lookups on joins.

See Also:
  `Index.createLookupBatch(TableFilter)`, `IndexLookupBatch`

Constructor Summary
`JoinBatch(int filtersCount, TableFilter additionalFilter)`

Method Summary
`static IndexLookupBatch` `createFakeIndexLookupBatch(TableFilter filter)` Create fake index lookup batch for non-batched table filter.
`static IndexLookupBatch` `createViewIndexLookupBatch(ViewIndex viewIndex)` Create index lookup batch for a view index.
`IndexLookupBatch` `getLookupBatch(int joinFilterId)` Get the lookup batch for the given table filter.
`Value` `getValue(int filterId, Column column)` Get the value for the given column.
`boolean` `next()` Get next row from the join batch.
`void` `register(TableFilter filter, IndexLookupBatch lookupBatch)` Register the table filter and lookup batch.
`void` `reset(boolean beforeQuery)` Reset state of this batch.
`java.lang.String` `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### JoinBatch

    public JoinBatch(int filtersCount,
                     TableFilter additionalFilter)

Parameters:
  `filtersCount` - number of filters participating in this batched join
  `additionalFilter` - table filter after this batched join.

Method Detail

### getLookupBatch

    public IndexLookupBatch getLookupBatch(int joinFilterId)

  Get the lookup batch for the given table filter.

  Parameters:
    `joinFilterId` - joined table filter id
  Returns:
    lookup batch

### reset

    public void reset(boolean beforeQuery)

  Reset state of this batch.

  Parameters:
    `beforeQuery` - `true` if reset was called before the query run, `false` if after

### register

    public void register(TableFilter filter,
                         IndexLookupBatch lookupBatch)

  Register the table filter and lookup batch.

  Parameters:
    `filter` - table filter
    `lookupBatch` - lookup batch

### getValue

    public Value getValue(int filterId,
                          Column column)

  Get the value for the given column.

  Parameters:
    `filterId` - table filter id
    `column` - the column
  Returns:
    column value for current row

### next

    public boolean next()

  Get next row from the join batch.

  Returns:
    true if there is a next row

### createViewIndexLookupBatch

    public static IndexLookupBatch createViewIndexLookupBatch(ViewIndex viewIndex)

  Create index lookup batch for a view index.

  Parameters:
    `viewIndex` - view index
  Returns:
    index lookup batch or `null` if batching is not supported for this query

### createFakeIndexLookupBatch

    public static IndexLookupBatch createFakeIndexLookupBatch(TableFilter filter)

  Create fake index lookup batch for non-batched table filter.

  Parameters:
    `filter` - the table filter
  Returns:
    fake index lookup batch

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`