com.netflix.astyanax.model
Class OrderedColumnMap<C>

java.lang.Object
  extended by com.netflix.astyanax.model.OrderedColumnMap<C>
All Implemented Interfaces:
ColumnMap<C>, Iterable<Column<C>>

public class OrderedColumnMap<C>
extends Object
implements ColumnMap<C>


Constructor Summary
OrderedColumnMap()
           
OrderedColumnMap(Collection<Column<C>> columns)
           
 
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
 Iterator<Column<C>> iterator()
           
 int size()
          returns the number of columns in the row
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrderedColumnMap

public OrderedColumnMap()

OrderedColumnMap

public OrderedColumnMap(Collection<Column<C>> columns)
Method Detail

add

public OrderedColumnMap<C> add(Column<C> column)
Description copied from interface: ColumnMap
Add a single column to the collection

Specified by:
add in interface ColumnMap<C>
Returns:

addAll

public OrderedColumnMap<C> addAll(Collection<Column<C>> columns)
Description copied from interface: ColumnMap
Add a set of columns to the collection

Specified by:
addAll in interface ColumnMap<C>
Returns:

iterator

public Iterator<Column<C>> iterator()
Specified by:
iterator in interface Iterable<Column<C>>

get

public Column<C> get(C columnName)
Description copied from interface: ColumnMap
Queries column by name

Specified by:
get in interface ColumnMap<C>
Returns:
an instance of a column or null if not found

getString

public String getString(C columnName,
                        String defaultValue)
Description copied from interface: ColumnMap
Return value as a string

Specified by:
getString in interface ColumnMap<C>
Returns:

getInteger

public Integer getInteger(C columnName,
                          Integer defaultValue)
Description copied from interface: ColumnMap
Return value as an integer

Specified by:
getInteger in interface ColumnMap<C>
Returns:

getDouble

public Double getDouble(C columnName,
                        Double defaultValue)
Description copied from interface: ColumnMap
Return value as a double

Specified by:
getDouble in interface ColumnMap<C>
Returns:

getLong

public Long getLong(C columnName,
                    Long defaultValue)
Description copied from interface: ColumnMap
Return value as a long. Use this to get the value of a counter column

Specified by:
getLong in interface ColumnMap<C>
Returns:

getByteArray

public byte[] getByteArray(C columnName,
                           byte[] defaultValue)
Description copied from interface: ColumnMap
Get the raw byte[] value

Specified by:
getByteArray in interface ColumnMap<C>
Returns:

getBoolean

public Boolean getBoolean(C columnName,
                          Boolean defaultValue)
Description copied from interface: ColumnMap
Get value as a boolean

Specified by:
getBoolean in interface ColumnMap<C>
Returns:

getByteBuffer

public ByteBuffer getByteBuffer(C columnName,
                                ByteBuffer defaultValue)
Description copied from interface: ColumnMap
Get the raw ByteBuffer value

Specified by:
getByteBuffer in interface ColumnMap<C>
Returns:

getDate

public Date getDate(C columnName,
                    Date defaultValue)
Description copied from interface: ColumnMap
Get the value as a date object

Specified by:
getDate in interface ColumnMap<C>
Returns:

getUUID

public UUID getUUID(C columnName,
                    UUID defaultValue)
Description copied from interface: ColumnMap
Get the value as a UUID

Specified by:
getUUID in interface ColumnMap<C>
Returns:

isEmpty

public boolean isEmpty()
Description copied from interface: ColumnMap
Indicates if the list of columns is empty

Specified by:
isEmpty in interface ColumnMap<C>
Returns:

size

public int size()
Description copied from interface: ColumnMap
returns the number of columns in the row

Specified by:
size in interface ColumnMap<C>
Returns:

asMap

public Map<C,Column<C>> asMap()
Description copied from interface: ColumnMap
Return the underlying map

Specified by:
asMap in interface ColumnMap<C>
Returns:


Copyright © 2012. All Rights Reserved.