com.netflix.astyanax.ddl
Interface ColumnDefinition

All Known Implementing Classes:
ThriftColumnDefinitionImpl

public interface ColumnDefinition

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

Author:
elandau

Method Summary
 String getIndexName()
          Return the index name
 String getIndexType()
          Return the index type.
 String getName()
          Get the column name
 ByteBuffer getRawName()
          Get the raw column name.
 String getValidationClass()
          Return the value validation type.
 boolean hasIndex()
          Returns true if there is an index on this column
 ColumnDefinition setIndex(String name, String type)
          Sets an index on this column.
 ColumnDefinition setKeysIndex(String name)
          Sets a keys index on this column
 ColumnDefinition setName(String name)
          Sets the column name
 ColumnDefinition setValidationClass(String value)
          Sets the validation class for the column values.
 

Method Detail

setName

ColumnDefinition setName(String name)
Sets the column name

Parameters:
name -
Returns:

setValidationClass

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.

Parameters:
value -
Returns:

setIndex

ColumnDefinition setIndex(String name,
                          String type)
Sets an index on this column.

Parameters:
name - Name of index
type - "KEYS"
Returns:

setKeysIndex

ColumnDefinition setKeysIndex(String name)
Sets a keys index on this column

Parameters:
name -
Returns:

getName

String getName()
Get the column name

Returns:

getRawName

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

Returns:

getValidationClass

String getValidationClass()
Return the value validation type. See ComparatorType for possible values.

Returns:

getIndexName

String getIndexName()
Return the index name

Returns:

getIndexType

String getIndexType()
Return the index type. At the time of this writing only KEYS index is supported

Returns:

hasIndex

boolean hasIndex()
Returns true if there is an index on this column

Returns:


Copyright © 2012. All Rights Reserved.