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 MultiCBuilderappendBoundTo(MultiCBuilder builder, Bound bound, QueryOptions options)Appends the values of theSingleRestrictionfor the specified bound to the specified builder.MultiCBuilderappendTo(MultiCBuilder builder, QueryOptions options)Appends the values of thisSingleRestrictionto the specified builder.default booleanhasBound(Bound b)Checks if the specified bound is set or not.default booleanisContains()default booleanisEQ()default booleanisIN()default booleanisInclusive(Bound b)Checks if the specified bound is inclusive or not.default booleanisLIKE()default booleanisMultiColumn()default booleanisNotNull()default booleanisSlice()SingleRestrictionmergeWith(SingleRestriction otherRestriction)Merges this restriction with the specified one.-
Methods inherited from interface org.apache.cassandra.cql3.restrictions.Restriction
addFunctionsTo, addRowFilterTo, getColumnDefs, getFirstColumn, getLastColumn, hasSupportingIndex, isOnToken
-
-
-
-
Method Detail
-
isSlice
default boolean isSlice()
-
isEQ
default boolean isEQ()
-
isLIKE
default boolean isLIKE()
-
isIN
default boolean isIN()
-
isContains
default boolean isContains()
-
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:
trueif the specified bound is set,falseotherwise
-
isInclusive
default boolean isInclusive(Bound b)
Checks if the specified bound is inclusive or not.- Parameters:
b- the bound type- Returns:
trueif the specified bound is inclusive,falseotherwise
-
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 thisSingleRestrictionto the specified builder.- Parameters:
builder- theMultiCBuilderto append to.options- the query options- Returns:
- the
MultiCBuilder
-
appendBoundTo
default MultiCBuilder appendBoundTo(MultiCBuilder builder, Bound bound, QueryOptions options)
Appends the values of theSingleRestrictionfor the specified bound to the specified builder.- Parameters:
builder- theMultiCBuilderto append to.bound- the boundoptions- the query options- Returns:
- the
MultiCBuilder
-
-