public final class HSlicePredicate<N> extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
HSlicePredicate.PredicateType |
| Modifier and Type | Field and Description |
|---|---|
protected Collection<N> |
columnNames |
protected Serializer<N> |
columnNameSerializer |
protected int |
count |
protected N |
finish |
protected HSlicePredicate.PredicateType |
predicateType |
protected boolean |
reversed |
protected N |
start |
| Constructor and Description |
|---|
HSlicePredicate(Serializer<N> columnNameSerializer) |
| Modifier and Type | Method and Description |
|---|---|
HSlicePredicate<N> |
addColumnName(N columnName) |
Collection<N> |
getColumnNames() |
HSlicePredicate<N> |
setColumnNames(Collection<N> columnNames)
Same as varargs signature, except we take a collection
|
HSlicePredicate<N> |
setColumnNames(N... columnNames)
Sets the column names to be retrieved by this query
|
HSlicePredicate<N> |
setCount(int count)
Set the number of columns to return for this slice
Switches to
HSlicePredicate.PredicateType.Range |
HSlicePredicate<N> |
setEndOn(N finish)
Set the columnName on which we will end.
|
HSlicePredicate<N> |
setKeysOnlyPredicate()
Allows the use of returning just the keys.
|
HSlicePredicate<N> |
setRange(N start,
N finish,
boolean reversed,
int count)
Set a predicate of start/finish to retrieve a list of columns in this range.
|
HSlicePredicate<N> |
setReversed(boolean reversed)
Sets the return order of the columns to be reversed.
|
HSlicePredicate<N> |
setStartOn(N start)
Set the columnName on which we will start.
|
String |
toString() |
org.apache.cassandra.thrift.SlicePredicate |
toThrift()
Will throw a runtime exception if neither columnsNames nor count were set.
|
protected Collection<N> columnNames
protected N start
protected N finish
protected boolean reversed
protected int count
protected final Serializer<N> columnNameSerializer
protected HSlicePredicate.PredicateType predicateType
public HSlicePredicate(Serializer<N> columnNameSerializer)
public HSlicePredicate<N> setColumnNames(N... columnNames)
columns - a list of column namespublic HSlicePredicate<N> addColumnName(N columnName)
public HSlicePredicate<N> setColumnNames(Collection<N> columnNames)
columns - a list of column namespublic HSlicePredicate<N> setKeysOnlyPredicate()
public HSlicePredicate<N> setStartOn(N start)
HSlicePredicate.PredicateType.Rangepublic HSlicePredicate<N> setEndOn(N finish)
HSlicePredicate.PredicateType.Rangepublic HSlicePredicate<N> setCount(int count)
HSlicePredicate.PredicateType.Rangepublic HSlicePredicate<N> setReversed(boolean reversed)
HSlicePredicate.PredicateType.Rangepublic HSlicePredicate<N> setRange(N start, N finish, boolean reversed, int count)
start - Start keyfinish - End keyreversed - count - public Collection<N> getColumnNames()
public org.apache.cassandra.thrift.SlicePredicate toThrift()
Copyright © 2014. All Rights Reserved.