Interface SingleRestriction
-
- All Superinterfaces:
Restriction
- All Known Implementing Classes:
MultiColumnRestriction
,MultiColumnRestriction.EQRestriction
,MultiColumnRestriction.INRestriction
,MultiColumnRestriction.InRestrictionWithMarker
,MultiColumnRestriction.InRestrictionWithValues
,MultiColumnRestriction.NotNullRestriction
,MultiColumnRestriction.SliceRestriction
,SingleColumnRestriction
,SingleColumnRestriction.ContainsRestriction
,SingleColumnRestriction.EQRestriction
,SingleColumnRestriction.INRestriction
,SingleColumnRestriction.InRestrictionWithMarker
,SingleColumnRestriction.InRestrictionWithValues
,SingleColumnRestriction.IsNotNullRestriction
,SingleColumnRestriction.LikeRestriction
,SingleColumnRestriction.SliceRestriction
public interface SingleRestriction extends Restriction
A single restriction/clause on one or multiple column.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default MultiCBuilder
appendBoundTo(MultiCBuilder builder, Bound bound, QueryOptions options)
Appends the values of theSingleRestriction
for the specified bound to the specified builder.MultiCBuilder
appendTo(MultiCBuilder builder, QueryOptions options)
Appends the values of thisSingleRestriction
to the specified builder.default boolean
hasBound(Bound b)
Checks if the specified bound is set or not.default boolean
isContains()
default boolean
isEQ()
default boolean
isEqualityBased()
default boolean
isIN()
default boolean
isInclusive(Bound b)
Checks if the specified bound is inclusive or not.default boolean
isLIKE()
default boolean
isMultiColumn()
default boolean
isNotNull()
default boolean
isSlice()
SingleRestriction
mergeWith(SingleRestriction otherRestriction)
Merges this restriction with the specified one.-
Methods inherited from interface org.apache.cassandra.cql3.restrictions.Restriction
addFunctionsTo, addToRowFilter, getColumnDefs, getFirstColumn, getLastColumn, hasSupportingIndex, isOnToken, needsFiltering
-
-
-
-
Method Detail
-
isSlice
default boolean isSlice()
-
isEQ
default boolean isEQ()
-
isLIKE
default boolean isLIKE()
-
isIN
default boolean isIN()
-
isContains
default boolean isContains()
-
isEqualityBased
default boolean isEqualityBased()
- Returns:
true
if this restriction is based on equality comparison rather than a range or negation
-
isNotNull
default boolean isNotNull()
-
isMultiColumn
default boolean isMultiColumn()
-
hasBound
default boolean hasBound(Bound b)
Checks if the specified bound is set or not.- Parameters:
b
- the bound type- Returns:
true
if the specified bound is set,false
otherwise
-
isInclusive
default boolean isInclusive(Bound b)
Checks if the specified bound is inclusive or not.- Parameters:
b
- the bound type- Returns:
true
if the specified bound is inclusive,false
otherwise
-
mergeWith
SingleRestriction mergeWith(SingleRestriction otherRestriction)
Merges this restriction with the specified one.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.
- Parameters:
otherRestriction
- the restriction to merge into this one- Returns:
- the restriction resulting of the merge
-
appendTo
MultiCBuilder appendTo(MultiCBuilder builder, QueryOptions options)
Appends the values of thisSingleRestriction
to the specified builder.- Parameters:
builder
- theMultiCBuilder
to append to.options
- the query options- Returns:
- the
MultiCBuilder
-
appendBoundTo
default MultiCBuilder appendBoundTo(MultiCBuilder builder, Bound bound, QueryOptions options)
Appends the values of theSingleRestriction
for the specified bound to the specified builder.- Parameters:
builder
- theMultiCBuilder
to append to.bound
- the boundoptions
- the query options- Returns:
- the
MultiCBuilder
-
-