Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.modeshape.graph.query.process
Class SetOperationComponent

    java.lang.Object
      org.modeshape.graph.query.process.ProcessingComponent
          org.modeshape.graph.query.process.SetOperationComponent

Direct Known Subclasses:
  ExceptComponent, IntersectComponent, UnionComponent

    public abstract class SetOperationComponent

extends ProcessingComponent

Nested Class Summary

Nested classes/interfaces inherited from class org.modeshape.graph.query.process.ProcessingComponent
`ProcessingComponent.DynamicOperation`

Field Summary
`protected Comparator<Object[]>` | `removeDuplicatesComparator`

Constructor Summary
`protected` | `SetOperationComponent(QueryContext context, QueryResults.Columns columns, Iterable<ProcessingComponent> sources, boolean alreadySorted, boolean all)`

Method Summary
`protected void` | `removeDuplicatesIfRequested(List<Object[]> tuples)`
`protected Iterable<ProcessingComponent>` | `sources()`
`protected static boolean` | `unionCompatible(QueryResults.Columns columns, Iterable<ProcessingComponent> sources)`
`protected static Iterable<ProcessingComponent>` | `wrapWithLocationOrdering(Iterable<ProcessingComponent> sources, boolean alreadySorted)` The sources' results must be sorted before the intersection can be computed.

Methods inherited from class org.modeshape.graph.query.process.ProcessingComponent
`close, createDynamicOperation, createSortComparator, emptyTuples, execute, getColumns, getContext, problems`

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

Field Detail

### removeDuplicatesComparator

    protected final Comparator<Object[]> removeDuplicatesComparator

Constructor Detail

### SetOperationComponent

    protected SetOperationComponent(QueryContext context,
                                    QueryResults.Columns columns,
                                    Iterable<ProcessingComponent> sources,
                                    boolean alreadySorted,
                                    boolean all)

Method Detail

### unionCompatible

    protected static boolean unionCompatible(QueryResults.Columns columns,
                                             Iterable<ProcessingComponent> sources)

### sources

    protected Iterable<ProcessingComponent> sources()

  Returns:
    sources

### wrapWithLocationOrdering

    protected static Iterable<ProcessingComponent> wrapWithLocationOrdering(Iterable<ProcessingComponent> sources,
                                                                            boolean alreadySorted)

  The sources' results must be sorted before the intersection can be computed. Ensure that the sources' results are indeed sorted, and if not wrap them in a sorting component.

  Parameters:
    `sources` - the sources being intersected; may not be null
    `alreadySorted` - true if the sources' results are already sorted, or false if they must be sorted by this component
  Returns:
    the sources (or their wrappers); never null

### removeDuplicatesIfRequested

    protected void removeDuplicatesIfRequested(List<Object[]> tuples)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008-2011 JBoss, a division of Red Hat. All Rights Reserved.