com.datastax.driver.core.querybuilder
Class Batch

java.lang.Object
  extended by com.datastax.driver.core.Query
      extended by com.datastax.driver.core.Statement
          extended by com.datastax.driver.core.querybuilder.Batch

public class Batch
extends Statement

A built BATCH statement.


Nested Class Summary
static class Batch.Options
          The options of a BATCH statement.
 
Method Summary
 Batch add(Statement statement)
          Adds a new statement to this batch.
protected  String buildQueryString()
           
 String getQueryString()
          The query string for this statement.
 ByteBuffer getRoutingKey()
          Returns the first non-null routing key of the statements in this batch or null otherwise.
protected  void setDirty()
           
 Batch.Options using(Using using)
          Adds a new options for this BATCH statement.
 
Methods inherited from class com.datastax.driver.core.Statement
toString
 
Methods inherited from class com.datastax.driver.core.Query
disableTracing, enableTracing, getConsistencyLevel, getRetryPolicy, isTracing, setConsistencyLevel, setRetryPolicy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

buildQueryString

protected String buildQueryString()

add

public Batch add(Statement statement)
Adds a new statement to this batch.

Parameters:
statement - the new statement to add.
Returns:
this batch.

using

public Batch.Options using(Using using)
Adds a new options for this BATCH statement.

Parameters:
using - the option to add.
Returns:
the options of this BATCH statement.

getRoutingKey

public ByteBuffer getRoutingKey()
Returns the first non-null routing key of the statements in this batch or null otherwise.

Returns:
the routing key for this batch statement.

getQueryString

public String getQueryString()
Description copied from class: Statement
The query string for this statement.

Specified by:
getQueryString in class Statement
Returns:
a valid CQL query string.

setDirty

protected void setDirty()


Copyright © 2013. All Rights Reserved.