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

Type Parameters:
C - Data type for column names
All Superinterfaces:
java.lang.Iterable<Column<C>>
All Known Implementing Classes:
AbstractColumnList, EmptyColumnList

public interface ColumnList<C>
extends java.lang.Iterable<Column<C>>

Interface to a list of columns.


Method Summary
 java.lang.Boolean getBooleanValue(C columnName, java.lang.Boolean defaultValue)
          Get value as a boolean
 byte[] getByteArrayValue(C columnName, byte[] defaultValue)
          Get the raw byte[] value
 java.nio.ByteBuffer getByteBufferValue(C columnName, java.nio.ByteBuffer defaultValue)
          Get the raw ByteBuffer value
 Column<C> getColumnByIndex(int idx)
          Queries column by index
 Column<C> getColumnByName(C columnName)
          Queries column by name
 java.util.Collection<C> getColumnNames()
          Return the column names
 java.lang.String getCompressedStringValue(C columnName, java.lang.String defaultValue)
          Get a string that was stored as a compressed blob
 java.util.Date getDateValue(C columnName, java.util.Date defaultValue)
          Get the value as a date object
 java.lang.Double getDoubleValue(C columnName, java.lang.Double defaultValue)
          Return value as a double
 java.lang.Integer getIntegerValue(C columnName, java.lang.Integer defaultValue)
          Return value as an integer
 java.lang.Long getLongValue(C columnName, java.lang.Long defaultValue)
          Return value as a long.
 java.lang.String getStringValue(C columnName, java.lang.String defaultValue)
          Return value as a string
<C2> Column<C2>
getSuperColumn(C columnName, Serializer<C2> colSer)
          Deprecated. Super columns should be replaced with composite columns
<C2> Column<C2>
getSuperColumn(int idx, Serializer<C2> colSer)
          Deprecated. Super columns should be replaced with composite columns
 java.util.UUID getUUIDValue(C columnName, java.util.UUID defaultValue)
          Get the value as a UUID
<T> T
getValue(C columnName, Serializer<T> serializer, T defaultValue)
          Get a value with optional default using a specified serializer
 boolean isEmpty()
          Indicates if the list of columns is empty
 boolean isSuperColumn()
          Deprecated. Super columns should be replaced with composite columns
 int size()
          returns the number of columns in the row
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

getColumnNames

java.util.Collection<C> getColumnNames()
Return the column names


getColumnByName

Column<C> getColumnByName(C columnName)
Queries column by name

Parameters:
columnName -
Returns:
an instance of a column or null if not found
Throws:
java.lang.Exception

getStringValue

java.lang.String getStringValue(C columnName,
                                java.lang.String defaultValue)
Return value as a string

Returns:

getCompressedStringValue

java.lang.String getCompressedStringValue(C columnName,
                                          java.lang.String defaultValue)
Get a string that was stored as a compressed blob

Parameters:
columnName -
defaultValue -
Returns:

getIntegerValue

java.lang.Integer getIntegerValue(C columnName,
                                  java.lang.Integer defaultValue)
Return value as an integer

Returns:

getDoubleValue

java.lang.Double getDoubleValue(C columnName,
                                java.lang.Double defaultValue)
Return value as a double

Returns:

getLongValue

java.lang.Long getLongValue(C columnName,
                            java.lang.Long defaultValue)
Return value as a long. Use this to get the value of a counter column

Returns:

getByteArrayValue

byte[] getByteArrayValue(C columnName,
                         byte[] defaultValue)
Get the raw byte[] value

Returns:

getBooleanValue

java.lang.Boolean getBooleanValue(C columnName,
                                  java.lang.Boolean defaultValue)
Get value as a boolean

Returns:

getByteBufferValue

java.nio.ByteBuffer getByteBufferValue(C columnName,
                                       java.nio.ByteBuffer defaultValue)
Get the raw ByteBuffer value

Returns:

getValue

<T> T getValue(C columnName,
               Serializer<T> serializer,
               T defaultValue)
Get a value with optional default using a specified serializer

Type Parameters:
T -
Parameters:
columnName -
serializer -
defaultValue -
Returns:

getDateValue

java.util.Date getDateValue(C columnName,
                            java.util.Date defaultValue)
Get the value as a date object

Returns:

getUUIDValue

java.util.UUID getUUIDValue(C columnName,
                            java.util.UUID defaultValue)
Get the value as a UUID

Returns:

getColumnByIndex

Column<C> getColumnByIndex(int idx)
Queries column by index

Parameters:
idx -
Returns:
Throws:
NetflixCassandraException

getSuperColumn

<C2> Column<C2> getSuperColumn(C columnName,
                               Serializer<C2> colSer)
Deprecated. Super columns should be replaced with composite columns

Return the super column with the specified name

Type Parameters:
C2 -
Parameters:
columnName -
colSer -
Returns:
Throws:
NetflixCassandraException

getSuperColumn

<C2> Column<C2> getSuperColumn(int idx,
                               Serializer<C2> colSer)
Deprecated. Super columns should be replaced with composite columns

Get super column by index

Parameters:
idx -
Returns:
Throws:
NetflixCassandraException

isEmpty

boolean isEmpty()
Indicates if the list of columns is empty

Returns:

size

int size()
returns the number of columns in the row

Returns:

isSuperColumn

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

Returns true if the columns are super columns with subcolumns. If true then use getSuperColumn to call children. Otherwise call getColumnByIndex and getColumnByName to get the standard columns in the list.

Returns: