org.apache.cassandra.cql
Class DeleteStatement

java.lang.Object
  extended by org.apache.cassandra.cql.AbstractModification
      extended by org.apache.cassandra.cql.DeleteStatement

public class DeleteStatement
extends AbstractModification

A DELETE parsed from a CQL query statement.


Field Summary
 
Fields inherited from class org.apache.cassandra.cql.AbstractModification
cLevel, columnFamily, defaultConsistency, keyName, timestamp, timeToLive
 
Constructor Summary
DeleteStatement(java.util.List<Term> columns, java.lang.String columnFamily, java.lang.String keyName, java.util.List<Term> keys, Attributes attrs)
           
 
Method Summary
 java.util.List<Term> getColumns()
           
 java.util.List<Term> getKeys()
          
 RowMutation mutationForKey(java.nio.ByteBuffer key, java.lang.String keyspace, java.lang.Long timestamp, ClientState clientState)
          
 java.util.List<IMutation> prepareRowMutations(java.lang.String keyspace, ClientState clientState)
          Convert statement into a list of mutations to apply on the server
 java.util.List<IMutation> prepareRowMutations(java.lang.String keyspace, ClientState clientState, java.lang.Long timestamp)
          Convert statement into a list of mutations to apply on the server
 java.lang.String toString()
           
 
Methods inherited from class org.apache.cassandra.cql.AbstractModification
getColumnFamily, getConsistencyLevel, getTimestamp, getTimeToLive, isSetConsistencyLevel, isSetTimestamp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DeleteStatement

public DeleteStatement(java.util.List<Term> columns,
                       java.lang.String columnFamily,
                       java.lang.String keyName,
                       java.util.List<Term> keys,
                       Attributes attrs)
Method Detail

getColumns

public java.util.List<Term> getColumns()

getKeys

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


prepareRowMutations

public java.util.List<IMutation> prepareRowMutations(java.lang.String keyspace,
                                                     ClientState clientState)
                                              throws org.apache.cassandra.thrift.InvalidRequestException
Convert statement into a list of mutations to apply on the server

Specified by:
prepareRowMutations in class AbstractModification
Parameters:
keyspace - The working keyspace
clientState - current client status
Returns:
list of the mutations
Throws:
org.apache.cassandra.thrift.InvalidRequestException - on the wrong request

prepareRowMutations

public java.util.List<IMutation> prepareRowMutations(java.lang.String keyspace,
                                                     ClientState clientState,
                                                     java.lang.Long timestamp)
                                              throws org.apache.cassandra.thrift.InvalidRequestException
Convert statement into a list of mutations to apply on the server

Specified by:
prepareRowMutations in class AbstractModification
Parameters:
keyspace - The working keyspace
clientState - current client status
timestamp - global timestamp to use for all mutations
Returns:
list of the mutations
Throws:
org.apache.cassandra.thrift.InvalidRequestException - on the wrong request

mutationForKey

public RowMutation mutationForKey(java.nio.ByteBuffer key,
                                  java.lang.String keyspace,
                                  java.lang.Long timestamp,
                                  ClientState clientState)
                           throws org.apache.cassandra.thrift.InvalidRequestException

Throws:
org.apache.cassandra.thrift.InvalidRequestException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2011 The Apache Software Foundation