public static class MultiColumnRestriction.Slice extends MultiColumnRestriction
MultiColumnRestriction.EQ, MultiColumnRestriction.IN, MultiColumnRestriction.InWithMarker, MultiColumnRestriction.InWithValues, MultiColumnRestriction.Slice
columnDefs
Constructor and Description |
---|
Slice(java.util.List<ColumnDefinition> columnDefs,
Bound bound,
boolean inclusive,
Term term) |
Modifier and Type | Method and Description |
---|---|
void |
addIndexExpressionTo(java.util.List<IndexExpression> expressions,
SecondaryIndexManager indexManager,
QueryOptions options)
Adds to the specified list the
IndexExpression s corresponding to this Restriction . |
CompositesBuilder |
appendBoundTo(CFMetaData cfm,
CompositesBuilder builder,
Bound bound,
QueryOptions options)
Appends the values of the
Restriction for the specified bound to the specified builder. |
CompositesBuilder |
appendTo(CFMetaData cfm,
CompositesBuilder builder,
QueryOptions options)
Appends the values of this
Restriction to the specified builder. |
Restriction |
doMergeWith(Restriction otherRestriction) |
java.lang.Iterable<Function> |
getFunctions()
Return an Iterable over all of the functions (both native and user-defined) used by any component
of the restriction
|
boolean |
hasBound(Bound bound)
Checks if the specified bound is set or not.
|
boolean |
isContains() |
boolean |
isEQ() |
boolean |
isIN() |
boolean |
isInclusive(Bound bound)
Checks if the specified bound is inclusive or not.
|
boolean |
isNotReturningAnyRows(CFMetaData cfm,
QueryOptions options)
Checks if this restriction will prevent the query to return any rows.
|
boolean |
isOnToken() |
boolean |
isSlice() |
protected boolean |
isSupportedBy(SecondaryIndex index)
Check if this type of restriction is supported for by the specified index.
|
protected static Bound |
reverseBoundIfNeeded(ColumnDefinition columnDefinition,
Bound bound)
Reverses the specified bound if the column type is a reversed one.
|
java.lang.String |
toString() |
protected static java.nio.ByteBuffer |
validateIndexedValue(ColumnSpecification columnSpec,
java.nio.ByteBuffer value) |
getColumnDefs, getColumnsInCommons, getFirstColumn, getLastColumn, hasSupportingIndex, isMultiColumn, mergeWith
public Slice(java.util.List<ColumnDefinition> columnDefs, Bound bound, boolean inclusive, Term term)
public boolean isSlice()
isSlice
in interface Restriction
public CompositesBuilder appendTo(CFMetaData cfm, CompositesBuilder builder, QueryOptions options)
Restriction
Restriction
to the specified builder.cfm
- the table metadatabuilder
- the CompositesBuilder
to append to.options
- the query optionsCompositesBuilder
public CompositesBuilder appendBoundTo(CFMetaData cfm, CompositesBuilder builder, Bound bound, QueryOptions options)
Restriction
Restriction
for the specified bound to the specified builder.appendBoundTo
in interface Restriction
cfm
- the table metadatabuilder
- the CompositesBuilder
to append to.bound
- the boundoptions
- the query optionsCompositesBuilder
protected boolean isSupportedBy(SecondaryIndex index)
MultiColumnRestriction
isSupportedBy
in class MultiColumnRestriction
index
- the Secondary indextrue
this type of restriction is supported by the specified index,
false
otherwise.public boolean hasBound(Bound bound)
Restriction
hasBound
in interface Restriction
bound
- the bound typetrue
if the specified bound is set, false
otherwisepublic java.lang.Iterable<Function> getFunctions()
Restriction
public boolean isInclusive(Bound bound)
Restriction
isInclusive
in interface Restriction
bound
- the bound typetrue
if the specified bound is inclusive, false
otherwisepublic Restriction doMergeWith(Restriction otherRestriction) throws InvalidRequestException
doMergeWith
in class MultiColumnRestriction
InvalidRequestException
public final void addIndexExpressionTo(java.util.List<IndexExpression> expressions, SecondaryIndexManager indexManager, QueryOptions options) throws InvalidRequestException
Restriction
IndexExpression
s corresponding to this Restriction
.expressions
- the list to add the IndexExpression
s toindexManager
- the secondary index manageroptions
- the query optionsInvalidRequestException
- if this Restriction
cannot be converted into
IndexExpression
spublic java.lang.String toString()
toString
in class java.lang.Object
public boolean isNotReturningAnyRows(CFMetaData cfm, QueryOptions options)
Restriction
isNotReturningAnyRows
in interface Restriction
cfm
- the table metadataoptions
- the query optionstrue
if this restriction will prevent the query to return any rows, otherwisepublic boolean isOnToken()
isOnToken
in interface Restriction
public boolean isEQ()
isEQ
in interface Restriction
public boolean isIN()
isIN
in interface Restriction
public boolean isContains()
isContains
in interface Restriction
protected static java.nio.ByteBuffer validateIndexedValue(ColumnSpecification columnSpec, java.nio.ByteBuffer value) throws InvalidRequestException
InvalidRequestException
protected static Bound reverseBoundIfNeeded(ColumnDefinition columnDefinition, Bound bound)
columnDefinition
- the column definitionbound
- the boundCopyright © 2018 The Apache Software Foundation