Enum Class ReferentialAction

java.lang.Object
java.lang.Enum<ReferentialAction>
dev.frostlake.metastore.model.ReferentialAction
All Implemented Interfaces:
Serializable, Comparable<ReferentialAction>, Constable

public enum ReferentialAction extends Enum<ReferentialAction>
A foreign-key referential action (ON DELETE / ON UPDATE). Informational only — the engine records but does not enforce these. getSqlText() is the canonical DDL spelling (with spaces, e.g. "NO ACTION", not the enum's underscores).
  • Enum Constant Details

  • Method Details

    • values

      public static ReferentialAction[] 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 ReferentialAction 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
    • getSqlText

      public String getSqlText()
      The canonical SQL spelling used in DDL and SHOW output (e.g. "SET NULL").
    • fromString

      public static ReferentialAction fromString(String value)
      Parse a referential-action value case-insensitively; null/unrecognized → null (i.e. no action specified). Spaces and underscores are ignored so both spellings are accepted — the CREATE path yields "SET NULL" while the ALTER path's referentialOption().getText() yields "SETNULL"; both normalize here.