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 Object
  • Field Details

  • Constructor Details

  • Method Details

    • 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 this IndexExpression is a CONTAINS operator.
      Returns:
      true if the operator of this IndexExpression is a CONTAINS operator, false otherwise.
    • isContainsKey

      public boolean isContainsKey()
      Checks if the operator of this IndexExpression is a CONTAINS_KEY operator.
      Returns:
      true if the operator of this IndexExpression is a CONTAINS_KEY operator, false otherwise.
    • getIndexValue

      public 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(since="3.5") public void validateForIndexing()
      Deprecated.
      See CASSANDRA-6377
    • isSatisfiedBy

      public abstract boolean isSatisfiedBy(TableMetadata metadata, DecoratedKey partitionKey, Row row, long 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 ByteBuffer getValue(TableMetadata metadata, DecoratedKey partitionKey, Row row, long nowInSec)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toCQLString

      public String toCQLString()
      Returns a CQL representation of this expression.
      Returns:
      a CQL representation of this expression
    • toString

      protected abstract String toString(boolean cql)