public class ColumnDefinition
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ColumnDefinition.Type |
Modifier and Type | Field and Description |
---|---|
java.lang.Integer |
componentIndex |
java.nio.ByteBuffer |
name |
ColumnDefinition.Type |
type |
Constructor and Description |
---|
ColumnDefinition(java.nio.ByteBuffer name,
AbstractType<?> validator,
org.apache.cassandra.thrift.IndexType index_type,
java.util.Map<java.lang.String,java.lang.String> index_options,
java.lang.String index_name,
java.lang.Integer componentIndex,
ColumnDefinition.Type type) |
ColumnDefinition(java.nio.ByteBuffer name,
AbstractType<?> validator,
java.lang.Integer componentIndex,
ColumnDefinition.Type type) |
Modifier and Type | Method and Description |
---|---|
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 row,
CFMetaData cfm)
Deserialize columns from low-level representation
|
static ColumnDefinition |
fromThrift(org.apache.cassandra.thrift.ColumnDef thriftColumnDef,
boolean isSuper) |
static java.util.Map<java.nio.ByteBuffer,ColumnDefinition> |
fromThrift(java.util.List<org.apache.cassandra.thrift.ColumnDef> thriftDefs,
boolean isSuper) |
java.lang.String |
getIndexName() |
java.util.Map<java.lang.String,java.lang.String> |
getIndexOptions() |
org.apache.cassandra.thrift.IndexType |
getIndexType() |
AbstractType<?> |
getValidator() |
int |
hashCode() |
boolean |
isIndexed() |
boolean |
isThriftCompatible() |
static ColumnDefinition |
partitionKeyDef(java.nio.ByteBuffer name,
AbstractType<?> validator,
java.lang.Integer componentIndex) |
static Row |
readSchema(java.lang.String ksName,
java.lang.String cfName) |
static ColumnDefinition |
regularDef(java.nio.ByteBuffer name,
AbstractType<?> validator,
java.lang.Integer componentIndex) |
ColumnDefinition |
setIndex(java.lang.String s,
org.apache.cassandra.thrift.IndexType index_type,
java.util.Map<java.lang.String,java.lang.String> index_options) |
ColumnDefinition |
setIndexName(java.lang.String s) |
ColumnDefinition |
setIndexType(org.apache.cassandra.thrift.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() |
org.apache.cassandra.thrift.ColumnDef |
toThrift() |
public final java.nio.ByteBuffer name
public final ColumnDefinition.Type type
public final java.lang.Integer componentIndex
public ColumnDefinition(java.nio.ByteBuffer name, AbstractType<?> validator, java.lang.Integer componentIndex, ColumnDefinition.Type type)
public ColumnDefinition(java.nio.ByteBuffer name, AbstractType<?> validator, org.apache.cassandra.thrift.IndexType index_type, java.util.Map<java.lang.String,java.lang.String> index_options, java.lang.String index_name, java.lang.Integer componentIndex, ColumnDefinition.Type type)
public static ColumnDefinition partitionKeyDef(java.nio.ByteBuffer name, AbstractType<?> validator, java.lang.Integer componentIndex)
public static ColumnDefinition clusteringKeyDef(java.nio.ByteBuffer name, AbstractType<?> validator, java.lang.Integer componentIndex)
public static ColumnDefinition regularDef(java.nio.ByteBuffer name, AbstractType<?> validator, java.lang.Integer componentIndex)
public static ColumnDefinition compactValueDef(java.nio.ByteBuffer name, AbstractType<?> validator)
public ColumnDefinition clone()
clone
in class java.lang.Object
public ColumnDefinition cloneWithNewName(java.nio.ByteBuffer newName)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean isThriftCompatible()
public org.apache.cassandra.thrift.ColumnDef toThrift()
public static ColumnDefinition fromThrift(org.apache.cassandra.thrift.ColumnDef thriftColumnDef, boolean isSuper) throws SyntaxException, ConfigurationException
public static java.util.Map<java.nio.ByteBuffer,ColumnDefinition> fromThrift(java.util.List<org.apache.cassandra.thrift.ColumnDef> thriftDefs, boolean isSuper) throws SyntaxException, ConfigurationException
public void deleteFromSchema(RowMutation rm, java.lang.String cfName, AbstractType<?> comparator, long timestamp)
rm
- The schema row mutationcfName
- The name of the parent ColumnFamilytimestamp
- The timestamp to use for column modificationpublic void toSchema(RowMutation rm, java.lang.String cfName, AbstractType<?> comparator, long timestamp)
public void apply(ColumnDefinition def, AbstractType<?> comparator) throws ConfigurationException
ConfigurationException
public static java.util.List<ColumnDefinition> fromSchema(Row row, CFMetaData cfm)
row
- public static Row readSchema(java.lang.String ksName, java.lang.String cfName)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getIndexName()
public ColumnDefinition setIndexName(java.lang.String s)
public ColumnDefinition setIndexType(org.apache.cassandra.thrift.IndexType index_type, java.util.Map<java.lang.String,java.lang.String> index_options)
public ColumnDefinition setIndex(java.lang.String s, org.apache.cassandra.thrift.IndexType index_type, java.util.Map<java.lang.String,java.lang.String> index_options)
public boolean isIndexed()
public org.apache.cassandra.thrift.IndexType getIndexType()
public java.util.Map<java.lang.String,java.lang.String> getIndexOptions()
public AbstractType<?> getValidator()
public void setValidator(AbstractType<?> validator)
Copyright © 2013 The Apache Software Foundation