org.apache.cassandra.cql

## Class WhereClause

- java.lang.Object
- - org.apache.cassandra.cql.WhereClause

    public class WhereClause
    extends java.lang.Object

WhereClauses encapsulate all of the predicates of a SELECT query.

### Constructor Summary

Constructors
Constructor and Description
`WhereClause()`
`WhereClause(Relation firstRelation)` Create a new WhereClause with the first parsed relation.

### Method Summary

Methods
`void` `and(Relation relation)` Add an additional relation to this WHERE clause.
`void` `andKeyEquals(Term key)` The same as KEY = <key> to avoid using Relation object
`void` `extractKeysFromColumns(CFMetaData cfm)`
`java.util.List<Relation>` `getClauseRelations()`
`java.util.List<Relation>` `getColumnRelations()`
`Term` `getFinishKey()`
`java.lang.String` `getKeyAlias()`
`java.util.Set<Term>` `getKeys()`
`Term` `getStartKey()`
`boolean` `includeFinishKey()`
`boolean` `includeStartKey()`
`boolean` `isKeyRange()`
`boolean` `isMultiKey()`
`void` `setKeyAlias(java.lang.String alias)`
`void` `setMultiKey(boolean multiKey)`
`java.lang.String` `toString()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### WhereClause

    public WhereClause(Relation firstRelation)

Create a new WhereClause with the first parsed relation.

Parameters:
  `firstRelation` - key or column relation

#### WhereClause

    public WhereClause()

### Method Detail

#### and

    public void and(Relation relation)

Add an additional relation to this WHERE clause.

Parameters:
  `relation` - the relation to add.

#### andKeyEquals

    public void andKeyEquals(Term key)

The same as KEY = <key> to avoid using Relation object

Parameters:
  `key` - key to include into clause

#### getColumnRelations

    public java.util.List<Relation> getColumnRelations()

#### isKeyRange

    public boolean isKeyRange()

#### getStartKey

    public Term getStartKey()

#### getFinishKey

    public Term getFinishKey()

#### getKeys

    public java.util.Set<Term> getKeys()

#### includeStartKey

    public boolean includeStartKey()

#### includeFinishKey

    public boolean includeFinishKey()

#### setKeyAlias

    public void setKeyAlias(java.lang.String alias)

#### isMultiKey

    public boolean isMultiKey()

#### setMultiKey

    public void setMultiKey(boolean multiKey)

#### getKeyAlias

    public java.lang.String getKeyAlias()

#### extractKeysFromColumns

    public void extractKeysFromColumns(CFMetaData cfm)

#### getClauseRelations

    public java.util.List<Relation> getClauseRelations()

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `java.lang.Object`