Interface Restrictions
-
- All Superinterfaces:
Restriction
- All Known Implementing Classes:
TokenRestriction,TokenRestriction.EQRestriction,TokenRestriction.SliceRestriction
public interface Restrictions extends Restriction
Sets of restrictions
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Set<Restriction>getRestrictions(ColumnMetadata columnDef)Returns the restrictions applied to the specified column.booleanhasContains()Checks if any of the underlying restrictions is a CONTAINS / CONTAINS KEY restriction.booleanhasIN()Checks if any of the underlying restriction is an IN.booleanhasOnlyEqualityRestrictions()Checks 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, addRowFilterTo, getColumnDefs, getFirstColumn, getLastColumn, hasSupportingIndex, isOnToken
-
-
-
-
Method Detail
-
getRestrictions
java.util.Set<Restriction> getRestrictions(ColumnMetadata columnDef)
Returns the restrictions applied to the specified column.- Parameters:
columnDef- the column definition- Returns:
- the restrictions applied to the specified column
-
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
-
-