## org.apache.cassandra.cql
Class BatchStatement

    java.lang.Object
      org.apache.cassandra.cql.BatchStatement

    public class BatchStatement

extends java.lang.Object

A `BATCH` statement parsed from a CQL query.

Field Summary
`protected ConsistencyLevel` `consistency`
`protected java.util.List<AbstractModification>` `statements`
`protected java.lang.Long` `timestamp`
`protected int` `timeToLive`

Constructor Summary
`BatchStatement(java.util.List<AbstractModification> statements, Attributes attrs)` Creates a new BatchStatement from a list of statements and a Thrift consistency level.

Method Summary
`ConsistencyLevel` `getConsistencyLevel()`
`java.util.List<IMutation>` `getMutations(java.lang.String keyspace, ClientState clientState)`
`java.util.List<AbstractModification>` `getStatements()`
`int` `getTimeToLive()`
`boolean` `isSetTimestamp()`
`java.lang.String` `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### statements

    protected final java.util.List<AbstractModification> statements

### consistency

    protected final ConsistencyLevel consistency

### timestamp

    protected final java.lang.Long timestamp

### timeToLive

    protected final int timeToLive

Constructor Detail

### BatchStatement

    public BatchStatement(java.util.List<AbstractModification> statements,
                          Attributes attrs)

  Creates a new BatchStatement from a list of statements and a Thrift consistency level.

  Parameters:
    `statements` - a list of UpdateStatements
    `attrs` - additional attributes for statement (CL, timestamp, timeToLive)

Method Detail

### getStatements

    public java.util.List<AbstractModification> getStatements()

### getConsistencyLevel

    public ConsistencyLevel getConsistencyLevel()

### getTimeToLive

    public int getTimeToLive()

### getMutations

    public java.util.List<IMutation> getMutations(java.lang.String keyspace,
                                                  ClientState clientState)
                                           throws InvalidRequestException

  Throws:
    `InvalidRequestException`

### isSetTimestamp

    public boolean isSetTimestamp()

### toString

    public java.lang.String toString()

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

Copyright © 2012 The Apache Software Foundation