Interface Restrictions
- All Superinterfaces:
Restriction
- All Known Implementing Classes:
TokenRestriction,TokenRestriction.EQRestriction,TokenRestriction.SliceRestriction
Sets of restrictions
-
Method Summary
Modifier and TypeMethodDescriptiondefault Collection<ColumnMetadata>This method exists in addition toRestriction.getColumnDefs()in case implementations want to provide columns definitions that are not strictly in position order.getRestrictions(ColumnMetadata columnDef) Returns the restrictions applied to the specified column.booleanChecks if any of the underlying restrictions is a CONTAINS / CONTAINS KEY restriction.booleanhasIN()Checks if any of the underlying restriction is an IN.booleanChecks if all of the underlying restrictions are EQ or IN restrictions.booleanhasSlice()Checks if any of the underlying restrictions is a slice.booleanisEmpty()Checks if thisRestrictionsis empty or not.intsize()Returns the number of columns that have a restriction.Methods inherited from interface org.apache.cassandra.cql3.restrictions.Restriction
addFunctionsTo, addToRowFilter, findSupportingIndex, findSupportingIndexFromQueryPlan, getColumnDefs, getFirstColumn, getLastColumn, hasSupportingIndex, isOnToken, needsFiltering
-
Method Details
-
getRestrictions
Returns the restrictions applied to the specified column.- Parameters:
columnDef- the column definition- Returns:
- the restrictions applied to the specified column
-
getColumnDefinitions
This method exists in addition toRestriction.getColumnDefs()in case implementations want to provide columns definitions that are not strictly in position order. -
isEmpty
boolean isEmpty()Checks if thisRestrictionsis empty or not.- Returns:
trueif thisRestrictionsis empty,falseotherwise.
-
size
int size()Returns the number of columns that have a restriction.- Returns:
- the number of columns that have a restriction.
-
hasIN
boolean hasIN()Checks if any of the underlying restriction is an IN.- Returns:
trueif any of the underlying restriction is an IN,falseotherwise
-
hasContains
boolean hasContains()Checks if any of the underlying restrictions is a CONTAINS / CONTAINS KEY restriction.- Returns:
trueif any of the underlying restrictions is CONTAINS,falseotherwise
-
hasSlice
boolean hasSlice()Checks if any of the underlying restrictions is a slice.- Returns:
trueif any of the underlying restrictions is a slice,falseotherwise
-
hasOnlyEqualityRestrictions
boolean hasOnlyEqualityRestrictions()Checks if all of the underlying restrictions are EQ or IN restrictions.- Returns:
trueif all of the underlying restrictions are EQ or IN restrictions,falseotherwise
-