public interface

ColumnDefinition

com.netflix.astyanax.ddl.ColumnDefinition
Known Indirect Subclasses

Class Overview

Interface to get/set a single column definition. The column definition is only valid within the context of a ColumnFamilyDefinition

Summary

Public Methods
abstract String getIndexName()
Return the index name
abstract String getIndexType()
Return the index type.
abstract String getName()
Get the column name
abstract ByteBuffer getRawName()
Get the raw column name.
abstract String getValidationClass()
Return the value validation type.
abstract boolean hasIndex()
Returns true if there is an index on this column
abstract ColumnDefinition setIndex(String name, String type)
Sets an index on this column.
abstract ColumnDefinition setKeysIndex(String name)
Sets a keys index on this column
abstract ColumnDefinition setName(byte[] name)
Sets the column byte array name
abstract ColumnDefinition setName(String name)
Sets the column string name
abstract ColumnDefinition setName(ByteBuffer name)
Sets the column byte buffer name
abstract ColumnDefinition setValidationClass(String value)
Sets the validation class for the column values.

Public Methods

public abstract String getIndexName ()

Return the index name

public abstract String getIndexType ()

Return the index type. At the time of this writing only KEYS index is supported

public abstract String getName ()

Get the column name

public abstract ByteBuffer getRawName ()

Get the raw column name. In most cases the column name is a string but the actual column name is stored as a byte array

public abstract String getValidationClass ()

Return the value validation type. See ComparatorType for possible values.

public abstract boolean hasIndex ()

Returns true if there is an index on this column

public abstract ColumnDefinition setIndex (String name, String type)

Sets an index on this column.

Parameters
name Name of index
type "KEYS"

public abstract ColumnDefinition setKeysIndex (String name)

Sets a keys index on this column

public abstract ColumnDefinition setName (byte[] name)

Sets the column byte array name

public abstract ColumnDefinition setName (String name)

Sets the column string name

public abstract ColumnDefinition setName (ByteBuffer name)

Sets the column byte buffer name

public abstract ColumnDefinition setValidationClass (String value)

Sets the validation class for the column values. See ComparatorType for possible values. Setting the validation class here makes it possible to have different values types per column within the same column family.