Package st.orm

Enum Class Polymorphic.Strategy

All Implemented Interfaces:
Serializable, Comparable<Polymorphic.Strategy>, Constable
Enclosing class:
Polymorphic

public static enum Polymorphic.Strategy extends Enum<Polymorphic.Strategy>
The inheritance strategies for sealed entity hierarchies.
  • Enum Constant Details

    • SINGLE_TABLE

      public static final Polymorphic.Strategy SINGLE_TABLE
      All subtypes share a single database table with a discriminator column. Subtype-specific columns are NULL for rows of other subtypes.
    • JOINED

      public static final Polymorphic.Strategy JOINED
      A base table holds shared fields and each subtype has its own extension table with subtype-specific fields, linked by the primary key. A Discriminator column in the base table is optional: when present, Storm reads the discriminator value directly; when absent, Storm resolves the concrete type at query time by generating an expression that checks which extension table has a matching row.
  • Method Details

    • values

      public static Polymorphic.Strategy[] 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 Polymorphic.Strategy 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