## org.apache.cassandra.config
Class ColumnDefinition

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

    public class ColumnDefinition

extends java.lang.Object

Field Summary
`java.lang.Integer` `componentIndex`
`java.nio.ByteBuffer` `name`

Constructor Summary
`ColumnDefinition(java.nio.ByteBuffer name, AbstractType<?> validator, IndexType index_type, java.util.Map<java.lang.String,java.lang.String> index_options, java.lang.String index_name, java.lang.Integer componentIndex)`

Method Summary
`void` `apply(ColumnDefinition def, AbstractType<?> comparator)`
`static ColumnDefinition` `ascii(java.lang.String name, java.lang.Integer cidx)`
`static ColumnDefinition` `bool(java.lang.String name, java.lang.Integer cidx)`
`ColumnDefinition` `clone()`
`void` `deleteFromSchema(RowMutation rm, java.lang.String cfName, AbstractType<?> comparator, long timestamp)` Drop specified column from the schema using given row.
`static ColumnDefinition` `double_(java.lang.String name, java.lang.Integer cidx)`
`boolean` `equals(java.lang.Object o)`
`static java.util.List<ColumnDefinition>` `fromSchema(Row row, CFMetaData cfm)` Deserialize columns from low-level representation
`static ColumnDefinition` `fromThrift(ColumnDef thriftColumnDef)`
`static java.util.Map<java.nio.ByteBuffer,ColumnDefinition>` `fromThrift(java.util.List<ColumnDef> thriftDefs)`
`java.lang.String` `getIndexName()`
`java.util.Map<java.lang.String,java.lang.String>` `getIndexOptions()`
`IndexType` `getIndexType()`
`static java.util.Map<java.lang.String,java.lang.String>` `getStringMap(java.util.Map<java.lang.CharSequence,java.lang.CharSequence> charMap)`
`AbstractType<?>` `getValidator()`
`int` `hashCode()`
`static ColumnDefinition` `int32(java.lang.String name, java.lang.Integer cidx)`
`static Row` `readSchema(java.lang.String ksName, java.lang.String cfName)`
`void` `setIndexName(java.lang.String s)`
`void` `setIndexType(IndexType index_type, java.util.Map<java.lang.String,java.lang.String> index_options)`
`void` `setValidator(AbstractType<?> validator)`
`void` `toSchema(RowMutation rm, java.lang.String cfName, AbstractType<?> comparator, long timestamp)`
`java.lang.String` `toString()`
`ColumnDef` `toThrift()`
`static ColumnDefinition` `utf8(java.lang.String name, java.lang.Integer cidx)`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### name

    public final java.nio.ByteBuffer name

### componentIndex

    public final java.lang.Integer componentIndex

Constructor Detail

### ColumnDefinition

    public ColumnDefinition(java.nio.ByteBuffer name,
                            AbstractType<?> validator,
                            IndexType index_type,
                            java.util.Map<java.lang.String,java.lang.String> index_options,
                            java.lang.String index_name,
                            java.lang.Integer componentIndex)

Method Detail

### ascii

    public static ColumnDefinition ascii(java.lang.String name,
                                         java.lang.Integer cidx)

### bool

    public static ColumnDefinition bool(java.lang.String name,
                                        java.lang.Integer cidx)

### utf8

    public static ColumnDefinition utf8(java.lang.String name,
                                        java.lang.Integer cidx)

### int32

    public static ColumnDefinition int32(java.lang.String name,
                                         java.lang.Integer cidx)

### double_

    public static ColumnDefinition double_(java.lang.String name,
                                           java.lang.Integer cidx)

### clone

    public ColumnDefinition clone()

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

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

### toThrift

    public ColumnDef toThrift()

### fromThrift

    public static ColumnDefinition fromThrift(ColumnDef thriftColumnDef)
                                       throws ConfigurationException

  Throws:
    `ConfigurationException`

### fromThrift

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

  Throws:
    `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 row,
                                                              CFMetaData cfm)

  Deserialize columns from low-level representation

  Parameters:
    `row` -
  Returns:
    Thrift-based deserialized representation of the column

### readSchema

    public static Row readSchema(java.lang.String ksName,
                                 java.lang.String cfName)

### toString

    public java.lang.String toString()

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

### getIndexName

    public java.lang.String getIndexName()

### setIndexName

    public void setIndexName(java.lang.String s)

### setIndexType

    public void setIndexType(IndexType index_type,
                             java.util.Map<java.lang.String,java.lang.String> index_options)

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

### getStringMap

    public static java.util.Map<java.lang.String,java.lang.String> getStringMap(java.util.Map<java.lang.CharSequence,java.lang.CharSequence> charMap)

Copyright © 2013 The Apache Software Foundation