Enum DiscriminatorStrategy

  • All Implemented Interfaces:
    Serializable, Comparable<DiscriminatorStrategy>

    public enum DiscriminatorStrategy
    extends Enum<DiscriminatorStrategy>
    Representation of the values for discriminator "strategy".
    • VALUE_MAP where you define a value for each class, with no fallback default.
    • CLASS_NAME where the class name is used as the discriminator value
    • VALUE_MAP_ENTITY_NAME where you define a value for each class, but the fallback is the entity name when no value is provided.
    • Method Detail

      • values

        public static DiscriminatorStrategy[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (DiscriminatorStrategy c : DiscriminatorStrategy.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static DiscriminatorStrategy valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
        NullPointerException - if the argument is null
      • getDiscriminatorStrategy

        public static DiscriminatorStrategy getDiscriminatorStrategy​(String value)
        Accessor for the strategy
        Parameters:
        value - The string form
        Returns:
        The strategy