com.netflix.astyanax.thrift.ddl
Class ThriftColumnDefinitionImpl

java.lang.Object
  extended by com.netflix.astyanax.thrift.ddl.ThriftColumnDefinitionImpl
All Implemented Interfaces:
ColumnDefinition

public class ThriftColumnDefinitionImpl
extends Object
implements ColumnDefinition


Constructor Summary
ThriftColumnDefinitionImpl()
           
ThriftColumnDefinitionImpl(org.apache.cassandra.thrift.ColumnDef columnDef)
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThriftColumnDefinitionImpl

public ThriftColumnDefinitionImpl()

ThriftColumnDefinitionImpl

public ThriftColumnDefinitionImpl(org.apache.cassandra.thrift.ColumnDef columnDef)
Method Detail

setName

public ColumnDefinition setName(String name)
Description copied from interface: ColumnDefinition
Sets the column name

Specified by:
setName in interface ColumnDefinition
Returns:

setValidationClass

public ColumnDefinition setValidationClass(String value)
Description copied from interface: ColumnDefinition
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.

Specified by:
setValidationClass in interface ColumnDefinition
Returns:

getName

public String getName()
Description copied from interface: ColumnDefinition
Get the column name

Specified by:
getName in interface ColumnDefinition
Returns:

getValidationClass

public String getValidationClass()
Description copied from interface: ColumnDefinition
Return the value validation type. See ComparatorType for possible values.

Specified by:
getValidationClass in interface ColumnDefinition
Returns:

getRawName

public ByteBuffer getRawName()
Description copied from interface: ColumnDefinition
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

Specified by:
getRawName in interface ColumnDefinition
Returns:

getIndexName

public String getIndexName()
Description copied from interface: ColumnDefinition
Return the index name

Specified by:
getIndexName in interface ColumnDefinition
Returns:

getIndexType

public String getIndexType()
Description copied from interface: ColumnDefinition
Return the index type. At the time of this writing only KEYS index is supported

Specified by:
getIndexType in interface ColumnDefinition
Returns:

hasIndex

public boolean hasIndex()
Description copied from interface: ColumnDefinition
Returns true if there is an index on this column

Specified by:
hasIndex in interface ColumnDefinition
Returns:

setIndex

public ColumnDefinition setIndex(String name,
                                 String type)
Description copied from interface: ColumnDefinition
Sets an index on this column.

Specified by:
setIndex in interface ColumnDefinition
Parameters:
name - Name of index
type - "KEYS"
Returns:

setKeysIndex

public ColumnDefinition setKeysIndex(String name)
Description copied from interface: ColumnDefinition
Sets a keys index on this column

Specified by:
setKeysIndex in interface ColumnDefinition
Returns:


Copyright © 2012. All Rights Reserved.