public abstract class SingleColumnRestriction extends java.lang.Object implements SingleRestriction
Modifier and Type | Class and Description |
---|---|
static class |
SingleColumnRestriction.ContainsRestriction |
static class |
SingleColumnRestriction.EQRestriction |
static class |
SingleColumnRestriction.INRestriction |
static class |
SingleColumnRestriction.InRestrictionWithMarker |
static class |
SingleColumnRestriction.InRestrictionWithValues |
static class |
SingleColumnRestriction.IsNotNullRestriction |
static class |
SingleColumnRestriction.LikeRestriction |
static class |
SingleColumnRestriction.SliceRestriction |
Modifier and Type | Field and Description |
---|---|
protected ColumnMetadata |
columnDef
The definition of the column to which apply the restriction.
|
Constructor and Description |
---|
SingleColumnRestriction(ColumnMetadata columnDef) |
Modifier and Type | Method and Description |
---|---|
protected abstract SingleRestriction |
doMergeWith(SingleRestriction otherRestriction) |
java.util.List<ColumnMetadata> |
getColumnDefs()
Returns the column definitions in position order.
|
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.
|
protected abstract boolean |
isSupportedBy(Index index)
Check if this type of restriction is supported by the specified index.
|
SingleRestriction |
mergeWith(SingleRestriction otherRestriction)
Merges this restriction with the specified one.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
appendBoundTo, appendTo, hasBound, isContains, isEQ, isIN, isInclusive, isLIKE, isMultiColumn, isNotNull, isSlice
addFunctionsTo, addRowFilterTo, isOnToken
protected final ColumnMetadata columnDef
public SingleColumnRestriction(ColumnMetadata columnDef)
public java.util.List<ColumnMetadata> getColumnDefs()
Restriction
getColumnDefs
in interface Restriction
public ColumnMetadata getFirstColumn()
Restriction
getFirstColumn
in interface Restriction
public ColumnMetadata getLastColumn()
Restriction
getLastColumn
in interface Restriction
public boolean hasSupportingIndex(IndexRegistry indexRegistry)
Restriction
hasSupportingIndex
in interface Restriction
indexRegistry
- the index registrytrue
if the restriction is on indexed columns, false
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 abstract boolean isSupportedBy(Index index)
index
- the secondary indextrue
this type of restriction is supported by the specified index,
false
otherwise.Copyright © 2009-2021 The Apache Software Foundation