me.prettyprint.cassandra.model
Class CqlRows<K,N,V>

java.lang.Object
  extended by me.prettyprint.cassandra.model.RowsImpl<K,N,V>
      extended by me.prettyprint.cassandra.model.OrderedRowsImpl<K,N,V>
          extended by me.prettyprint.cassandra.model.CqlRows<K,N,V>
All Implemented Interfaces:
Iterable<Row<K,N,V>>, OrderedRows<K,N,V>, Rows<K,N,V>

public final class CqlRows<K,N,V>
extends OrderedRowsImpl<K,N,V>

Row wrapper specific to the multi-type results capable from a CqlQuery. This is a bit more convoluted than I would like, put most of this API is still moving around, so we will stick with the overloading for now.

Author:
zznate

Field Summary
 
Fields inherited from class me.prettyprint.cassandra.model.OrderedRowsImpl
rowsList
 
Fields inherited from class me.prettyprint.cassandra.model.RowsImpl
rows
 
Constructor Summary
CqlRows()
          Constructed as empty for CqlResultType.VOID
CqlRows(LinkedHashMap<K,List<org.apache.cassandra.thrift.Column>> thriftRet, Serializer<N> nameSerializer, Serializer<V> valueSerializer)
          Constructed for CqlResultType.ROWS
 
Method Summary
 int getAsCount()
          Will throw an IllegalArgumentException if called on a query that was not CqlResultType.INT
 
Methods inherited from class me.prettyprint.cassandra.model.OrderedRowsImpl
getList, peekLast
 
Methods inherited from class me.prettyprint.cassandra.model.RowsImpl
getByKey, getCount, iterator, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface me.prettyprint.hector.api.beans.Rows
getByKey, getCount
 
Methods inherited from interface java.lang.Iterable
iterator
 

Constructor Detail

CqlRows

public CqlRows(LinkedHashMap<K,List<org.apache.cassandra.thrift.Column>> thriftRet,
               Serializer<N> nameSerializer,
               Serializer<V> valueSerializer)
Constructed for CqlResultType.ROWS

Parameters:
thriftRet -
nameSerializer -
valueSerializer -
resultType -

CqlRows

public CqlRows()
Constructed as empty for CqlResultType.VOID

Method Detail

getAsCount

public int getAsCount()
Will throw an IllegalArgumentException if called on a query that was not CqlResultType.INT

Returns:


Copyright © 2011. All Rights Reserved.