public abstract class SingleColumnRestriction extends java.lang.Object implements SingleRestriction
Modifier and Type | Field and Description |
---|---|
protected ColumnDefinition |
columnDef
The definition of the column to which apply the restriction.
|
Constructor and Description |
---|
SingleColumnRestriction(ColumnDefinition columnDef) |
Modifier and Type | Method and Description |
---|---|
protected abstract SingleRestriction |
doMergeWith(SingleRestriction otherRestriction) |
java.util.List<ColumnDefinition> |
getColumnDefs()
Returns the column definitions in position order.
|
ColumnDefinition |
getFirstColumn()
Returns the definition of the first column.
|
ColumnDefinition |
getLastColumn()
Returns the definition of the last column.
|
boolean |
hasSupportingIndex(SecondaryIndexManager indexManager)
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 ColumnDefinition columnDef
public SingleColumnRestriction(ColumnDefinition columnDef)
public java.util.List<ColumnDefinition> getColumnDefs()
Restriction
getColumnDefs
in interface Restriction
public ColumnDefinition getFirstColumn()
Restriction
getFirstColumn
in interface Restriction
public ColumnDefinition getLastColumn()
Restriction
getLastColumn
in interface Restriction
public boolean hasSupportingIndex(SecondaryIndexManager indexManager)
Restriction
hasSupportingIndex
in interface Restriction
indexManager
- the index managertrue
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- The Apache Software Foundation