ColumnDefinition (apache-cassandra API)
Date: 2014-10-21

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

    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()`
    `void` | `deleteFromSchema(Mutation mutation, long timestamp)` Drop specified column from the schema using given mutation.
    `boolean` | `equals(java.lang.Object o)`
    `static java.util.List<ColumnDefinition>` | `fromSchema(UntypedResultSet serializedColumns, java.lang.String ksName, java.lang.String cfName, AbstractType<?> rawComparator, boolean isSuper)` Deserialize columns from storage-level representation
    `static ColumnDefinition` | `fromThrift(java.lang.String ksName, java.lang.String cfName, AbstractType<?> thriftComparator, AbstractType<?> thriftSubcomparator, ColumnDef thriftColumnDef)`
    `static java.util.List<ColumnDefinition>` | `fromThrift(java.lang.String ksName, java.lang.String cfName, AbstractType<?> thriftComparator, AbstractType<?> thriftSubcomparator, java.util.List<ColumnDef> thriftDefs)`
    `static AbstractType<?>` | `getComponentComparator(AbstractType<?> rawComparator, java.lang.Integer componentIndex, ColumnDefinition.Kind kind)`
    `java.lang.String` | `getIndexName()`
    `java.util.Map<java.lang.String,java.lang.String>` | `getIndexOptions()`
    `IndexType` | `getIndexType()`
    `int` | `hashCode()`
    `boolean` | `isIndexed()`
    `boolean` | `isOnAllComponents()`
    `boolean` | `isPartOfCellName()` Whether the name of this definition is serialized in the cell nane, i.e.
    `boolean` | `isPrimaryKeyColumn()`
    `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)`
    `static UntypedResultSet` | `resultify(Row serializedColumns)`
    `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)`
    `void` | `toSchema(Mutation mutation, long timestamp)`
    `java.lang.String` | `toString()`
    `ColumnDef` | `toThrift()`
    `static java.util.List<ColumnDef>` | `toThrift(java.util.Map<java.nio.ByteBuffer,ColumnDefinition> columns)`
    `ColumnDefinition` | `withNewName(ColumnIdentifier newName)`
    `ColumnDefinition` | `withNewType(AbstractType<?> newType)`

    - ### 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()

    - #### isStatic

          public boolean isStatic()

    - #### position

          public int position()

    - #### equals

          public boolean equals(java.lang.Object o)

      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`

    - #### isThriftCompatible

          public boolean isThriftCompatible()

    - #### isPrimaryKeyColumn

          public boolean isPrimaryKeyColumn()

    - #### toThrift

          public static java.util.List<ColumnDef> toThrift(java.util.Map<java.nio.ByteBuffer,ColumnDefinition> columns)

    - #### 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.

    - #### toThrift

          public ColumnDef toThrift()

    - #### fromThrift

          public static ColumnDefinition fromThrift(java.lang.String ksName,
                                    java.lang.String cfName,
                                    AbstractType<?> thriftComparator,
                                    AbstractType<?> thriftSubcomparator,
                                    ColumnDef thriftColumnDef)
                                             throws SyntaxException,
                                                    ConfigurationException

      Throws:
        `SyntaxException`
        `ConfigurationException`

    - #### fromThrift

          public static java.util.List<ColumnDefinition> fromThrift(java.lang.String ksName,
                                                    java.lang.String cfName,
                                                    AbstractType<?> thriftComparator,
                                                    AbstractType<?> thriftSubcomparator,
                                                    java.util.List<ColumnDef> thriftDefs)
                                                             throws SyntaxException,
                                                                    ConfigurationException

      Throws:
        `SyntaxException`
        `ConfigurationException`

    - #### deleteFromSchema

          public void deleteFromSchema(Mutation mutation,
                              long timestamp)

      Drop specified column from the schema using given mutation.
      Parameters:
        `mutation` - The schema mutation
        `timestamp` - The timestamp to use for column modification

    - #### toSchema

          public void toSchema(Mutation mutation,
                      long timestamp)

    - #### apply

          public ColumnDefinition apply(ColumnDefinition def)
                                 throws ConfigurationException

      Throws:
        `ConfigurationException`

    - #### resultify

          public static UntypedResultSet resultify(Row serializedColumns)

    - #### fromSchema

          public static java.util.List<ColumnDefinition> fromSchema(UntypedResultSet serializedColumns,
                                                    java.lang.String ksName,
                                                    java.lang.String cfName,
                                                    AbstractType<?> rawComparator,
                                                    boolean isSuper)

      Deserialize columns from storage-level representation
      Parameters:
        `serializedColumns` - storage-level partition containing the column definitions
      Returns:
        the list of processed ColumnDefinitions

    - #### getComponentComparator

          public static AbstractType<?> getComponentComparator(AbstractType<?> rawComparator,
                                               java.lang.Integer componentIndex,
                                               ColumnDefinition.Kind kind)

    - #### 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()

Copyright © 2014 The Apache Software Foundation