org.modeshape.jcr.query.engine

## Class ScanningQueryEngine.ResultColumns

- java.lang.Object
- - org.modeshape.jcr.query.engine.ScanningQueryEngine.ResultColumns

- All Implemented Interfaces:
    Serializable, Iterable<Column>, QueryResults.Columns
  Enclosing class:
    ScanningQueryEngine

      public static final class ScanningQueryEngine.ResultColumns
      extends Object
      implements QueryResults.Columns

  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected static class` | `ScanningQueryEngine.ResultColumns.ColumnInfo`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static String` | `DEFAULT_SELECTOR_NAME`
    `protected static ScanningQueryEngine.ResultColumns` | `EMPTY`
    `protected static List<Column>` | `NO_COLUMNS`
    `protected static List<String>` | `NO_TYPES`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ScanningQueryEngine.ResultColumns(List<Column> columns, List<String> columnTypes, boolean includeFullTextSearchScores, QueryResults.Columns precedingColumns)` Create a new definition for the query results given the supplied columns.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected static String` | `columnNameFor(Column column, List<String> columnNames, Set<Column> columnsWithDuplicateNames, Collection<String> selectorNames)`
    `boolean` | `equals(Object obj)`
    `protected static Set<Column>` | `findColumnsWithSameNames(List<Column> columns)`
    `List<String>` | `getColumnNames()` Get the names of the columns.
    `List<? extends Column>` | `getColumns()` Get the columns.
    `String` | `getColumnTypeForProperty(String selectorName, String propertyName)` Get the type of the column given the name of the selector and the property name from where the column should be obtained.
    `List<String>` | `getColumnTypes()` Get the type name for each column.
    `String` | `getPropertyNameForColumnName(String columnName)` Get the name of the property that corresponds to the named column in each tuple.
    `int` | `getSelectorIndex(String selectorName)` Get the index of the nodes for this selector in each of the `node sequence batches`.
    `String` | `getSelectorNameForColumnName(String columnName)` Get the name of the selector that produced the column with the given name.
    `List<String>` | `getSelectorNames()` Get the names of the selectors that are associated with these results.
    `boolean` | `hasFullTextSearchScores()` Determine whether these results include full-text search scores.
    `int` | `hashCode()`
    `Iterator<Column>` | `iterator()`
    `String` | `toString()`
    `QueryResults.Columns` | `with(QueryResults.Columns other)` Return a new Columns that is a superset combination of both this Columns and the supplied Columns.

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### NO_COLUMNS

          protected static final List<Column> NO_COLUMNS

    - #### NO_TYPES

          protected static final List<String> NO_TYPES

    - #### DEFAULT_SELECTOR_NAME

          protected static final String DEFAULT_SELECTOR_NAME

      See Also:
        Constant Field Values

    - #### EMPTY

          protected static final ScanningQueryEngine.ResultColumns EMPTY

  - ### Constructor Detail

    - #### ScanningQueryEngine.ResultColumns

          public ScanningQueryEngine.ResultColumns(List<Column> columns,
                                           List<String> columnTypes,
                                           boolean includeFullTextSearchScores,
                                           QueryResults.Columns precedingColumns)

      Create a new definition for the query results given the supplied columns.
      Parameters:
        `columns` - the columns that define the results; should never be modified directly
        `columnTypes` - the names of the types for each column in `columns`
        `includeFullTextSearchScores` - true if the results should include full text search scores, or false otherwise
        `precedingColumns` - the columns for the preceding plan node and which contain correct selector indexes; may be null

  - ### Method Detail

    - #### findColumnsWithSameNames

          protected static Set<Column> findColumnsWithSameNames(List<Column> columns)

    - #### columnNameFor

          protected static String columnNameFor(Column column,
                             List<String> columnNames,
                             Set<Column> columnsWithDuplicateNames,
                             Collection<String> selectorNames)

    - #### iterator

          public Iterator<Column> iterator()

      Specified by:
        `iterator` in interface `Iterable<Column>`

    - #### getColumns

          public List<? extends Column> getColumns()

      Description copied from interface: `QueryResults.Columns`
      Get the columns.
      Specified by:
        `getColumns` in interface `QueryResults.Columns`
      Returns:
        the immutable list of columns; never null

    - #### getColumnNames

          public List<String> getColumnNames()

      Description copied from interface: `QueryResults.Columns`
      Get the names of the columns.
      Specified by:
        `getColumnNames` in interface `QueryResults.Columns`
      Returns:
        the immutable list of column names, with size equal to the number of `columns`; never null

    - #### getColumnTypes

          public List<String> getColumnTypes()

      Description copied from interface: `QueryResults.Columns`
      Get the type name for each column.
      Specified by:
        `getColumnTypes` in interface `QueryResults.Columns`
      Returns:
        the immutable list of type names, with size equal to the number of `columns`; never null

    - #### getColumnTypeForProperty

          public String getColumnTypeForProperty(String selectorName,
                                        String propertyName)

      Description copied from interface: `QueryResults.Columns`
      Get the type of the column given the name of the selector and the property name from where the column should be obtained.
      Specified by:
        `getColumnTypeForProperty` in interface `QueryResults.Columns`
      Parameters:
        `selectorName` - the selector name
        `propertyName` - the name of the property
      Returns:
        the type for the named column

    - #### getSelectorIndex

          public int getSelectorIndex(String selectorName)

      Description copied from interface: `QueryResults.Columns`
      Get the index of the nodes for this selector in each of the `node sequence batches`.
      Specified by:
        `getSelectorIndex` in interface `QueryResults.Columns`
      Parameters:
        `selectorName` - the selector name
      Returns:
        the index of the node for the named selector, or negative if the selector is not known

    - #### getSelectorNames

          public List<String> getSelectorNames()

      Description copied from interface: `QueryResults.Columns`
      Get the names of the selectors that are associated with these results.
      Specified by:
        `getSelectorNames` in interface `QueryResults.Columns`
      Returns:
        the immutable list of selector names; never null

    - #### getPropertyNameForColumnName

          public String getPropertyNameForColumnName(String columnName)

      Description copied from interface: `QueryResults.Columns`
      Get the name of the property that corresponds to the named column in each tuple.
      Specified by:
        `getPropertyNameForColumnName` in interface `QueryResults.Columns`
      Parameters:
        `columnName` - the column name
      Returns:
        the property name, or the supplied column name if there is no property for it

    - #### getSelectorNameForColumnName

          public String getSelectorNameForColumnName(String columnName)

      Description copied from interface: `QueryResults.Columns`
      Get the name of the selector that produced the column with the given name.
      Specified by:
        `getSelectorNameForColumnName` in interface `QueryResults.Columns`
      Parameters:
        `columnName` - the column name
      Returns:
        the selector name

    - #### hasFullTextSearchScores

          public boolean hasFullTextSearchScores()

      Description copied from interface: `QueryResults.Columns`
      Determine whether these results include full-text search scores.
      Specified by:
        `hasFullTextSearchScores` in interface `QueryResults.Columns`
      Returns:
        true if the full-text search scores are included in the results, or false otherwise

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### with

          public QueryResults.Columns with(QueryResults.Columns other)

      Description copied from interface: `QueryResults.Columns`
      Return a new Columns that is a superset combination of both this Columns and the supplied Columns.
      Specified by:
        `with` in interface `QueryResults.Columns`
      Parameters:
        `other` - the other columns; may not be null
      Returns:
        a new Columns instance that is a superset of `this` and `other`; never null

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