org.apache.cassandra.cql3.selection

## Class SelectionColumnMapping

- java.lang.Object
- - org.apache.cassandra.cql3.selection.SelectionColumnMapping

- All Implemented Interfaces:
    SelectionColumns

      public class SelectionColumnMapping
      extends java.lang.Object
      implements SelectionColumns

  Separately maintains the ColumnSpecifications and their mappings to underlying columns as we may receive null mappings. This occurs where a query result includes a column specification which does not map to any particular real column, e.g. COUNT queries or where no-arg functions like now() are used

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected SelectionColumnMapping` | `addMapping(ColumnSpecification colSpec, ColumnDefinition column)`
    `protected SelectionColumnMapping` | `addMapping(ColumnSpecification colSpec, java.lang.Iterable<ColumnDefinition> columns)`
    `boolean` | `equals(java.lang.Object obj)`
    `java.util.List<ColumnSpecification>` | `getColumnSpecifications()`
    `com.google.common.collect.Multimap<ColumnSpecification,ColumnDefinition>` | `getMappings()`
    `int` | `hashCode()`
    `protected static SelectionColumnMapping` | `newMapping()`
    `protected static SelectionColumnMapping` | `simpleMapping(java.lang.Iterable<ColumnDefinition> columnDefinitions)`
    `java.lang.String` | `toString()`

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

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

- - ### Method Detail

    - #### newMapping

          protected static SelectionColumnMapping newMapping()

    - #### simpleMapping

          protected static SelectionColumnMapping simpleMapping(java.lang.Iterable<ColumnDefinition> columnDefinitions)

    - #### addMapping

          protected SelectionColumnMapping addMapping(ColumnSpecification colSpec,
                                                      ColumnDefinition column)

    - #### addMapping

          protected SelectionColumnMapping addMapping(ColumnSpecification colSpec,
                                                      java.lang.Iterable<ColumnDefinition> columns)

    - #### getColumnSpecifications

          public java.util.List<ColumnSpecification> getColumnSpecifications()

      Specified by:
        `getColumnSpecifications` in interface `SelectionColumns`

    - #### getMappings

          public com.google.common.collect.Multimap<ColumnSpecification,ColumnDefinition> getMappings()

      Specified by:
        `getMappings` in interface `SelectionColumns`

    - #### equals

          public boolean equals(java.lang.Object obj)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

Copyright © 2018 The Apache Software Foundation