Enum SourceType

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      METADATA
      "metadata" - The O/RM metadata is used as the exclusive source for generation
      METADATA_THEN_SCRIPT
      "metadata-then-script" - Both the O/RM metadata and external DDL scripts are used as sources for generation, with the O/RM metadata being applied first.
      SCRIPT
      "script" - External DDL script(s) are used as the exclusive source for generation.
      SCRIPT_THEN_METADATA
      "script-then-metadata" - Both the O/RM metadata and external DDL scripts are used as sources for generation, with the commands from the external DDL script(s) being applied first
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static SourceType interpret​(java.lang.Object value, SourceType defaultValue)
      Used when processing JPA configuration to interpret the user config value
      static SourceType valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static SourceType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • values

        public static SourceType[] 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 (SourceType c : SourceType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static SourceType valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • interpret

        public static SourceType interpret​(java.lang.Object value,
                                           SourceType defaultValue)
        Used when processing JPA configuration to interpret the user config value
        Parameters:
        value - The encountered user config value
        Returns:
        The matching enum value. An empty value will return null.
        Throws:
        java.lang.IllegalArgumentException - If the incoming value is unrecognized