public abstract class MultiColumnRestriction extends java.lang.Object implements SingleRestriction
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<ColumnMetadata> |
columnDefs
The columns to which the restriction apply.
|
Constructor and Description |
---|
MultiColumnRestriction(java.util.List<ColumnMetadata> columnDefs) |
Modifier and Type | Method and Description |
---|---|
protected abstract SingleRestriction |
doMergeWith(SingleRestriction otherRestriction) |
java.util.List<ColumnMetadata> |
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 . |
ColumnMetadata |
getFirstColumn()
Returns the definition of the first column.
|
ColumnMetadata |
getLastColumn()
Returns the definition of the last column.
|
boolean |
hasSupportingIndex(IndexRegistry indexRegistry)
Check if the restriction is on indexed columns.
|
boolean |
isMultiColumn() |
protected abstract boolean |
isSupportedBy(Index index)
Check if this type of restriction is supported for by the specified index.
|
SingleRestriction |
mergeWith(SingleRestriction otherRestriction)
Merges this restriction with the specified one.
|
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
appendBoundTo, appendTo, hasBound, isContains, isEQ, isIN, isInclusive, isLIKE, isNotNull, isSlice
addFunctionsTo, addRowFilterTo, isOnToken
protected final java.util.List<ColumnMetadata> columnDefs
public MultiColumnRestriction(java.util.List<ColumnMetadata> columnDefs)
public boolean isMultiColumn()
isMultiColumn
in interface SingleRestriction
public ColumnMetadata getFirstColumn()
Restriction
getFirstColumn
in interface Restriction
public ColumnMetadata getLastColumn()
Restriction
getLastColumn
in interface Restriction
public java.util.List<ColumnMetadata> getColumnDefs()
Restriction
getColumnDefs
in interface Restriction
public final SingleRestriction mergeWith(SingleRestriction otherRestriction)
SingleRestriction
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.
mergeWith
in interface SingleRestriction
otherRestriction
- the restriction to merge into this oneprotected abstract SingleRestriction doMergeWith(SingleRestriction otherRestriction)
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(IndexRegistry indexRegistry)
Restriction
hasSupportingIndex
in interface Restriction
indexRegistry
- the index registrytrue
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 java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2009-2021 The Apache Software Foundation