me.prettyprint.cassandra.model
Class AbstractSliceQuery<K,N,V,T>
java.lang.Object
me.prettyprint.cassandra.model.AbstractBasicQuery<K,N,T>
me.prettyprint.cassandra.model.AbstractQuery<K,N,V,T>
me.prettyprint.cassandra.model.AbstractSliceQuery<K,N,V,T>
- Type Parameters:
N
- T
-
- All Implemented Interfaces:
- Query<T>
- Direct Known Subclasses:
- IndexedSlicesQuery, ThriftMultigetSliceCounterQuery, ThriftMultigetSliceQuery, ThriftMultigetSubSliceQuery, ThriftMultigetSuperSliceCounterQuery, ThriftMultigetSuperSliceQuery, ThriftRangeSlicesCounterQuery, ThriftRangeSlicesQuery, ThriftRangeSubSlicesQuery, ThriftRangeSuperSlicesCounterQuery, ThriftRangeSuperSlicesQuery, ThriftSliceCounterQuery, ThriftSliceQuery, ThriftSubSliceQuery, ThriftSuperSliceCounterQuery, ThriftSuperSliceQuery
public abstract class AbstractSliceQuery<K,N,V,T>
- extends AbstractQuery<K,N,V,T>
- implements Query<T>
Base type for SliceQuery, RangeSliceQuery and MultigetSliceQuery
- Author:
- Ran Tavory
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface me.prettyprint.hector.api.query.Query |
execute |
slicePredicate
protected final HSlicePredicate<N> slicePredicate
AbstractSliceQuery
public AbstractSliceQuery(Keyspace k,
Serializer<K> keySerializer,
Serializer<N> nameSerializer,
Serializer<V> valueSerializer)
setColumnNames
public Query<T> setColumnNames(N... columnNames)
- Sets the column names to be retrieved by this query
- Parameters:
columns
- a varargs of column names
setColumnNames
public Query<T> setColumnNames(Collection<N> columnNames)
- Sets the column names to be retrieved by this query
- Parameters:
columns
- a Collection of column names
setReturnKeysOnly
public AbstractSliceQuery<K,N,V,T> setReturnKeysOnly()
- Wraps the underlying call to
HSlicePredicate.setKeysOnlyPredicate()
Use this for a substantial performance increase when you only need the keys returned
getColumnNames
public Collection<N> getColumnNames()
setRange
public Query<T> setRange(N start,
N finish,
boolean reversed,
int count)
- Set a predicate of start/finish to retrieve a list of columns in this range.
- Parameters:
start
- Start keyfinish
- End keyreversed
- count
-
- Returns:
getPredicate
public org.apache.cassandra.thrift.SlicePredicate getPredicate()
- Returns:
- the thrift representation of the predicate
toStringInternal
protected String toStringInternal()
Copyright © 2011. All Rights Reserved.