AlterTableStatement (apache-cassandra API)
Date: 2014-10-21

org.apache.cassandra.cql3.statements

## Class AlterTableStatement

- java.lang.Object
- - org.apache.cassandra.cql3.statements.ParsedStatement
  - - org.apache.cassandra.cql3.statements.CFStatement
    - - org.apache.cassandra.cql3.statements.SchemaAlteringStatement
      - - org.apache.cassandra.cql3.statements.AlterTableStatement

- All Implemented Interfaces:
    CQLStatement

      public class AlterTableStatement
      extends SchemaAlteringStatement

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `AlterTableStatement.Type`

    - ### Nested classes/interfaces inherited from class org.apache.cassandra.cql3.statements.ParsedStatement

      `ParsedStatement.Prepared`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `ColumnIdentifier` | `columnName`
    `AlterTableStatement.Type` | `oType`
    `CQL3Type.Raw` | `validator`

    - ### Fields inherited from class org.apache.cassandra.cql3.statements.CFStatement

      `cfName`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AlterTableStatement(CFName name, AlterTableStatement.Type type, ColumnIdentifier columnName, CQL3Type.Raw validator, CFPropDefs cfProps, java.util.Map<ColumnIdentifier,ColumnIdentifier> renames, boolean isStatic)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `announceMigration(boolean isLocalOnly)` Announces the migration to other nodes in the cluster.
    `Event.SchemaChange` | `changeEvent()`
    `void` | `checkAccess(ClientState state)` Perform any access verification necessary for the statement.
    `java.lang.String` | `toString()`
    `void` | `validate(ClientState state)` Perform additional validation required by the statment.

    - ### Methods inherited from class org.apache.cassandra.cql3.statements.SchemaAlteringStatement

      `execute, executeInternal, getBoundTerms, prepare, prepareKeyspace`

    - ### Methods inherited from class org.apache.cassandra.cql3.statements.CFStatement

      `columnFamily, keyspace, prepareKeyspace`

    - ### Methods inherited from class org.apache.cassandra.cql3.statements.ParsedStatement

      `getBoundVariables, setBoundVariables`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### oType

          public final AlterTableStatement.Type oType

    - #### validator

          public final CQL3Type.Raw validator

    - #### columnName

          public final ColumnIdentifier columnName

  - ### Constructor Detail

    - #### AlterTableStatement

          public AlterTableStatement(CFName name,
                             AlterTableStatement.Type type,
                             ColumnIdentifier columnName,
                             CQL3Type.Raw validator,
                             CFPropDefs cfProps,
                             java.util.Map<ColumnIdentifier,ColumnIdentifier> renames,
                             boolean isStatic)

  - ### Method Detail

    - #### checkAccess

          public void checkAccess(ClientState state)
                           throws UnauthorizedException,
                                  InvalidRequestException

      Description copied from interface: `CQLStatement`
      Perform any access verification necessary for the statement.
      Parameters:
        `state` - the current client state
      Throws:
        `UnauthorizedException`
        `InvalidRequestException`

    - #### validate

          public void validate(ClientState state)

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

    - #### announceMigration

          public boolean announceMigration(boolean isLocalOnly)
                                    throws RequestValidationException

      Description copied from class: `SchemaAlteringStatement`
      Announces the migration to other nodes in the cluster.
      Specified by:
        `announceMigration` in class `SchemaAlteringStatement`
      Returns:
        true if the execution of this statement resulted in a schema change, false otherwise (when IF NOT EXISTS is used, for example)
      Throws:
        `RequestValidationException`

    - #### toString

          public java.lang.String toString()

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

    - #### changeEvent

          public Event.SchemaChange changeEvent()

      Specified by:
        `changeEvent` in class `SchemaAlteringStatement`

Copyright © 2014 The Apache Software Foundation