Class ColumnDefinition

java.lang.Object
com.datastax.astra.client.tables.definition.columns.ColumnDefinition
Direct Known Subclasses:
ColumnDefinitionList, ColumnDefinitionMap, ColumnDefinitionSet, ColumnDefinitionVector

public class ColumnDefinition extends Object
Represents a column definition in a database schema.

This class encapsulates the type of the column and its associated API support configurations, providing a structure for managing column-specific details.

The class uses Lombok annotations to automatically generate getter, setter, and no-argument constructor methods.

Fields:

Constructors:

  • A no-argument constructor for creating a default instance of the class.
  • A parameterized constructor for initializing the column definition with a specified type.

Example usage:

 
 ColumnTypes columnType = ColumnTypes.STRING;
 ColumnDefinition columnDefinition = new ColumnDefinition(columnType);

 columnDefinition.setApiSupport(new ColumnDefinitionApiSupport());
 columnDefinition.getApiSupport().setCreateTable(true);
 columnDefinition.getApiSupport().setInsert(false);

 System.out.println(columnDefinition);
 
 
  • Constructor Details

    • ColumnDefinition

      public ColumnDefinition()
      Default constructor.
    • ColumnDefinition

      public ColumnDefinition(ColumnTypes type)
      Constructor with type.
      Parameters:
      type - the column type
  • Method Details