Class AlterUserTypeSpecification

java.lang.Object
org.springframework.data.cassandra.core.cql.keyspace.UserTypeNameSpecification
org.springframework.data.cassandra.core.cql.keyspace.AlterUserTypeSpecification
All Implemented Interfaces:
CqlSpecification

public class AlterUserTypeSpecification extends UserTypeNameSpecification implements CqlSpecification
Object to configure a ALTER TYPE specification.
Since:
1.5
Author:
Fabio J. Mendes, Mark Paluch
See Also:
  • CqlIdentifier
  • Method Details

    • alterType

      public static AlterUserTypeSpecification alterType(String typeName)
      Entry point into the AlterColumnSpecification's fluent API given typeName to alter a user type. Convenient if imported statically.
      Parameters:
      typeName - must not be null or empty.
      Returns:
      a new AlterUserTypeSpecification.
    • alterType

      public static AlterUserTypeSpecification alterType(com.datastax.oss.driver.api.core.CqlIdentifier typeName)
      Entry point into the AlterUserTypeSpecification's fluent API given typeName to alter a type. Convenient if imported statically.
      Parameters:
      typeName - must not be null.
      Returns:
      a new AlterUserTypeSpecification.
    • alterType

      public static AlterUserTypeSpecification alterType(@Nullable com.datastax.oss.driver.api.core.CqlIdentifier keyspace, com.datastax.oss.driver.api.core.CqlIdentifier typeName)
      Entry point into the AlterUserTypeSpecification's fluent API given typeName to alter a type. Convenient if imported statically. Uses the default keyspace if keyspace is null; otherwise, of the keyspace is not null, then the table name is prefixed with keyspace.
      Parameters:
      keyspace - can be null.
      typeName - must not be null.
      Returns:
      a new AlterUserTypeSpecification.
      Since:
      4.4
    • add

      public AlterUserTypeSpecification add(String field, com.datastax.oss.driver.api.core.type.DataType type)
      Adds an ADD to the list of field changes.
      Parameters:
      field - must not be null or empty.
      type - must not be null.
      Returns:
      this AlterUserTypeSpecification.
    • add

      public AlterUserTypeSpecification add(com.datastax.oss.driver.api.core.CqlIdentifier field, com.datastax.oss.driver.api.core.type.DataType type)
      Adds an ADD to the list of field changes.
      Parameters:
      field - must not be null.
      type - must not be null.
      Returns:
      this AlterUserTypeSpecification.
    • alter

      public AlterUserTypeSpecification alter(String field, com.datastax.oss.driver.api.core.type.DataType type)
      Adds an ALTER to the list of field changes.
      Parameters:
      field - must not be null or empty.
      type - must not be null.
      Returns:
      this AlterUserTypeSpecification.
    • alter

      public AlterUserTypeSpecification alter(com.datastax.oss.driver.api.core.CqlIdentifier field, com.datastax.oss.driver.api.core.type.DataType type)
      Adds an ALTER to the list of field changes.
      Parameters:
      field - must not be null.
      type - must not be null.
      Returns:
      this AlterUserTypeSpecification.
    • rename

      public AlterUserTypeSpecification rename(String from, String to)
      Adds an RENAME to the list of field changes.
      Parameters:
      from - must not be null or empty.
      to - must not be null or empty.
      Returns:
      this AlterUserTypeSpecification.
    • rename

      public AlterUserTypeSpecification rename(com.datastax.oss.driver.api.core.CqlIdentifier from, com.datastax.oss.driver.api.core.CqlIdentifier to)
      Adds an RENAME to the list of field changes.
      Parameters:
      from - must not be null.
      to - must not be null or empty.
      Returns:
      this AlterUserTypeSpecification.
    • getChanges

      public List<ColumnChangeSpecification> getChanges()
      Returns:
      an unmodifiable list of field changes.