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

Type Parameters:
C - Column name type
All Known Implementing Classes:
AbstractColumnImpl, EmptyColumn

public interface Column<C>

Common interface for extracting column values after a query.


Method Summary
 boolean getBooleanValue()
          Get value as a boolean
 byte[] getByteArrayValue()
          Get the raw byte[] value
 java.nio.ByteBuffer getByteBufferValue()
          Get the raw ByteBuffer value
 byte getByteValue()
          Return value as an integer
 java.lang.String getCompressedStringValue()
          Return a string that was stored as a compressed blob
 java.util.Date getDateValue()
          Get the value as a date object
 double getDoubleValue()
          Return value as a double
 float getFloatValue()
          Return value as a float
 int getIntegerValue()
          Return value as an integer
 long getLongValue()
          Return value as a long.
 C getName()
          Column or super column name
 java.nio.ByteBuffer getRawName()
          Return the raw byet buffer for the column name
 short getShortValue()
          Return value as an integer
 java.lang.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.
 int getTtl()
          Get the TTL for this column.
 java.util.UUID getUUIDValue()
          Get the value as a UUID
<V> V
getValue(Serializer<V> valSer)
          Return the value
 boolean hasValue()
          Determine whether the column has a value.
 boolean isParentColumn()
          Deprecated. Super columns should be replaced with composite columns
 

Method Detail

getName

C getName()
Column or super column name

Returns:

getRawName

java.nio.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

java.lang.String getStringValue()
Return value as a string

Returns:

getCompressedStringValue

java.lang.String getCompressedStringValue()
Return a string that was stored as a compressed blob

Returns:

getByteValue

byte getByteValue()
Return value as an integer

Returns:

getShortValue

short getShortValue()
Return value as an integer

Returns:

getIntegerValue

int getIntegerValue()
Return value as an integer

Returns:

getFloatValue

float getFloatValue()
Return value as a float

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

java.nio.ByteBuffer getByteBufferValue()
Get the raw ByteBuffer value

Returns:

getDateValue

java.util.Date getDateValue()
Get the value as a date object

Returns:

getUUIDValue

java.util.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:

getTtl

int getTtl()
Get the TTL for this column.

Returns:
TTL in seconds or 0 if no ttl was set

hasValue

boolean hasValue()
Determine whether the column has a value.

Returns:
True if column has a value or false if value is null or an empty byte array.