org.apache.cassandra.cql
Class AbstractModification

java.lang.Object
  extended by org.apache.cassandra.cql.AbstractModification
Direct Known Subclasses:
DeleteStatement, UpdateStatement

public abstract class AbstractModification
extends java.lang.Object


Field Summary
protected  org.apache.cassandra.thrift.ConsistencyLevel cLevel
           
protected  java.lang.String columnFamily
           
static org.apache.cassandra.thrift.ConsistencyLevel defaultConsistency
           
protected  java.lang.String keyName
           
protected  java.lang.Long timestamp
           
protected  int timeToLive
           
 
Constructor Summary
AbstractModification(java.lang.String columnFamily, java.lang.String keyAlias, Attributes attrs)
           
AbstractModification(java.lang.String columnFamily, java.lang.String keyAlias, org.apache.cassandra.thrift.ConsistencyLevel cLevel, java.lang.Long timestamp, int timeToLive)
           
 
Method Summary
 java.lang.String getColumnFamily()
           
 org.apache.cassandra.thrift.ConsistencyLevel getConsistencyLevel()
           
 long getTimestamp(ClientState clientState)
           
 int getTimeToLive()
           
 boolean isSetConsistencyLevel()
          True if an explicit consistency level was parsed from the statement.
 boolean isSetTimestamp()
           
abstract  java.util.List<IMutation> prepareRowMutations(java.lang.String keyspace, ClientState clientState)
          Convert statement into a list of mutations to apply on the server
abstract  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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultConsistency

public static final org.apache.cassandra.thrift.ConsistencyLevel defaultConsistency

columnFamily

protected final java.lang.String columnFamily

cLevel

protected final org.apache.cassandra.thrift.ConsistencyLevel cLevel

timestamp

protected final java.lang.Long timestamp

timeToLive

protected final int timeToLive

keyName

protected final java.lang.String keyName
Constructor Detail

AbstractModification

public AbstractModification(java.lang.String columnFamily,
                            java.lang.String keyAlias,
                            Attributes attrs)

AbstractModification

public AbstractModification(java.lang.String columnFamily,
                            java.lang.String keyAlias,
                            org.apache.cassandra.thrift.ConsistencyLevel cLevel,
                            java.lang.Long timestamp,
                            int timeToLive)
Method Detail

getColumnFamily

public java.lang.String getColumnFamily()

getConsistencyLevel

public org.apache.cassandra.thrift.ConsistencyLevel getConsistencyLevel()

isSetConsistencyLevel

public boolean isSetConsistencyLevel()
True if an explicit consistency level was parsed from the statement.

Returns:
true if a consistency was parsed, false otherwise.

getTimestamp

public long getTimestamp(ClientState clientState)

isSetTimestamp

public boolean isSetTimestamp()

getTimeToLive

public int getTimeToLive()

prepareRowMutations

public abstract 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

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 abstract 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

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


Copyright © 2011 The Apache Software Foundation