org.apache.cassandra.cql3.statements

## Class AlterTypeStatement

- 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.AlterTypeStatement

- All Implemented Interfaces:
    CQLStatement

      public abstract class AlterTypeStatement
      extends SchemaAlteringStatement

- - ### Nested Class Summary

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

      `ParsedStatement.Prepared`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected UTName` | `name`

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

      `cfName`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `AlterTypeStatement(UTName name)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static AlterTypeStatement` | `addition(UTName name, ColumnIdentifier fieldName, CQL3Type.Raw type)`
    `static AlterTypeStatement` | `alter(UTName name, ColumnIdentifier fieldName, CQL3Type.Raw type)`
    `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` | `keyspace()`
    `protected abstract UserType` | `makeUpdatedType(UserType toUpdate)`
    `void` | `prepareKeyspace(ClientState state)`
    `static AlterTypeStatement` | `renames(UTName name, java.util.Map<ColumnIdentifier,ColumnIdentifier> renames)`
    `void` | `validate(ClientState state)` Perform additional validation required by the statment.

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

      `execute, executeInternal, getBoundTerms, grantPermissionsToCreator, prepare`

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

      `columnFamily, prepareKeyspace`

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

      `getBoundVariables, getFunctions, setBoundVariables`

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

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

    - ### Methods inherited from interface org.apache.cassandra.cql3.CQLStatement

      `getFunctions`

- - ### Field Detail

    - #### name

          protected final UTName name

  - ### Constructor Detail

    - #### AlterTypeStatement

          protected AlterTypeStatement(UTName name)

  - ### Method Detail

    - #### prepareKeyspace

          public void prepareKeyspace(ClientState state)
                               throws InvalidRequestException

      Overrides:
        `prepareKeyspace` in class `SchemaAlteringStatement`
      Throws:
        `InvalidRequestException`

    - #### makeUpdatedType

          protected abstract UserType makeUpdatedType(UserType toUpdate)
                                               throws InvalidRequestException

      Throws:
        `InvalidRequestException`

    - #### addition

          public static AlterTypeStatement addition(UTName name,
                                                    ColumnIdentifier fieldName,
                                                    CQL3Type.Raw type)

    - #### alter

          public static AlterTypeStatement alter(UTName name,
                                                 ColumnIdentifier fieldName,
                                                 CQL3Type.Raw type)

    - #### renames

          public static AlterTypeStatement renames(UTName name,
                                                   java.util.Map<ColumnIdentifier,ColumnIdentifier> renames)

    - #### 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)
                        throws RequestValidationException

      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
      Throws:
        `RequestValidationException`

    - #### changeEvent

          public Event.SchemaChange changeEvent()

      Specified by:
        `changeEvent` in class `SchemaAlteringStatement`

    - #### keyspace

          public java.lang.String keyspace()

      Overrides:
        `keyspace` in class `CFStatement`

    - #### announceMigration

          public boolean announceMigration(boolean isLocalOnly)
                                    throws InvalidRequestException,
                                           ConfigurationException

      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:
        `InvalidRequestException`
        `ConfigurationException`

Copyright © 2018 The Apache Software Foundation