public static class TokenRestriction.SliceRestriction extends TokenRestriction
TokenRestriction.EQRestriction, TokenRestriction.SliceRestriction
Modifier and Type | Field and Description |
---|---|
protected ClusteringComparator |
comparator
The composite type.
|
columnDefs
Constructor and Description |
---|
SliceRestriction(CFMetaData cfm,
java.util.List<ColumnDefinition> columnDefs,
Bound bound,
boolean inclusive,
Term term) |
Modifier and Type | Method and Description |
---|---|
void |
addFunctionsTo(java.util.List<Function> functions)
Adds all functions (native and user-defined) used by any component of the restriction
to the specified list.
|
MultiCBuilder |
appendBoundTo(MultiCBuilder builder,
Bound bound,
QueryOptions options)
Appends the values of the
Restriction for the specified bound to the specified builder. |
java.util.List<java.nio.ByteBuffer> |
bounds(Bound b,
QueryOptions options) |
protected org.apache.cassandra.cql3.restrictions.PrimaryKeyRestrictions |
doMergeWith(TokenRestriction otherRestriction)
Merges this restriction with the specified
TokenRestriction . |
boolean |
hasBound(Bound b)
Checks if the specified bound is set or not.
|
boolean |
isContains() |
boolean |
isEmpty()
Checks if this
PrimaryKeyRestrictionSet is empty or not. |
boolean |
isEQ() |
boolean |
isIN() |
boolean |
isInclusive(Bound b)
Checks if the specified bound is inclusive or not.
|
boolean |
isMultiColumn() |
boolean |
isNotNull() |
boolean |
isSlice() |
protected static Bound |
reverseBoundIfNeeded(ColumnDefinition columnDefinition,
Bound bound)
Reverses the specified bound if the column type is a reversed one.
|
int |
size()
Returns the number of columns that have a restriction.
|
java.lang.String |
toString() |
java.util.List<java.nio.ByteBuffer> |
values(QueryOptions options) |
addRowFilterTo, appendTo, boundsAsClustering, getColumnDefs, getColumnNamesAsString, getFirstColumn, getLastColumn, hasSupportingIndex, isOnToken, mergeWith, valuesAsClustering
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
appendBoundTo, isContains, isEQ, isIN, isMultiColumn, isNotNull
protected final ClusteringComparator comparator
public SliceRestriction(CFMetaData cfm, java.util.List<ColumnDefinition> columnDefs, Bound bound, boolean inclusive, Term term)
public boolean isSlice()
isSlice
in interface Restriction
public java.util.List<java.nio.ByteBuffer> values(QueryOptions options) throws InvalidRequestException
InvalidRequestException
public boolean hasBound(Bound b)
Restriction
hasBound
in interface Restriction
b
- the bound typetrue
if the specified bound is set, false
otherwisepublic java.util.List<java.nio.ByteBuffer> bounds(Bound b, QueryOptions options) throws InvalidRequestException
InvalidRequestException
public void addFunctionsTo(java.util.List<Function> functions)
Restriction
functions
- the list to add topublic boolean isInclusive(Bound b)
Restriction
isInclusive
in interface Restriction
b
- the bound typetrue
if the specified bound is inclusive, false
otherwiseprotected org.apache.cassandra.cql3.restrictions.PrimaryKeyRestrictions doMergeWith(TokenRestriction otherRestriction) throws InvalidRequestException
TokenRestriction
TokenRestriction
.doMergeWith
in class TokenRestriction
otherRestriction
- the TokenRestriction
to merge with.InvalidRequestException
public java.lang.String toString()
toString
in class java.lang.Object
public final boolean isEmpty()
PrimaryKeyRestrictionSet
is empty or not.true
if this PrimaryKeyRestrictionSet
is empty, false
otherwise.public final int size()
public boolean isMultiColumn()
isMultiColumn
in interface Restriction
public boolean isEQ()
isEQ
in interface Restriction
public boolean isIN()
isIN
in interface Restriction
public boolean isContains()
isContains
in interface Restriction
public boolean isNotNull()
isNotNull
in interface Restriction
public MultiCBuilder appendBoundTo(MultiCBuilder builder, Bound bound, QueryOptions options)
Restriction
Restriction
for the specified bound to the specified builder.appendBoundTo
in interface Restriction
builder
- the MultiCBuilder
to append to.bound
- the boundoptions
- the query optionsMultiCBuilder
protected static Bound reverseBoundIfNeeded(ColumnDefinition columnDefinition, Bound bound)
columnDefinition
- the column definitionbound
- the boundCopyright © 2017 The Apache Software Foundation