java.lang.Object
java.lang.Enum<TableOption>
org.springframework.data.cassandra.core.cql.keyspace.TableOption
All Implemented Interfaces:
Serializable, Comparable<TableOption>, Constable, Option

public enum TableOption extends Enum<TableOption> implements Option
Enumeration that represents all known table options. If a table option is not listed here, but is supported by Cassandra, use the method CreateTableSpecification.with(String, Object, boolean, boolean) to write the raw value. Implements Option via delegation, since Enums can't extend anything.
Author:
Matthew T. Adams, Mark Paluch, Mikhail Polivakha
See Also:
  • Enum Constant Details

    • COMMENT

      public static final TableOption COMMENT
      comment
    • COMPACT_STORAGE

      @Deprecated public static final TableOption COMPACT_STORAGE
      Deprecated.
      since 2.2. Cassandra 4.x has deprecated compact storage.
      COMPACT STORAGE
    • COMPACTION

      public static final TableOption COMPACTION
      compaction. Value is a Map<CompactionOption,Object>.
      See Also:
    • COMPRESSION

      public static final TableOption COMPRESSION
      compression. Value is a Map<CompressionOption,Object>.
      See Also:
    • CACHING

      public static final TableOption CACHING
      caching
      See Also:
    • BLOOM_FILTER_FP_CHANCE

      public static final TableOption BLOOM_FILTER_FP_CHANCE
      bloom_filter_fp_chance
    • READ_REPAIR_CHANCE

      public static final TableOption READ_REPAIR_CHANCE
      read_repair_chance
    • DCLOCAL_READ_REPAIR_CHANCE

      public static final TableOption DCLOCAL_READ_REPAIR_CHANCE
      dclocal_read_repair_chance
    • GC_GRACE_SECONDS

      public static final TableOption GC_GRACE_SECONDS
      gc_grace_seconds
  • Method Details

    • values

      public static TableOption[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static TableOption valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • valueOfIgnoreCase

      public static TableOption valueOfIgnoreCase(String optionName)
      Look up TableOption by name using case-insensitive lookups.
      Parameters:
      optionName - name of the option.
      Returns:
      the option.
      Throws:
      IllegalArgumentException - if the option cannot be determined.
      Since:
      4.1.1
    • getType

      public Class<?> getType()
      Description copied from interface: Option
      The type that values must be able to be coerced into for this option.
      Specified by:
      getType in interface Option
    • takesValue

      public boolean takesValue()
      Description copied from interface: Option
      Whether this option takes a value.
      Specified by:
      takesValue in interface Option
    • getName

      public String getName()
      Description copied from interface: Option
      The (usually lower-cased, underscore-separated) name of this table option.
      Specified by:
      getName in interface Option
    • escapesValue

      public boolean escapesValue()
      Description copied from interface: Option
      Whether this option should escape single quotes in its value.
      Specified by:
      escapesValue in interface Option
    • quotesValue

      public boolean quotesValue()
      Description copied from interface: Option
      Whether this option's value should be single-quoted.
      Specified by:
      quotesValue in interface Option
    • requiresValue

      public boolean requiresValue()
      Description copied from interface: Option
      Whether this option requires a value.
      Specified by:
      requiresValue in interface Option
    • checkValue

      public void checkValue(Object value)
      Description copied from interface: Option
      Checks that the given value can be coerced into the type given by Option.getType().
      Specified by:
      checkValue in interface Option
    • isCoerceable

      public boolean isCoerceable(Object value)
      Description copied from interface: Option
      Tests whether the given value can be coerced into the type given by Option.getType().
      Specified by:
      isCoerceable in interface Option
    • toString

      public String toString()
      Overrides:
      toString in class Enum<TableOption>
    • toString

      public String toString(@Nullable Object value)
      Description copied from interface: Option
      First ensures that the given value is coerceable into the type expected by this option, then returns the result of Object.toString() called on the given value. If this option is escaping quotes (Option.escapesValue() is true), then single quotes will be escaped, and if this option is quoting values ( Option.quotesValue() is true), then the value will be surrounded by single quotes. Given null, returns an empty string.
      Specified by:
      toString in interface Option
      See Also: