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

java.lang.Object
  extended by me.prettyprint.cassandra.model.AbstractBasicQuery<K,N,T>
      extended by me.prettyprint.cassandra.model.AbstractQuery<K,N,V,T>
          extended by me.prettyprint.cassandra.model.AbstractSliceQuery<K,N,V,ColumnSlice<N,V>>
              extended by me.prettyprint.cassandra.model.thrift.ThriftSliceQuery<K,N,V>
Type Parameters:
N -
V -
All Implemented Interfaces:
Query<ColumnSlice<N,V>>, SliceQuery<K,N,V>

public final class ThriftSliceQuery<K,N,V>
extends AbstractSliceQuery<K,N,V,ColumnSlice<N,V>>
implements SliceQuery<K,N,V>

A query for the thrift call get_slice

Author:
Ran Tavory

Field Summary
 
Fields inherited from class me.prettyprint.cassandra.model.AbstractSliceQuery
slicePredicate
 
Fields inherited from class me.prettyprint.cassandra.model.AbstractQuery
valueSerializer
 
Fields inherited from class me.prettyprint.cassandra.model.AbstractBasicQuery
columnFamilyName, columnNameSerializer, keySerializer, keyspace
 
Constructor Summary
ThriftSliceQuery(Keyspace k, Serializer<K> keySerializer, Serializer<N> nameSerializer, Serializer<V> valueSerializer)
           
 
Method Summary
 QueryResult<ColumnSlice<N,V>> execute()
           
 SliceQuery<K,N,V> setColumnFamily(String cf)
           
 SliceQuery<K,N,V> setColumnNames(N... columnNames)
          Sets the column names to be retrieved by this query
 SliceQuery<K,N,V> setKey(K key)
           
 SliceQuery<K,N,V> setRange(N start, N finish, boolean reversed, int count)
          Set a predicate of start/finish to retrieve a list of columns in this range.
 String toString()
           
 
Methods inherited from class me.prettyprint.cassandra.model.AbstractSliceQuery
getColumnNames, getPredicate, setColumnNames, setReturnKeysOnly, toStringInternal
 
Methods inherited from class me.prettyprint.cassandra.model.AbstractQuery
getValueSerializer, setValueSerializer
 
Methods inherited from class me.prettyprint.cassandra.model.AbstractBasicQuery
getColumnNameSerializer, getKeySerializer, setColumnNameSerializer, setKeySerializer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ThriftSliceQuery

public ThriftSliceQuery(Keyspace k,
                        Serializer<K> keySerializer,
                        Serializer<N> nameSerializer,
                        Serializer<V> valueSerializer)
Method Detail

setKey

public SliceQuery<K,N,V> setKey(K key)
Specified by:
setKey in interface SliceQuery<K,N,V>

execute

public QueryResult<ColumnSlice<N,V>> execute()
Specified by:
execute in interface Query<ColumnSlice<N,V>>

toString

public String toString()
Overrides:
toString in class Object

setColumnNames

public SliceQuery<K,N,V> setColumnNames(N... columnNames)
Description copied from class: AbstractSliceQuery
Sets the column names to be retrieved by this query

Specified by:
setColumnNames in interface SliceQuery<K,N,V>
Overrides:
setColumnNames in class AbstractSliceQuery<K,N,V,ColumnSlice<N,V>>

setRange

public SliceQuery<K,N,V> setRange(N start,
                                  N finish,
                                  boolean reversed,
                                  int count)
Description copied from class: AbstractSliceQuery
Set a predicate of start/finish to retrieve a list of columns in this range.

Specified by:
setRange in interface SliceQuery<K,N,V>
Overrides:
setRange in class AbstractSliceQuery<K,N,V,ColumnSlice<N,V>>
Parameters:
start - Start key
finish - End key

setColumnFamily

public SliceQuery<K,N,V> setColumnFamily(String cf)
Specified by:
setColumnFamily in interface SliceQuery<K,N,V>
Overrides:
setColumnFamily in class AbstractBasicQuery<K,N,ColumnSlice<N,V>>


Copyright © 2011. All Rights Reserved.