Package org.apache.cassandra.db.filter
Class RowFilter.Expression
- java.lang.Object
-
- org.apache.cassandra.db.filter.RowFilter.Expression
-
- Direct Known Subclasses:
RowFilter.CustomExpression,RowFilter.SimpleExpression,RowFilter.UserExpression
- Enclosing class:
- RowFilter
public abstract static class RowFilter.Expression extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classRowFilter.Expression.Kind
-
Field Summary
Fields Modifier and Type Field Description protected ColumnMetadatacolumnprotected Operatoroperatorprotected java.nio.ByteBuffervalue
-
Constructor Summary
Constructors Modifier Constructor Description protectedExpression(ColumnMetadata column, Operator operator, java.nio.ByteBuffer value)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ColumnMetadatacolumn()booleanequals(java.lang.Object o)java.nio.ByteBuffergetIndexValue()If this expression is used to query an index, the value to use as partition key for that index query.protected java.nio.ByteBuffergetValue(TableMetadata metadata, DecoratedKey partitionKey, Row row, int nowInSec)inthashCode()booleanisContains()Checks if the operator of thisIndexExpressionis aCONTAINSoperator.booleanisContainsKey()Checks if the operator of thisIndexExpressionis aCONTAINS_KEYoperator.booleanisCustom()abstract booleanisSatisfiedBy(TableMetadata metadata, DecoratedKey partitionKey, Row row, int nowInSec)Returns whether the provided row satisfied this expression or not.booleanisUserDefined()protected abstract RowFilter.Expression.Kindkind()Operatoroperator()java.lang.StringtoCQLString()Returns a CQL representation of this expression.java.lang.StringtoString()protected abstract java.lang.StringtoString(boolean cql)voidvalidate()voidvalidateForIndexing()Deprecated.
-
-
-
Field Detail
-
column
protected final ColumnMetadata column
-
operator
protected final Operator operator
-
value
protected final java.nio.ByteBuffer value
-
-
Constructor Detail
-
Expression
protected Expression(ColumnMetadata column, Operator operator, java.nio.ByteBuffer value)
-
-
Method Detail
-
kind
protected abstract RowFilter.Expression.Kind kind()
-
isCustom
public boolean isCustom()
-
isUserDefined
public boolean isUserDefined()
-
column
public ColumnMetadata column()
-
operator
public Operator operator()
-
isContains
public boolean isContains()
Checks if the operator of thisIndexExpressionis aCONTAINSoperator.- Returns:
trueif the operator of thisIndexExpressionis aCONTAINSoperator,falseotherwise.
-
isContainsKey
public boolean isContainsKey()
Checks if the operator of thisIndexExpressionis aCONTAINS_KEYoperator.- Returns:
trueif the operator of thisIndexExpressionis aCONTAINS_KEYoperator,falseotherwise.
-
getIndexValue
public java.nio.ByteBuffer getIndexValue()
If this expression is used to query an index, the value to use as partition key for that index query.
-
validate
public void validate()
-
validateForIndexing
@Deprecated public void validateForIndexing()
Deprecated.
-
isSatisfiedBy
public abstract boolean isSatisfiedBy(TableMetadata metadata, DecoratedKey partitionKey, Row row, int nowInSec)
Returns whether the provided row satisfied this expression or not.- Parameters:
metadata-partitionKey- the partition key for row to check.row- the row to check. It should *not* contain deleted cells (i.e. it should come from a RowIterator).- Returns:
- whether the row is satisfied by this expression.
-
getValue
protected java.nio.ByteBuffer getValue(TableMetadata metadata, DecoratedKey partitionKey, Row row, int nowInSec)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
toCQLString
public java.lang.String toCQLString()
Returns a CQL representation of this expression.- Returns:
- a CQL representation of this expression
-
toString
protected abstract java.lang.String toString(boolean cql)
-
-