public abstract class MultiColumnRestriction
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
MultiColumnRestriction.EQRestriction |
static class |
MultiColumnRestriction.INRestriction |
static class |
MultiColumnRestriction.InRestrictionWithMarker
An IN restriction that uses a single marker for a set of IN values that are tuples.
|
static class |
MultiColumnRestriction.InRestrictionWithValues
An IN restriction that has a set of terms for in values.
|
static class |
MultiColumnRestriction.NotNullRestriction |
static class |
MultiColumnRestriction.SliceRestriction |
Modifier and Type | Field and Description |
---|---|
protected java.util.List<ColumnDefinition> |
columnDefs
The columns to which the restriction apply.
|
Constructor and Description |
---|
MultiColumnRestriction(java.util.List<ColumnDefinition> columnDefs) |
Modifier and Type | Method and Description |
---|---|
MultiCBuilder |
appendBoundTo(MultiCBuilder builder,
Bound bound,
QueryOptions options)
Appends the values of the
Restriction for the specified bound to the specified builder. |
protected abstract Restriction |
doMergeWith(Restriction otherRestriction) |
java.util.List<ColumnDefinition> |
getColumnDefs()
Returns the column definitions in position order.
|
protected java.lang.String |
getColumnsInCommons(Restriction otherRestriction)
Returns the names of the columns that are specified within this
Restrictions and the other one
as a comma separated String . |
ColumnDefinition |
getFirstColumn()
Returns the definition of the first column.
|
ColumnDefinition |
getLastColumn()
Returns the definition of the last column.
|
boolean |
hasBound(Bound b)
Checks if the specified bound is set or not.
|
boolean |
hasSupportingIndex(SecondaryIndexManager indexManager)
Check if the restriction is on indexed columns.
|
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 abstract boolean |
isSupportedBy(Index index)
Check if this type of restriction is supported for by the specified index.
|
Restriction |
mergeWith(Restriction otherRestriction)
Merges this restriction with the specified one.
|
protected static Bound |
reverseBoundIfNeeded(ColumnDefinition columnDefinition,
Bound bound)
Reverses the specified bound if the column type is a reversed one.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addFunctionsTo, addRowFilterTo, appendTo
protected final java.util.List<ColumnDefinition> columnDefs
public MultiColumnRestriction(java.util.List<ColumnDefinition> columnDefs)
public boolean isMultiColumn()
isMultiColumn
in interface Restriction
public ColumnDefinition getFirstColumn()
Restriction
public ColumnDefinition getLastColumn()
Restriction
public java.util.List<ColumnDefinition> getColumnDefs()
Restriction
public final Restriction mergeWith(Restriction otherRestriction) throws InvalidRequestException
Restriction
Restriction are immutable. Therefore merging two restrictions result in a new one. The reason behind this choice is that it allow a great flexibility in the way the merging can done while preventing any side effect.
otherRestriction
- the restriction to merge into this oneInvalidRequestException
- if the restrictions cannot be mergedprotected abstract Restriction doMergeWith(Restriction otherRestriction) throws InvalidRequestException
InvalidRequestException
protected final java.lang.String getColumnsInCommons(Restriction otherRestriction)
Restrictions
and the other one
as a comma separated String
.otherRestriction
- the other restrictionsRestrictions
and the other one
as a comma separated String
.public final boolean hasSupportingIndex(SecondaryIndexManager indexManager)
Restriction
indexManager
- the index managertrue
if the restriction is on indexed columns, false
protected abstract boolean isSupportedBy(Index index)
index
- the secondary indextrue
this type of restriction is supported by the specified index,
false
otherwise.public boolean isOnToken()
isOnToken
in interface Restriction
public boolean isSlice()
isSlice
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 boolean hasBound(Bound b)
Restriction
hasBound
in interface Restriction
b
- the bound typetrue
if the specified bound is set, false
otherwisepublic 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
public boolean isInclusive(Bound b)
Restriction
isInclusive
in interface Restriction
b
- the bound typetrue
if the specified bound is inclusive, false
otherwiseprotected static Bound reverseBoundIfNeeded(ColumnDefinition columnDefinition, Bound bound)
columnDefinition
- the column definitionbound
- the boundCopyright © 2017 The Apache Software Foundation