org.apache.cassandra.cql

## Class AbstractModification

- java.lang.Object
- - org.apache.cassandra.cql.AbstractModification

- Direct Known Subclasses:
    DeleteStatement, UpdateStatement

      public abstract class AbstractModification
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected ConsistencyLevel` | `cLevel`
    `protected java.lang.String` | `columnFamily`
    `static ConsistencyLevel` | `defaultConsistency`
    `protected java.lang.String` | `keyName`
    `protected java.lang.String` | `keyspace`
    `protected java.lang.Long` | `timestamp`
    `protected int` | `timeToLive`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractModification(java.lang.String keyspace, java.lang.String columnFamily, java.lang.String keyAlias, Attributes attrs)`
    `AbstractModification(java.lang.String keyspace, java.lang.String columnFamily, java.lang.String keyAlias, ConsistencyLevel cLevel, java.lang.Long timestamp, int timeToLive)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getColumnFamily()`
    `ConsistencyLevel` | `getConsistencyLevel()`
    `java.lang.String` | `getKeyspace()`
    `long` | `getTimestamp(ThriftClientState 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, ThriftClientState clientState, java.util.List<java.nio.ByteBuffer> variables)` Convert statement into a list of mutations to apply on the server
    `abstract java.util.List<IMutation>` | `prepareRowMutations(java.lang.String keyspace, ThriftClientState clientState, java.lang.Long timestamp, java.util.List<java.nio.ByteBuffer> variables)` 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 ConsistencyLevel defaultConsistency

    - #### keyspace

          protected final java.lang.String keyspace

    - #### columnFamily

          protected final java.lang.String columnFamily

    - #### cLevel

          protected final 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 keyspace,
                              java.lang.String columnFamily,
                              java.lang.String keyAlias,
                              Attributes attrs)

    - #### AbstractModification

          public AbstractModification(java.lang.String keyspace,
                              java.lang.String columnFamily,
                              java.lang.String keyAlias,
                              ConsistencyLevel cLevel,
                              java.lang.Long timestamp,
                              int timeToLive)

  - ### Method Detail

    - #### getKeyspace

          public java.lang.String getKeyspace()

    - #### getColumnFamily

          public java.lang.String getColumnFamily()

    - #### getConsistencyLevel

          public 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(ThriftClientState clientState)

    - #### isSetTimestamp

          public boolean isSetTimestamp()

    - #### getTimeToLive

          public int getTimeToLive()

    - #### prepareRowMutations

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

      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:
        `InvalidRequestException` - on the wrong request
        `UnauthorizedException`

    - #### prepareRowMutations

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

      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:
        `InvalidRequestException` - on the wrong request
        `UnauthorizedException`

Copyright © 2014 The Apache Software Foundation