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

All Superinterfaces:
Iterable<Column<C>>
All Known Implementing Classes:
OrderedColumnMap

public interface ColumnMap<C>
extends Iterable<Column<C>>


Method Summary
 OrderedColumnMap<C> add(Column<C> column)
          Add a single column to the collection
 OrderedColumnMap<C> addAll(Collection<Column<C>> columns)
          Add a set of columns to the collection
 Map<C,Column<C>> asMap()
          Return the underlying map
 Column<C> get(C columnName)
          Queries column by name
 Boolean getBoolean(C columnName, Boolean defaultValue)
          Get value as a boolean
 byte[] getByteArray(C columnName, byte[] defaultValue)
          Get the raw byte[] value
 ByteBuffer getByteBuffer(C columnName, ByteBuffer defaultValue)
          Get the raw ByteBuffer value
 Date getDate(C columnName, Date defaultValue)
          Get the value as a date object
 Double getDouble(C columnName, Double defaultValue)
          Return value as a double
 Integer getInteger(C columnName, Integer defaultValue)
          Return value as an integer
 Long getLong(C columnName, Long defaultValue)
          Return value as a long.
 String getString(C columnName, String defaultValue)
          Return value as a string
 UUID getUUID(C columnName, UUID defaultValue)
          Get the value as a UUID
 boolean isEmpty()
          Indicates if the list of columns is empty
 int size()
          returns the number of columns in the row
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

asMap

Map<C,Column<C>> asMap()
Return the underlying map

Returns:

get

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

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

getString

String getString(C columnName,
                 String defaultValue)
Return value as a string

Returns:

getInteger

Integer getInteger(C columnName,
                   Integer defaultValue)
Return value as an integer

Returns:

getDouble

Double getDouble(C columnName,
                 Double defaultValue)
Return value as a double

Returns:

getLong

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

Returns:

getByteArray

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

Returns:

getBoolean

Boolean getBoolean(C columnName,
                   Boolean defaultValue)
Get value as a boolean

Returns:

getByteBuffer

ByteBuffer getByteBuffer(C columnName,
                         ByteBuffer defaultValue)
Get the raw ByteBuffer value

Returns:

getDate

Date getDate(C columnName,
             Date defaultValue)
Get the value as a date object

Returns:

getUUID

UUID getUUID(C columnName,
             UUID defaultValue)
Get the value as a UUID

Returns:

isEmpty

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

Returns:

size

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

Returns:

add

OrderedColumnMap<C> add(Column<C> column)
Add a single column to the collection

Parameters:
column -
Returns:

addAll

OrderedColumnMap<C> addAll(Collection<Column<C>> columns)
Add a set of columns to the collection

Parameters:
columns -
Returns:


Copyright © 2012. All Rights Reserved.