public interface Restriction
Implementation of this class must be immutable. See mergeWith(Restriction)
for more explanation.
Modifier and Type | Method and Description |
---|---|
void |
addIndexExpressionTo(java.util.List<IndexExpression> expressions,
SecondaryIndexManager indexManager,
QueryOptions options)
Adds to the specified list the
IndexExpression s corresponding to this Restriction . |
CompositesBuilder |
appendBoundTo(CFMetaData cfm,
CompositesBuilder builder,
Bound bound,
QueryOptions options)
Appends the values of the
Restriction for the specified bound to the specified builder. |
CompositesBuilder |
appendTo(CFMetaData cfm,
CompositesBuilder builder,
QueryOptions options)
Appends the values of this
Restriction to the specified builder. |
java.util.List<ColumnDefinition> |
getColumnDefs()
Returns the column definitions in position order.
|
ColumnDefinition |
getFirstColumn()
Returns the definition of the first column.
|
java.lang.Iterable<Function> |
getFunctions()
Return an Iterable over all of the functions (both native and user-defined) used by any component
of the restriction
|
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 |
isNotReturningAnyRows(CFMetaData cfm,
QueryOptions options)
Checks if this restriction will prevent the query to return any rows.
|
boolean |
isOnToken() |
boolean |
isSlice() |
Restriction |
mergeWith(Restriction otherRestriction)
Merges this restriction with the specified one.
|
boolean isOnToken()
boolean isSlice()
boolean isEQ()
boolean isIN()
boolean isContains()
boolean isMultiColumn()
ColumnDefinition getFirstColumn()
ColumnDefinition getLastColumn()
java.util.List<ColumnDefinition> getColumnDefs()
java.lang.Iterable<Function> getFunctions()
boolean hasBound(Bound b)
b
- the bound typetrue
if the specified bound is set, false
otherwiseboolean isInclusive(Bound b)
b
- the bound typetrue
if the specified bound is inclusive, false
otherwiseRestriction mergeWith(Restriction otherRestriction) throws InvalidRequestException
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 mergedboolean hasSupportingIndex(SecondaryIndexManager indexManager)
indexManager
- the index managertrue
if the restriction is on indexed columns, false
void addIndexExpressionTo(java.util.List<IndexExpression> expressions, SecondaryIndexManager indexManager, QueryOptions options) throws InvalidRequestException
IndexExpression
s corresponding to this Restriction
.expressions
- the list to add the IndexExpression
s toindexManager
- the secondary index manageroptions
- the query optionsInvalidRequestException
- if this Restriction
cannot be converted into
IndexExpression
sCompositesBuilder appendTo(CFMetaData cfm, CompositesBuilder builder, QueryOptions options)
Restriction
to the specified builder.cfm
- the table metadatabuilder
- the CompositesBuilder
to append to.options
- the query optionsCompositesBuilder
CompositesBuilder appendBoundTo(CFMetaData cfm, CompositesBuilder builder, Bound bound, QueryOptions options)
Restriction
for the specified bound to the specified builder.cfm
- the table metadatabuilder
- the CompositesBuilder
to append to.bound
- the boundoptions
- the query optionsCompositesBuilder
boolean isNotReturningAnyRows(CFMetaData cfm, QueryOptions options)
cfm
- the table metadataoptions
- the query optionstrue
if this restriction will prevent the query to return any rows, otherwiseCopyright © 2018 The Apache Software Foundation