Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cassandra.cql3.statements
Class BatchStatement

    java.lang.Object
      org.apache.cassandra.cql3.statements.ParsedStatement
          org.apache.cassandra.cql3.statements.CFStatement
              org.apache.cassandra.cql3.statements.ModificationStatement
                  org.apache.cassandra.cql3.statements.BatchStatement

All Implemented Interfaces:
  CQLStatement

    public class BatchStatement

extends ModificationStatement

A `BATCH` statement parsed from a CQL query.

Nested Class Summary

Nested classes/interfaces inherited from class org.apache.cassandra.cql3.statements.ParsedStatement
`ParsedStatement.Prepared`

Field Summary
`protected java.util.List<ModificationStatement>` | `statements`

Fields inherited from class org.apache.cassandra.cql3.statements.ModificationStatement
`cLevel, defaultConsistency, timestamp, timeToLive`

Fields inherited from class org.apache.cassandra.cql3.statements.CFStatement
`cfName`

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

Method Summary
`void` | `checkAccess(ClientState state)` Perform any access verification necessary for the statement.
`java.util.List<IMutation>` | `getMutations(ClientState clientState, java.util.List<java.nio.ByteBuffer> variables)` Convert statement into a list of mutations to apply on the server
`ParsedStatement.Prepared` | `prepare()`
`ParsedStatement.Prepared` | `prepare(CFDefinition.Name[] boundNames)`
`void` | `prepareKeyspace(ClientState state)`
`java.lang.String` | `toString()`
`void` | `validate(ClientState state)` Perform additional validation required by the statment.

Methods inherited from class org.apache.cassandra.cql3.statements.ModificationStatement
`execute, getConsistencyLevel, getTimestamp, getTimeToLive, isSetConsistencyLevel, isSetTimestamp`

Methods inherited from class org.apache.cassandra.cql3.statements.CFStatement
`columnFamily, keyspace`

Methods inherited from class org.apache.cassandra.cql3.statements.ParsedStatement
`getBoundsTerms, setBoundTerms`

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

Methods inherited from interface org.apache.cassandra.cql3.CQLStatement
`getBoundsTerms`

Field Detail

### statements

    protected final java.util.List<ModificationStatement> statements

Constructor Detail

### BatchStatement

    public BatchStatement(java.util.List<ModificationStatement> 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

### prepareKeyspace

    public void prepareKeyspace(ClientState state)
                         throws InvalidRequestException

  Overrides:
    `prepareKeyspace` in class `CFStatement`
  Throws:
    `InvalidRequestException`

### checkAccess

    public void checkAccess(ClientState state)
                     throws InvalidRequestException

  Description copied from interface: `CQLStatement`
  Perform any access verification necessary for the statement.

  Specified by:
    `checkAccess` in interface `CQLStatement`
  Overrides:
    `checkAccess` in class `ModificationStatement`
  Parameters:
    `state` - the current client state
  Throws:
    `InvalidRequestException`

### validate

    public void validate(ClientState state)
                  throws InvalidRequestException

  Description copied from interface: `CQLStatement`
  Perform additional validation required by the statment. To be overriden by subclasses if needed.

  Specified by:
    `validate` in interface `CQLStatement`
  Overrides:
    `validate` in class `ModificationStatement`
  Parameters:
    `state` - the current client state
  Throws:
    `InvalidRequestException`

### getMutations

    public java.util.List<IMutation> getMutations(ClientState clientState,
                                                  java.util.List<java.nio.ByteBuffer> variables)
                                           throws InvalidRequestException

  Description copied from class: `ModificationStatement`
  Convert statement into a list of mutations to apply on the server

  Specified by:
    `getMutations` in class `ModificationStatement`
  Parameters:
    `clientState` - current client status
    `variables` - value for prepared statement markers
  Returns:
    list of the mutations
  Throws:
    `InvalidRequestException` - on invalid requests

### prepare

    public ParsedStatement.Prepared prepare(CFDefinition.Name[] boundNames)
                                     throws InvalidRequestException

  Specified by:
    `prepare` in class `ModificationStatement`
  Throws:
    `InvalidRequestException`

### prepare

    public ParsedStatement.Prepared prepare()
                                     throws InvalidRequestException

  Specified by:
    `prepare` in class `ParsedStatement`
  Throws:
    `InvalidRequestException`

### toString

    public java.lang.String toString()

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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2013 The Apache Software Foundation