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

## org.modeshape.jcr.query.process
Class ProcessingComponent

    java.lang.Object
      org.modeshape.jcr.query.process.ProcessingComponent

Direct Known Subclasses:
  AbstractAccessComponent, DelegatingComponent, DependentQueryComponent, JoinComponent, NoResultsComponent, SetOperationComponent

    @NotThreadSafe
    public abstract class ProcessingComponent

extends Object

A component that performs (some) portion of the query processing by `returning the tuples` that result from this stage of processing. Processing components are designed to be assembled into a processing structure, with a single component at the top that returns the results of a query.

Nested Class Summary
`protected static interface` | `ProcessingComponent.DynamicOperation` Interface for evaluating a `DynamicOperand` to return the resulting value.

Constructor Summary
`protected` | `ProcessingComponent(QueryContext context, QueryResults.Columns columns)`

Method Summary
`void` | `close()` Close these results, allowing any resources to be released.
`protected ProcessingComponent.DynamicOperation` | `createDynamicOperation(TypeSystem typeSystem, Schemata schemata, QueryResults.Columns columns, DynamicOperand operand)` Create a `ProcessingComponent.DynamicOperation` instance that is able to evaluate the supplied `DynamicOperand`.
`protected Comparator<Object[]>` | `createSortComparator(QueryContext context, QueryResults.Columns columns)`
`protected List<Object[]>` | `emptyTuples()` Utility method to create a new tuples list that is empty.
`abstract List<Object[]>` | `execute()` Execute this stage of processing and return the resulting tuples that each conform to the `columns`.
`QueryResults.Columns` | `getColumns()` Get the column definitions.
`QueryContext` | `getContext()` Get the context in which this query is being executed.
`protected Problems` | `problems()` Get the container for problems encountered during processing.

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

Constructor Detail

### ProcessingComponent

    protected ProcessingComponent(QueryContext context,
                                  QueryResults.Columns columns)

Method Detail

### getContext

    public final QueryContext getContext()

  Get the context in which this query is being executed.

  Returns:
    context

### getColumns

    public final QueryResults.Columns getColumns()

  Get the column definitions.

  Returns:
    the column mappings; never null

### problems

    protected final Problems problems()

  Get the container for problems encountered during processing.

  Returns:
    the problems container; never null

### execute

    public abstract List<Object[]> execute()

  Execute this stage of processing and return the resulting tuples that each conform to the `columns`.

  Returns:
    the list of tuples, where each tuple corresonds to the `columns`; never null

### close

    public void close()

  Close these results, allowing any resources to be released.

### emptyTuples

    protected List<Object[]> emptyTuples()

  Utility method to create a new tuples list that is empty.

  Returns:
    the empty tuples list; never null

### createDynamicOperation

    protected ProcessingComponent.DynamicOperation createDynamicOperation(TypeSystem typeSystem,
                                                                          Schemata schemata,
                                                                          QueryResults.Columns columns,
                                                                          DynamicOperand operand)

  Create a `ProcessingComponent.DynamicOperation` instance that is able to evaluate the supplied `DynamicOperand`.

  Parameters:
    `typeSystem` - the type system; may not be null
    `schemata` - the schemata; may not be null
    `columns` - the definition of the result columns and the tuples; may not be null
    `operand` - the dynamic operand that is to be evaluated by the returned object; may not be null
  Returns:
    the dynamic operand operation; never null

### createSortComparator

    protected Comparator<Object[]> createSortComparator(QueryContext context,
                                                        QueryResults.Columns columns)

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

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