public static class MultiColumnRestriction.SliceRestriction extends MultiColumnRestriction
MultiColumnRestriction.EQRestriction, MultiColumnRestriction.INRestriction, MultiColumnRestriction.InRestrictionWithMarker, MultiColumnRestriction.InRestrictionWithValues, MultiColumnRestriction.NotNullRestriction, MultiColumnRestriction.SliceRestriction
columnDefs
Constructor and Description |
---|
SliceRestriction(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.
|
void |
addRowFilterTo(RowFilter filter,
SecondaryIndexManager indexManager,
QueryOptions options)
Adds to the specified row filter the expressions corresponding to this
Restriction . |
MultiCBuilder |
appendBoundTo(MultiCBuilder builder,
Bound bound,
QueryOptions options)
Appends the values of the
Restriction for the specified bound to the specified builder. |
MultiCBuilder |
appendTo(MultiCBuilder builder,
QueryOptions options)
Appends the values of this
Restriction to the specified builder. |
Restriction |
doMergeWith(Restriction otherRestriction) |
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 |
isNotNull() |
boolean |
isOnToken() |
boolean |
isSlice() |
protected boolean |
isSupportedBy(Index 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() |
getColumnDefs, getColumnsInCommons, getFirstColumn, getLastColumn, hasSupportingIndex, isMultiColumn, mergeWith
public SliceRestriction(java.util.List<ColumnDefinition> columnDefs, Bound bound, boolean inclusive, Term term)
public boolean isSlice()
isSlice
in interface Restriction
public MultiCBuilder appendTo(MultiCBuilder builder, QueryOptions options)
Restriction
Restriction
to the specified builder.builder
- the MultiCBuilder
to append to.options
- the query optionsMultiCBuilder
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 boolean isSupportedBy(Index 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 void addFunctionsTo(java.util.List<Function> functions)
Restriction
functions
- the list to add topublic 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 addRowFilterTo(RowFilter filter, SecondaryIndexManager indexManager, QueryOptions options) throws InvalidRequestException
Restriction
Restriction
.filter
- the row filter to add expressions toindexManager
- the secondary index manageroptions
- the query optionsInvalidRequestException
- if this Restriction
cannot be converted into a row filterpublic java.lang.String toString()
toString
in class java.lang.Object
public 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
public boolean isNotNull()
isNotNull
in interface Restriction
protected static Bound reverseBoundIfNeeded(ColumnDefinition columnDefinition, Bound bound)
columnDefinition
- the column definitionbound
- the boundCopyright © 2021 The Apache Software Foundation