org.apache.cassandra.config

## Class ColumnDefinition

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

    public class ColumnDefinition
    extends java.lang.Object

### Nested Class Summary

Nested Classes
`static class` `ColumnDefinition.Type`

### Field Summary

Fields
`java.lang.Integer` `componentIndex`
`java.nio.ByteBuffer` `name`
`ColumnDefinition.Type` `type`

### Constructor Summary

Constructors
Constructor and Description
`ColumnDefinition(java.nio.ByteBuffer name, AbstractType<?> validator, IndexType indexType, java.util.Map<java.lang.String,java.lang.String> indexOptions, java.lang.String indexName, java.lang.Integer componentIndex, ColumnDefinition.Type type)`
`ColumnDefinition(java.nio.ByteBuffer name, AbstractType<?> validator, java.lang.Integer componentIndex, ColumnDefinition.Type type)`

### Method Summary

Methods
`void` `apply(ColumnDefinition def, AbstractType<?> comparator)`
`ColumnDefinition` `clone()`
`ColumnDefinition` `cloneWithNewName(java.nio.ByteBuffer newName)`
`static ColumnDefinition` `clusteringKeyDef(java.nio.ByteBuffer name, AbstractType<?> validator, java.lang.Integer componentIndex)`
`static ColumnDefinition` `compactValueDef(java.nio.ByteBuffer name, AbstractType<?> validator)`
`void` `deleteFromSchema(RowMutation rm, java.lang.String cfName, AbstractType<?> comparator, long timestamp)` Drop specified column from the schema using given row.
`boolean` `equals(java.lang.Object o)`
`static java.util.List<ColumnDefinition>` `fromSchema(Row serializedColumns, CFMetaData cfm)` Deserialize columns from storage-level representation
`static ColumnDefinition` `fromThrift(ColumnDef thriftColumnDef, boolean isSuper)`
`static java.util.Map<java.nio.ByteBuffer,ColumnDefinition>` `fromThrift(java.util.List<ColumnDef> thriftDefs, boolean isSuper)`
`java.lang.String` `getIndexName()`
`java.util.Map<java.lang.String,java.lang.String>` `getIndexOptions()`
`IndexType` `getIndexType()`
`AbstractType<?>` `getValidator()`
`int` `hashCode()`
`boolean` `isIndexed()`
`boolean` `isThriftCompatible()`
`static ColumnDefinition` `partitionKeyDef(java.nio.ByteBuffer name, AbstractType<?> validator, java.lang.Integer componentIndex)`
`static ColumnDefinition` `regularDef(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)`
`void` `setValidator(AbstractType<?> validator)`
`static ColumnDefinition` `staticDef(java.nio.ByteBuffer name, AbstractType<?> validator, java.lang.Integer componentIndex)`
`void` `toSchema(RowMutation rm, java.lang.String cfName, AbstractType<?> comparator, long timestamp)`
`java.lang.String` `toString()`
`ColumnDef` `toThrift()`
`static java.util.List<ColumnDef>` `toThrift(java.util.Map<java.nio.ByteBuffer,ColumnDefinition> columns)`

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

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

### Field Detail

#### name

    public final java.nio.ByteBuffer name

#### type

    public final ColumnDefinition.Type type

#### componentIndex

    public final java.lang.Integer componentIndex

### Constructor Detail

#### ColumnDefinition

    public ColumnDefinition(java.nio.ByteBuffer name,
                    AbstractType<?> validator,
                    java.lang.Integer componentIndex,
                    ColumnDefinition.Type type)

#### ColumnDefinition

    public ColumnDefinition(java.nio.ByteBuffer name,
                    AbstractType<?> validator,
                    IndexType indexType,
                    java.util.Map<java.lang.String,java.lang.String> indexOptions,
                    java.lang.String indexName,
                    java.lang.Integer componentIndex,
                    ColumnDefinition.Type type)

### Method Detail

#### partitionKeyDef

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

#### clusteringKeyDef

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

#### regularDef

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

#### staticDef

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

#### compactValueDef

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

#### clone

    public ColumnDefinition clone()

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

#### cloneWithNewName

    public ColumnDefinition cloneWithNewName(java.nio.ByteBuffer newName)

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

#### toThrift

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

#### toThrift

    public ColumnDef toThrift()

#### fromThrift

    public static ColumnDefinition fromThrift(ColumnDef thriftColumnDef,
                              boolean isSuper)
                                       throws SyntaxException,
                                              ConfigurationException

Throws:
  `SyntaxException`
  `ConfigurationException`

#### fromThrift

    public static java.util.Map<java.nio.ByteBuffer,ColumnDefinition> fromThrift(java.util.List<ColumnDef> thriftDefs,
                                                                 boolean isSuper)
                                                                          throws SyntaxException,
                                                                                 ConfigurationException

Throws:
  `SyntaxException`
  `ConfigurationException`

#### deleteFromSchema

    public void deleteFromSchema(RowMutation rm,
                        java.lang.String cfName,
                        AbstractType<?> comparator,
                        long timestamp)

Drop specified column from the schema using given row.

Parameters:
  `rm` - The schema row mutation
  `cfName` - The name of the parent ColumnFamily
  `timestamp` - The timestamp to use for column modification

#### toSchema

    public void toSchema(RowMutation rm,
                java.lang.String cfName,
                AbstractType<?> comparator,
                long timestamp)

#### apply

    public void apply(ColumnDefinition def,
             AbstractType<?> comparator)
               throws ConfigurationException

Throws:
  `ConfigurationException`

#### fromSchema

    public static java.util.List<ColumnDefinition> fromSchema(Row serializedColumns,
                                              CFMetaData cfm)

Deserialize columns from storage-level representation

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

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

#### getValidator

    public AbstractType<?> getValidator()

#### setValidator

    public void setValidator(AbstractType<?> validator)