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 class
WhereClause.Builder
-
Field Summary
Fields Modifier and Type Field Description java.util.List<CustomIndexExpression>
expressions
java.util.List<Relation>
relations
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsCustomExpressions()
boolean
containsTokenRelations()
Checks if the where clause contains some token relations.static WhereClause
empty()
boolean
equals(java.lang.Object o)
int
hashCode()
static WhereClause
parse(java.lang.String cql)
WhereClause
renameIdentifier(ColumnIdentifier from, ColumnIdentifier to)
Renames identifiers in all relationsjava.lang.String
toCQLString()
Returns a CQL representation of this WHERE clause.java.lang.String
toString()
-
-
-
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:
toString
in 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:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
containsTokenRelations
public boolean containsTokenRelations()
Checks if the where clause contains some token relations.- Returns:
true
if it is the case,false
otherwise.
-
-