org.omnaest.utils.structure.table.concrete.predicates.internal.joiner
Class PredicateJoinerCollector<E>

java.lang.Object
  extended by org.omnaest.utils.structure.table.concrete.predicates.internal.joiner.PredicateJoinerCollector<E>
All Implemented Interfaces:
Serializable, PredicateJoiner<E>, TableSelectable.Predicate<E>

public class PredicateJoinerCollector<E>
extends Object
implements PredicateJoiner<E>

A PredicateJoinerCollector holds an internal Set of PredicateJoiner instances and collects and merges their PredicateJoiner#determineJoinableStripeDataSet(StripeData,TableBlock, TableBlock) results by determining the intersection of them.

Author:
Omnaest
See Also:
PredicateJoiner, TableSelectable.Predicate, Serialized Form

Field Summary
protected  Set<PredicateJoiner<E>> predicateJoinerSet
           
 
Constructor Summary
PredicateJoinerCollector(Set<PredicateJoiner<E>> predicateJoinerSet)
           
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

predicateJoinerSet

protected Set<PredicateJoiner<E>> predicateJoinerSet
Constructor Detail

PredicateJoinerCollector

public PredicateJoinerCollector(Set<PredicateJoiner<E>> predicateJoinerSet)
Parameters:
predicateJoinerSet - : ordered set of PredicateJoiner
See Also:
PredicateJoinerCollector
Method Detail

determineJoinableStripeDataSet

public Set<TableInternal.StripeData<E>> determineJoinableStripeDataSet(TableInternal.StripeData<E> stripeData,
                                                                       TableBlock<E> tableBlockLeft,
                                                                       TableBlock<E> tableBlockRight)
Description copied from interface: PredicateJoiner
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.

Specified by:
determineJoinableStripeDataSet in interface PredicateJoiner<E>
Returns:

affectsBothTableBlocks

public boolean affectsBothTableBlocks(TableBlock<E> tableBlockLeft,
                                      TableBlock<E> tableBlockRight)
Description copied from interface: PredicateJoiner
Returns true if the given TableBlocks are affected by this PredicateJoiner

Specified by:
affectsBothTableBlocks in interface PredicateJoiner<E>
Returns:

getRequiredColumns

public Table.Column<E>[] getRequiredColumns()
Description copied from interface: PredicateJoiner
Returns the Table.Columns which are required for this PredicateJoiner

Specified by:
getRequiredColumns in interface PredicateJoiner<E>
Returns:


Copyright © 2011. All Rights Reserved.