ColumnDefinition (apache-cassandra API)
Date: 2018-02-12

org.apache.cassandra.config

## Class ColumnDefinition

- java.lang.Object
- - org.apache.cassandra.cql3.ColumnSpecification
  - - org.apache.cassandra.config.ColumnDefinition

-     public class ColumnDefinition
      extends ColumnSpecification

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `ColumnDefinition.Kind`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `ColumnDefinition.Kind` | `kind`

    - ### Fields inherited from class org.apache.cassandra.cql3.ColumnSpecification

      `cfName, ksName, name, type`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ColumnDefinition(CFMetaData cfm, java.nio.ByteBuffer name, AbstractType<?> validator, java.lang.Integer componentIndex, ColumnDefinition.Kind kind)`
    `ColumnDefinition(java.lang.String ksName, java.lang.String cfName, ColumnIdentifier name, AbstractType<?> validator, IndexType indexType, java.util.Map<java.lang.String,java.lang.String> indexOptions, java.lang.String indexName, java.lang.Integer componentIndex, ColumnDefinition.Kind kind)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ColumnDefinition` | `apply(ColumnDefinition def)`
    `static ColumnDefinition` | `clusteringKeyDef(CFMetaData cfm, java.nio.ByteBuffer name, AbstractType<?> validator, java.lang.Integer componentIndex)`
    `static ColumnDefinition` | `compactValueDef(CFMetaData cfm, java.nio.ByteBuffer name, AbstractType<?> validator)`
    `ColumnDefinition` | `copy()`
    `boolean` | `equals(java.lang.Object o)`
    `java.lang.String` | `getIndexName()`
    `java.util.Map<java.lang.String,java.lang.String>` | `getIndexOptions()`
    `IndexType` | `getIndexType()`
    `int` | `hashCode()`
    `boolean` | `hasIndexOption(java.lang.String name)` Checks if the index option with the specified name has been specified.
    `boolean` | `isClusteringColumn()`
    `boolean` | `isCompactValue()`
    `boolean` | `isIndexed()`
    `boolean` | `isOnAllComponents()`
    `boolean` | `isPartitionKey()`
    `boolean` | `isPartOfCellName()` Whether the name of this definition is serialized in the cell nane, i.e.
    `boolean` | `isPrimaryKeyColumn()`
    `boolean` | `isRegular()`
    `boolean` | `isStatic()`
    `boolean` | `isThriftCompatible()`
    `static ColumnDefinition` | `partitionKeyDef(CFMetaData cfm, java.nio.ByteBuffer name, AbstractType<?> validator, java.lang.Integer componentIndex)`
    `static ColumnDefinition` | `partitionKeyDef(java.lang.String ksName, java.lang.String cfName, java.nio.ByteBuffer name, AbstractType<?> validator, java.lang.Integer componentIndex)`
    `int` | `position()`
    `static ColumnDefinition` | `regularDef(CFMetaData cfm, java.nio.ByteBuffer name, AbstractType<?> validator, java.lang.Integer componentIndex)`
    `ColumnDefinition` | `setIndex(java.lang.String indexName, IndexType indexType, java.util.Map<java.lang.String,java.lang.String> indexOptions)`
    `ColumnDefinition` | `setIndexName(java.lang.String indexName)`
    `ColumnDefinition` | `setIndexType(IndexType indexType, java.util.Map<java.lang.String,java.lang.String> indexOptions)`
    `static ColumnDefinition` | `staticDef(CFMetaData cfm, java.nio.ByteBuffer name, AbstractType<?> validator, java.lang.Integer componentIndex)`
    `static java.util.List<ColumnIdentifier>` | `toIdentifiers(java.util.List<ColumnDefinition> definitions)` Converts the specified column definitions into column identifiers.
    `java.lang.String` | `toString()`
    `ColumnDefinition` | `withNewName(ColumnIdentifier newName)`
    `ColumnDefinition` | `withNewType(AbstractType<?> newType)`

    - ### Methods inherited from class org.apache.cassandra.cql3.ColumnSpecification

      `allInSameTable, isReversedType, withAlias`

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

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

- - ### Field Detail

    - #### kind

          public final ColumnDefinition.Kind kind

  - ### Constructor Detail

    - #### ColumnDefinition

          public ColumnDefinition(CFMetaData cfm,
                                  java.nio.ByteBuffer name,
                                  AbstractType<?> validator,
                                  java.lang.Integer componentIndex,
                                  ColumnDefinition.Kind kind)

    - #### ColumnDefinition

          public ColumnDefinition(java.lang.String ksName,
                                  java.lang.String cfName,
                                  ColumnIdentifier name,
                                  AbstractType<?> validator,
                                  IndexType indexType,
                                  java.util.Map<java.lang.String,java.lang.String> indexOptions,
                                  java.lang.String indexName,
                                  java.lang.Integer componentIndex,
                                  ColumnDefinition.Kind kind)

  - ### Method Detail

    - #### partitionKeyDef

          public static ColumnDefinition partitionKeyDef(CFMetaData cfm,
                                                         java.nio.ByteBuffer name,
                                                         AbstractType<?> validator,
                                                         java.lang.Integer componentIndex)

    - #### partitionKeyDef

          public static ColumnDefinition partitionKeyDef(java.lang.String ksName,
                                                         java.lang.String cfName,
                                                         java.nio.ByteBuffer name,
                                                         AbstractType<?> validator,
                                                         java.lang.Integer componentIndex)

    - #### clusteringKeyDef

          public static ColumnDefinition clusteringKeyDef(CFMetaData cfm,
                                                          java.nio.ByteBuffer name,
                                                          AbstractType<?> validator,
                                                          java.lang.Integer componentIndex)

    - #### regularDef

          public static ColumnDefinition regularDef(CFMetaData cfm,
                                                    java.nio.ByteBuffer name,
                                                    AbstractType<?> validator,
                                                    java.lang.Integer componentIndex)

    - #### staticDef

          public static ColumnDefinition staticDef(CFMetaData cfm,
                                                   java.nio.ByteBuffer name,
                                                   AbstractType<?> validator,
                                                   java.lang.Integer componentIndex)

    - #### compactValueDef

          public static ColumnDefinition compactValueDef(CFMetaData cfm,
                                                         java.nio.ByteBuffer name,
                                                         AbstractType<?> validator)

    - #### copy

          public ColumnDefinition copy()

    - #### withNewName

          public ColumnDefinition withNewName(ColumnIdentifier newName)

    - #### withNewType

          public ColumnDefinition withNewType(AbstractType<?> newType)

    - #### isOnAllComponents

          public boolean isOnAllComponents()

    - #### isPartitionKey

          public boolean isPartitionKey()

    - #### isClusteringColumn

          public boolean isClusteringColumn()

    - #### isStatic

          public boolean isStatic()

    - #### isRegular

          public boolean isRegular()

    - #### isCompactValue

          public boolean isCompactValue()

    - #### position

          public int position()

    - #### equals

          public boolean equals(java.lang.Object o)

      Overrides:
        `equals` in class `ColumnSpecification`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `ColumnSpecification`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `ColumnSpecification`

    - #### isThriftCompatible

          public boolean isThriftCompatible()

    - #### isPrimaryKeyColumn

          public boolean isPrimaryKeyColumn()

    - #### isPartOfCellName

          public boolean isPartOfCellName()

      Whether the name of this definition is serialized in the cell nane, i.e. whether it's not just a non-stored CQL metadata.

    - #### apply

          public ColumnDefinition apply(ColumnDefinition def)
                                 throws ConfigurationException

      Throws:
        `ConfigurationException`

    - #### getIndexName

          public java.lang.String getIndexName()

    - #### setIndexName

          public ColumnDefinition setIndexName(java.lang.String indexName)

    - #### setIndexType

          public ColumnDefinition setIndexType(IndexType indexType,
                                               java.util.Map<java.lang.String,java.lang.String> indexOptions)

    - #### setIndex

          public ColumnDefinition setIndex(java.lang.String indexName,
                                           IndexType indexType,
                                           java.util.Map<java.lang.String,java.lang.String> indexOptions)

    - #### isIndexed

          public boolean isIndexed()

    - #### getIndexType

          public IndexType getIndexType()

    - #### getIndexOptions

          public java.util.Map<java.lang.String,java.lang.String> getIndexOptions()

    - #### hasIndexOption

          public boolean hasIndexOption(java.lang.String name)

      Checks if the index option with the specified name has been specified.
      Parameters:
        `name` - index option name
      Returns:
        `true` if the index option with the specified name has been specified, `false` otherwise.

    - #### toIdentifiers

          public static java.util.List<ColumnIdentifier> toIdentifiers(java.util.List<ColumnDefinition> definitions)

      Converts the specified column definitions into column identifiers.
      Parameters:
        `definitions` - the column definitions to convert.
      Returns:
        the column identifiers corresponding to the specified definitions

Copyright © 2018 The Apache Software Foundation