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,ColumnOrSuperColumn._Fields>

    public class ColumnOrSuperColumn
    extends java.lang.Object
    implements org.apache.thrift.TBase<ColumnOrSuperColumn,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. If the query was on a counter column family, you will either get a counter_column (instead of a column) or a counter_super_column (instead of a super_column)

See Also:
  Serialized Form

### Nested Class Summary

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

### Field Summary

Fields
`Column` `column`
`CounterColumn` `counter_column`
`CounterSuperColumn` `counter_super_column`
`static java.util.Map<ColumnOrSuperColumn._Fields,org.apache.thrift.meta_data.FieldMetaData>` `metaDataMap`
`SuperColumn` `super_column`

### Constructor Summary

Constructors
Constructor and Description
`ColumnOrSuperColumn()`
`ColumnOrSuperColumn(ColumnOrSuperColumn other)` Performs a deep copy on other.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `clear()`
`int` `compareTo(ColumnOrSuperColumn other)`
`ColumnOrSuperColumn` `deepCopy()`
`boolean` `equals(ColumnOrSuperColumn that)`
`boolean` `equals(java.lang.Object that)`
`ColumnOrSuperColumn._Fields` `fieldForId(int fieldId)`
`Column` `getColumn()`
`CounterColumn` `getCounter_column()`
`CounterSuperColumn` `getCounter_super_column()`
`java.lang.Object` `getFieldValue(ColumnOrSuperColumn._Fields field)`
`SuperColumn` `getSuper_column()`
`int` `hashCode()`
`boolean` `isSet(ColumnOrSuperColumn._Fields field)` Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise
`boolean` `isSetColumn()` Returns true if field column is set (has been assigned a value) and false otherwise
`boolean` `isSetCounter_column()` Returns true if field counter_column is set (has been assigned a value) and false otherwise
`boolean` `isSetCounter_super_column()` Returns true if field counter_super_column is set (has been assigned a value) and false otherwise
`boolean` `isSetSuper_column()` Returns true if field super_column is set (has been assigned a value) and false otherwise
`void` `read(org.apache.thrift.protocol.TProtocol iprot)`
`ColumnOrSuperColumn` `setColumn(Column column)`
`void` `setColumnIsSet(boolean value)`
`ColumnOrSuperColumn` `setCounter_column(CounterColumn counter_column)`
`void` `setCounter_columnIsSet(boolean value)`
`ColumnOrSuperColumn` `setCounter_super_column(CounterSuperColumn counter_super_column)`
`void` `setCounter_super_columnIsSet(boolean value)`
`void` `setFieldValue(ColumnOrSuperColumn._Fields field, java.lang.Object value)`
`ColumnOrSuperColumn` `setSuper_column(SuperColumn super_column)`
`void` `setSuper_columnIsSet(boolean value)`
`java.lang.String` `toString()`
`void` `unsetColumn()`
`void` `unsetCounter_column()`
`void` `unsetCounter_super_column()`
`void` `unsetSuper_column()`
`void` `validate()`
`void` `write(org.apache.thrift.protocol.TProtocol oprot)`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Field Detail

#### column

    public Column column

#### super_column

    public SuperColumn super_column

#### counter_column

    public CounterColumn counter_column

#### counter_super_column

    public CounterSuperColumn counter_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,ColumnOrSuperColumn._Fields>`

#### clear

    public void clear()

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

#### 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 assigned 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 assigned a value) and false otherwise

#### setSuper_columnIsSet

    public void setSuper_columnIsSet(boolean value)

#### getCounter_column

    public CounterColumn getCounter_column()

#### setCounter_column

    public ColumnOrSuperColumn setCounter_column(CounterColumn counter_column)

#### unsetCounter_column

    public void unsetCounter_column()

#### isSetCounter_column

    public boolean isSetCounter_column()

Returns true if field counter_column is set (has been assigned a value) and false otherwise

#### setCounter_columnIsSet

    public void setCounter_columnIsSet(boolean value)

#### getCounter_super_column

    public CounterSuperColumn getCounter_super_column()

#### setCounter_super_column

    public ColumnOrSuperColumn setCounter_super_column(CounterSuperColumn counter_super_column)

#### unsetCounter_super_column

    public void unsetCounter_super_column()

#### isSetCounter_super_column

    public boolean isSetCounter_super_column()

Returns true if field counter_super_column is set (has been assigned a value) and false otherwise

#### setCounter_super_columnIsSet

    public void setCounter_super_columnIsSet(boolean value)

#### setFieldValue

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

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

#### getFieldValue

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

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

#### isSet

    public boolean isSet(ColumnOrSuperColumn._Fields field)

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

Specified by:
  `isSet` in interface `org.apache.thrift.TBase<ColumnOrSuperColumn,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>`

#### fieldForId

    public ColumnOrSuperColumn._Fields fieldForId(int fieldId)

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

#### 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,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,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`