Package org.apache.cassandra.cql3
Class WhereClause
- java.lang.Object
-
- org.apache.cassandra.cql3.WhereClause
-
public final class WhereClause extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWhereClause.Builder
-
Field Summary
Fields Modifier and Type Field Description java.util.List<CustomIndexExpression>expressionsjava.util.List<Relation>relations
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsCustomExpressions()booleancontainsTokenRelations()Checks if the where clause contains some token relations.static WhereClauseempty()booleanequals(java.lang.Object o)inthashCode()static WhereClauseparse(java.lang.String cql)WhereClauserenameIdentifier(ColumnIdentifier from, ColumnIdentifier to)Renames identifiers in all relationsjava.lang.StringtoCQLString()Returns a CQL representation of this WHERE clause.java.lang.StringtoString()
-
-
-
Field Detail
-
relations
public final java.util.List<Relation> relations
-
expressions
public final java.util.List<CustomIndexExpression> expressions
-
-
Method Detail
-
empty
public static WhereClause empty()
-
containsCustomExpressions
public boolean containsCustomExpressions()
-
renameIdentifier
public WhereClause renameIdentifier(ColumnIdentifier from, ColumnIdentifier to)
Renames identifiers in all relations- Parameters:
from- the old identifierto- the new identifier- Returns:
- a new WhereClause with with "from" replaced by "to" in all relations
-
parse
public static WhereClause parse(java.lang.String cql) throws org.antlr.runtime.RecognitionException
- Throws:
org.antlr.runtime.RecognitionException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
toCQLString
public java.lang.String toCQLString()
Returns a CQL representation of this WHERE clause.- Returns:
- a CQL representation of this WHERE clause
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
containsTokenRelations
public boolean containsTokenRelations()
Checks if the where clause contains some token relations.- Returns:
trueif it is the case,falseotherwise.
-
-