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

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

### Constructor Summary

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

### Method Summary

Methods
`ConsistencyLevel` `getConsistencyLevel()`
`java.util.List<IMutation>` `getMutations(java.lang.String keyspace, ThriftClientState clientState, java.util.List<java.nio.ByteBuffer> variables)`
`java.util.List<AbstractModification>` `getStatements()`
`long` `getTimestamp()`
`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()

#### getTimestamp

    public long getTimestamp()

#### getMutations

    public java.util.List<IMutation> getMutations(java.lang.String keyspace,
                                         ThriftClientState clientState,
                                         java.util.List<java.nio.ByteBuffer> variables)
                                           throws InvalidRequestException,
                                                  UnauthorizedException

Throws:
  `InvalidRequestException`
  `UnauthorizedException`

#### isSetTimestamp

    public boolean isSetTimestamp()

#### toString

    public java.lang.String toString()

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