com.netflix.astyanax.model
Interface Column<C>

Type Parameters:
C - Column name type
All Known Implementing Classes:
EmptyColumn, ThriftColumnImpl, ThriftCounterColumnImpl, ThriftCounterSuperColumnImpl, ThriftSuperColumnImpl

public interface Column<C>

Common interface for extracting column values after a query.

Author:
elandau TODO Add getIntValue, getDoubleValue, ...

Method Summary
 boolean getBooleanValue()
          Get value as a boolean
 byte[] getByteArrayValue()
          Get the raw byte[] value
 ByteBuffer getByteBufferValue()
          Get the raw ByteBuffer value
 Date getDateValue()
          Get the value as a date object
 double getDoubleValue()
          Return value as a double
 int getIntegerValue()
          Return value as an integer
 long getLongValue()
          Return value as a long.
 C getName()
          Column or super column name
 ByteBuffer getRawName()
          Return the raw byet buffer for the column name
 String getStringValue()
          Return value as a string
<C2> ColumnList<C2>
getSubColumns(Serializer<C2> ser)
          Deprecated. Super columns should be replaced with composite columns
 long getTimestamp()
          Returns the column timestamp.
 UUID getUUIDValue()
          Get the value as a UUID
<V> V
getValue(Serializer<V> valSer)
          Return the value
 boolean isParentColumn()
          Deprecated. Super columns should be replaced with composite columns
 

Method Detail

getName

C getName()
Column or super column name

Returns:

getRawName

ByteBuffer getRawName()
Return the raw byet buffer for the column name

Returns:

getTimestamp

long getTimestamp()
Returns the column timestamp. Not to be confused with column values that happen to be time values.

Returns:

getValue

<V> V getValue(Serializer<V> valSer)
Return the value

Type Parameters:
V - value type
Returns:
Throws:
NetflixCassandraException

getStringValue

String getStringValue()
Return value as a string

Returns:

getIntegerValue

int getIntegerValue()
Return value as an integer

Returns:

getDoubleValue

double getDoubleValue()
Return value as a double

Returns:

getLongValue

long getLongValue()
Return value as a long. Use this to get the value of a counter column

Returns:

getByteArrayValue

byte[] getByteArrayValue()
Get the raw byte[] value

Returns:

getBooleanValue

boolean getBooleanValue()
Get value as a boolean

Returns:

getByteBufferValue

ByteBuffer getByteBufferValue()
Get the raw ByteBuffer value

Returns:

getDateValue

Date getDateValue()
Get the value as a date object

Returns:

getUUIDValue

UUID getUUIDValue()
Get the value as a UUID

Returns:

getSubColumns

@Deprecated
<C2> ColumnList<C2> getSubColumns(Serializer<C2> ser)
Deprecated. Super columns should be replaced with composite columns

Get columns in the case of a super column. Will throw an exception if this is a regular column Valid only if isCompositeColumn returns true

Type Parameters:
C2 - Type of column names for sub columns
Returns:

isParentColumn

@Deprecated
boolean isParentColumn()
Deprecated. Super columns should be replaced with composite columns

Returns true if the column contains a list of child columns, otherwise the column contains a value.

Returns:


Copyright © 2012. All Rights Reserved.