public static class SingleColumnRestriction.SliceRestriction extends SingleColumnRestriction
SingleColumnRestriction.ContainsRestriction, SingleColumnRestriction.EQRestriction, SingleColumnRestriction.INRestriction, SingleColumnRestriction.InRestrictionWithMarker, SingleColumnRestriction.InRestrictionWithValues, SingleColumnRestriction.IsNotNullRestriction, SingleColumnRestriction.SliceRestrictioncolumnDef| Constructor and Description |
|---|
SliceRestriction(ColumnDefinition columnDef,
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 b)
Checks if the specified bound is set or not.
|
boolean |
isContains() |
boolean |
isEQ() |
boolean |
isIN() |
boolean |
isInclusive(Bound b)
Checks if the specified bound is inclusive or not.
|
boolean |
isMultiColumn() |
boolean |
isNotNull() |
boolean |
isOnToken() |
boolean |
isSlice() |
protected boolean |
isSupportedBy(Index index)
Check if this type of restriction is supported 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, getFirstColumn, getLastColumn, hasSupportingIndex, mergeWithpublic SliceRestriction(ColumnDefinition columnDef, Bound bound, boolean inclusive, Term term)
public void addFunctionsTo(java.util.List<Function> functions)
Restrictionfunctions - the list to add topublic boolean isSlice()
isSlice in interface Restrictionpublic MultiCBuilder appendTo(MultiCBuilder builder, QueryOptions options)
RestrictionRestriction to the specified builder.builder - the MultiCBuilder to append to.options - the query optionsMultiCBuilderpublic boolean hasBound(Bound b)
RestrictionhasBound in interface Restrictionb - the bound typetrue if the specified bound is set, false otherwisepublic MultiCBuilder appendBoundTo(MultiCBuilder builder, Bound bound, QueryOptions options)
RestrictionRestriction for the specified bound to the specified builder.appendBoundTo in interface Restrictionbuilder - the MultiCBuilder to append to.bound - the boundoptions - the query optionsMultiCBuilderpublic boolean isInclusive(Bound b)
RestrictionisInclusive in interface Restrictionb - the bound typetrue if the specified bound is inclusive, false otherwisepublic Restriction doMergeWith(Restriction otherRestriction) throws InvalidRequestException
doMergeWith in class SingleColumnRestrictionInvalidRequestExceptionpublic void addRowFilterTo(RowFilter filter, SecondaryIndexManager indexManager, QueryOptions options) throws InvalidRequestException
RestrictionRestriction.filter - the row filter to add expressions toindexManager - the secondary index manageroptions - the query optionsInvalidRequestException - if this Restriction cannot be converted into a row filterprotected boolean isSupportedBy(Index index)
SingleColumnRestrictionisSupportedBy in class SingleColumnRestrictionindex - the secondary indextrue this type of restriction is supported by the specified index,
false otherwise.public java.lang.String toString()
toString in class java.lang.Objectpublic boolean isOnToken()
isOnToken in interface Restrictionpublic boolean isMultiColumn()
isMultiColumn in interface Restrictionpublic boolean isEQ()
isEQ in interface Restrictionpublic boolean isIN()
isIN in interface Restrictionpublic boolean isContains()
isContains in interface Restrictionpublic boolean isNotNull()
isNotNull in interface Restrictionprotected static Bound reverseBoundIfNeeded(ColumnDefinition columnDefinition, Bound bound)
columnDefinition - the column definitionbound - the boundCopyright © 2016 The Apache Software Foundation