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 class
RowFilter.Expression.Kind
-
Field Summary
Fields Modifier and Type Field Description protected ColumnMetadata
column
protected Operator
operator
protected java.nio.ByteBuffer
value
-
Constructor Summary
Constructors Modifier Constructor Description protected
Expression(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 ColumnMetadata
column()
boolean
equals(java.lang.Object o)
java.nio.ByteBuffer
getIndexValue()
If this expression is used to query an index, the value to use as partition key for that index query.protected java.nio.ByteBuffer
getValue(TableMetadata metadata, DecoratedKey partitionKey, Row row)
int
hashCode()
boolean
isContains()
Checks if the operator of thisIndexExpression
is aCONTAINS
operator.boolean
isContainsKey()
Checks if the operator of thisIndexExpression
is aCONTAINS_KEY
operator.boolean
isCustom()
abstract boolean
isSatisfiedBy(TableMetadata metadata, DecoratedKey partitionKey, Row row)
Returns whether the provided row satisfied this expression or not.boolean
isUserDefined()
protected abstract RowFilter.Expression.Kind
kind()
Operator
operator()
void
validate()
void
validateForIndexing()
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 thisIndexExpression
is aCONTAINS
operator.- Returns:
true
if the operator of thisIndexExpression
is aCONTAINS
operator,false
otherwise.
-
isContainsKey
public boolean isContainsKey()
Checks if the operator of thisIndexExpression
is aCONTAINS_KEY
operator.- Returns:
true
if the operator of thisIndexExpression
is aCONTAINS_KEY
operator,false
otherwise.
-
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)
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)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-