Class TableIndexDescriptor

java.lang.Object
com.datastax.astra.client.tables.definition.indexes.TableIndexDescriptor

public class TableIndexDescriptor extends Object
Represents a descriptor for a table index, including the table's name and associated index options. This class is designed for use in scenarios such as serialization/deserialization with libraries like Jackson and for method chaining in fluent-style APIs.
  • Constructor Details

    • TableIndexDescriptor

      public TableIndexDescriptor()
      Default constructor for serialization/deserialization purposes.
    • TableIndexDescriptor

      public TableIndexDescriptor(String name)
      Constructs a TableIndexDescriptor with the specified table name.
      Parameters:
      name - the name of the table.
  • Method Details

    • name

      public TableIndexDescriptor name(String name)
      Sets the name of the table.
      Parameters:
      name - the name of the table.
      Returns:
      the current instance for method chaining.
    • definition

      public TableIndexDescriptor definition(TableIndexDefinition def)
      Sets the index definition for the table.
      Parameters:
      def - the TableIndexDefinition defining the index options for the table.
      Returns:
      the current instance for method chaining.
    • toString

      public String toString()
      Converts the object to a string using the RowSerializer.
      Overrides:
      toString in class Object
      Returns:
      a string representation of this TableIndexDescriptor.