org.omnaest.utils.structure.table.concrete.predicates.internal.joiner
Interface PredicateJoiner<E>

Type Parameters:
E -
All Superinterfaces:
Serializable, TableSelectable.Predicate<E>
All Known Implementing Classes:
EqualColumns, PredicateJoinerCollector

public interface PredicateJoiner<E>
extends TableSelectable.Predicate<E>

Every PredicateJoiner should be represented by a static factory method within the PredicateFactory.

A PredicateJoiner will provide the respecting TableInternal.StripeData instances from another TableBlock when a TableInternal.StripeData is given from a previous TableBlock. This allows to implement Joins which uses indexes.

Author:
Omnaest
See Also:
PredicateFactory, TableSelectable.Predicate, TableBlock

Method Summary
 boolean affectsBothTableBlocks(TableBlock<E> tableBlockLeft, TableBlock<E> tableBlockRight)
          Returns true if the given TableBlocks are affected by this PredicateJoiner
 Set<TableInternal.StripeData<E>> determineJoinableStripeDataSet(TableInternal.StripeData<E> stripeData, TableBlock<E> tableBlockLeft, TableBlock<E> tableBlockRight)
          Provides the TableInternal.StripeData instances from the right TableBlock which should be joined with the given TableInternal.StripeData of the left TableBlock.
 Table.Column<E>[] getRequiredColumns()
          Returns the Table.Columns which are required for this PredicateJoiner
 

Method Detail

determineJoinableStripeDataSet

Set<TableInternal.StripeData<E>> determineJoinableStripeDataSet(TableInternal.StripeData<E> stripeData,
                                                                TableBlock<E> tableBlockLeft,
                                                                TableBlock<E> tableBlockRight)
Provides the TableInternal.StripeData instances from the right TableBlock which should be joined with the given TableInternal.StripeData of the left TableBlock. The Set will be ordered.

Parameters:
stripeData -
tableBlockLeft -
tableBlockRight -
Returns:

affectsBothTableBlocks

boolean affectsBothTableBlocks(TableBlock<E> tableBlockLeft,
                               TableBlock<E> tableBlockRight)
Returns true if the given TableBlocks are affected by this PredicateJoiner

Parameters:
tableBlockLeft -
tableBlockRight -
Returns:

getRequiredColumns

Table.Column<E>[] getRequiredColumns()
Returns the Table.Columns which are required for this PredicateJoiner

Returns:


Copyright © 2011. All Rights Reserved.