|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object me.prettyprint.cassandra.model.HSlicePredicate<N>
public final class HSlicePredicate<N>
Hector's version of cassandra SlicePredicate
Nested Class Summary | |
---|---|
protected static class |
HSlicePredicate.PredicateType
|
Field Summary | |
---|---|
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 Summary | |
---|---|
HSlicePredicate(Serializer<N> columnNameSerializer)
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
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
Constructor Detail |
---|
public HSlicePredicate(Serializer<N> columnNameSerializer)
Method Detail |
---|
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.Range
public HSlicePredicate<N> setEndOn(N finish)
HSlicePredicate.PredicateType.Range
public HSlicePredicate<N> setCount(int count)
HSlicePredicate.PredicateType.Range
public HSlicePredicate<N> setReversed(boolean reversed)
HSlicePredicate.PredicateType.Range
public 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()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |