## org.apache.cassandra.thrift
Class ColumnOrSuperColumn

    java.lang.Object
      org.apache.cassandra.thrift.ColumnOrSuperColumn

All Implemented Interfaces:
  java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<ColumnOrSuperColumn>, org.apache.thrift.TBase<ColumnOrSuperColumn._Fields>

    public class ColumnOrSuperColumn

extends java.lang.Object
implements org.apache.thrift.TBase<ColumnOrSuperColumn._Fields>, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<ColumnOrSuperColumn>

Methods for fetching rows/records from Cassandra will return either a single instance of ColumnOrSuperColumn or a list of ColumnOrSuperColumns (get_slice()). If you're looking up a SuperColumn (or list of SuperColumns) then the resulting instances of ColumnOrSuperColumn will have the requested SuperColumn in the attribute super_column. For queries resulting in Columns, those values will be in the attribute column. This change was made between 0.3 and 0.4 to standardize on single query methods that may return either a SuperColumn or Column.

See Also:
  Serialized Form

Nested Class Summary
`static class` `ColumnOrSuperColumn._Fields` The set of fields this struct contains, along with convenience methods for finding and manipulating them.

Field Summary
`Column` `column`
`static java.util.Map<ColumnOrSuperColumn._Fields,org.apache.thrift.meta_data.FieldMetaData>` `metaDataMap`
`SuperColumn` `super_column`

Constructor Summary
`ColumnOrSuperColumn()`
`ColumnOrSuperColumn(ColumnOrSuperColumn other)` Performs a deep copy on other.

Method Summary
`ColumnOrSuperColumn` `clone()` Deprecated.
`int` `compareTo(ColumnOrSuperColumn other)`
`ColumnOrSuperColumn` `deepCopy()`
`boolean` `equals(ColumnOrSuperColumn that)`
`boolean` `equals(java.lang.Object that)`
`Column` `getColumn()`
`java.lang.Object` `getFieldValue(ColumnOrSuperColumn._Fields field)`
`java.lang.Object` `getFieldValue(int fieldId)`
`SuperColumn` `getSuper_column()`
`int` `hashCode()`
`boolean` `isSet(ColumnOrSuperColumn._Fields field)` Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
`boolean` `isSet(int fieldID)`
`boolean` `isSetColumn()` Returns true if field column is set (has been asigned a value) and false otherwise
`boolean` `isSetSuper_column()` Returns true if field super_column is set (has been asigned a value) and false otherwise
`void` `read(org.apache.thrift.protocol.TProtocol iprot)`
`ColumnOrSuperColumn` `setColumn(Column column)`
`void` `setColumnIsSet(boolean value)`
`void` `setFieldValue(ColumnOrSuperColumn._Fields field, java.lang.Object value)`
`void` `setFieldValue(int fieldID, java.lang.Object value)`
`ColumnOrSuperColumn` `setSuper_column(SuperColumn super_column)`
`void` `setSuper_columnIsSet(boolean value)`
`java.lang.String` `toString()`
`void` `unsetColumn()`
`void` `unsetSuper_column()`
`void` `validate()`
`void` `write(org.apache.thrift.protocol.TProtocol oprot)`

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

Field Detail

### column

    public Column column

### super_column

    public SuperColumn super_column

### metaDataMap

    public static final java.util.Map<ColumnOrSuperColumn._Fields,org.apache.thrift.meta_data.FieldMetaData> metaDataMap

Constructor Detail

### ColumnOrSuperColumn

    public ColumnOrSuperColumn()

### ColumnOrSuperColumn

    public ColumnOrSuperColumn(ColumnOrSuperColumn other)

  Performs a deep copy on other.

Method Detail

### deepCopy

    public ColumnOrSuperColumn deepCopy()

  Specified by:
    `deepCopy` in interface `org.apache.thrift.TBase<ColumnOrSuperColumn._Fields>`

### clone

    @Deprecated
    public ColumnOrSuperColumn clone()

  Deprecated.

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

### getColumn

    public Column getColumn()

### setColumn

    public ColumnOrSuperColumn setColumn(Column column)

### unsetColumn

    public void unsetColumn()

### isSetColumn

    public boolean isSetColumn()

  Returns true if field column is set (has been asigned a value) and false otherwise

### setColumnIsSet

    public void setColumnIsSet(boolean value)

### getSuper_column

    public SuperColumn getSuper_column()

### setSuper_column

    public ColumnOrSuperColumn setSuper_column(SuperColumn super_column)

### unsetSuper_column

    public void unsetSuper_column()

### isSetSuper_column

    public boolean isSetSuper_column()

  Returns true if field super_column is set (has been asigned a value) and false otherwise

### setSuper_columnIsSet

    public void setSuper_columnIsSet(boolean value)

### setFieldValue

    public void setFieldValue(ColumnOrSuperColumn._Fields field,
                              java.lang.Object value)

  Specified by:
    `setFieldValue` in interface `org.apache.thrift.TBase<ColumnOrSuperColumn._Fields>`

### setFieldValue

    public void setFieldValue(int fieldID,
                              java.lang.Object value)

  Specified by:
    `setFieldValue` in interface `org.apache.thrift.TBase<ColumnOrSuperColumn._Fields>`

### getFieldValue

    public java.lang.Object getFieldValue(ColumnOrSuperColumn._Fields field)

  Specified by:
    `getFieldValue` in interface `org.apache.thrift.TBase<ColumnOrSuperColumn._Fields>`

### getFieldValue

    public java.lang.Object getFieldValue(int fieldId)

  Specified by:
    `getFieldValue` in interface `org.apache.thrift.TBase<ColumnOrSuperColumn._Fields>`

### isSet

    public boolean isSet(ColumnOrSuperColumn._Fields field)

  Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise

  Specified by:
    `isSet` in interface `org.apache.thrift.TBase<ColumnOrSuperColumn._Fields>`

### isSet

    public boolean isSet(int fieldID)

  Specified by:
    `isSet` in interface `org.apache.thrift.TBase<ColumnOrSuperColumn._Fields>`

### equals

    public boolean equals(java.lang.Object that)

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

### equals

    public boolean equals(ColumnOrSuperColumn that)

### hashCode

    public int hashCode()

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

### compareTo

    public int compareTo(ColumnOrSuperColumn other)

  Specified by:
    `compareTo` in interface `java.lang.Comparable<ColumnOrSuperColumn>`

### read

    public void read(org.apache.thrift.protocol.TProtocol iprot)
              throws org.apache.thrift.TException

  Specified by:
    `read` in interface `org.apache.thrift.TBase<ColumnOrSuperColumn._Fields>`
  Throws:
    `org.apache.thrift.TException`

### write

    public void write(org.apache.thrift.protocol.TProtocol oprot)
               throws org.apache.thrift.TException

  Specified by:
    `write` in interface `org.apache.thrift.TBase<ColumnOrSuperColumn._Fields>`
  Throws:
    `org.apache.thrift.TException`

### toString

    public java.lang.String toString()

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

### validate

    public void validate()
                  throws org.apache.thrift.TException

  Throws:
    `org.apache.thrift.TException`

Copyright © 2010 The Apache Software Foundation