Package org.hibernate.tool.schema
Enum Class SourceType
- All Implemented Interfaces:
Serializable
,Comparable<SourceType>
,Constable
Enumerates the various types of sources understood by the schema management
tooling.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe ORM metadata is used as the exclusive source generation of for DDL commands.Both the ORM metadata and external DDL scripts are used as sources for generation, with the commands from the external DDL script(s) being executed last.External DDL script(s) are used as the exclusive source for DDL commands.Both the O/M metadata and external DDL scripts are used as sources for generation, with the commands from the external DDL script(s) being executed first. -
Method Summary
Modifier and TypeMethodDescriptionstatic SourceType
interpret
(Object value, SourceType defaultValue) Used when processing JPA configuration to interpret the user config valuestatic SourceType
Returns the enum constant of this class with the specified name.static SourceType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
METADATA
The ORM metadata is used as the exclusive source generation of for DDL commands. -
SCRIPT
External DDL script(s) are used as the exclusive source for DDL commands.The scripts for schema creation and dropping come from different sources:
- The creation DDL script is identified by the setting "jakarta.persistence.schema-generation.create-script-source".
- The drop DDL script is identified by the setting "jakarta.persistence.schema-generation.drop-script-source".
-
METADATA_THEN_SCRIPT
Both the ORM metadata and external DDL scripts are used as sources for generation, with the commands from the external DDL script(s) being executed last. -
SCRIPT_THEN_METADATA
Both the O/M metadata and external DDL scripts are used as sources for generation, with the commands from the external DDL script(s) being executed first.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
interpret
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:
IllegalArgumentException
- If the incoming value is unrecognized
-