枚举 SourceType
- java.lang.Object
-
- java.lang.Enum<SourceType>
-
- org.hibernate.tool.schema.SourceType
-
- 所有已实现的接口:
Serializable,Comparable<SourceType>
public enum SourceType extends Enum<SourceType>
Enumeration of the various types of sources understood by various SchemaManagementTooling delegates.- 作者:
- Steve Ebersole
- 另请参阅:
AvailableSettings.HBM2DDL_CREATE_SOURCE,AvailableSettings.HBM2DDL_DROP_SOURCE
-
-
枚举常量概要
枚举常量 枚举常量 说明 METADATA"metadata" - The O/RM metadata is used as the exclusive source for generationMETADATA_THEN_SCRIPT"metadata-then-scripts" - 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"scripts-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
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static SourceTypeinterpret(Object value, SourceType defaultValue)Used when processing JPA configuration to interpret the user config valuestatic SourceTypevalueOf(String name)返回带有指定名称的该类型的枚举常量。static SourceType[]values()按照声明该枚举类型的常量的顺序, 返回 包含这些常量的数组。
-
-
-
枚举常量详细资料
-
METADATA
public static final SourceType METADATA
"metadata" - The O/RM metadata is used as the exclusive source for generation
-
SCRIPT
public static final SourceType SCRIPT
"script" - External DDL script(s) are used as the exclusive source for generation. The scripts for schema creation and dropping come from different sources. The creation DDL script is identified by the "javax.persistence.schema-generation.create-script-source" setting; the drop DDL script is identified by the "javax.persistence.schema-generation.drop-script-source" setting.
-
METADATA_THEN_SCRIPT
public static final SourceType METADATA_THEN_SCRIPT
"metadata-then-scripts" - Both the O/RM metadata and external DDL scripts are used as sources for generation, with the O/RM metadata being applied first.
-
SCRIPT_THEN_METADATA
public static final SourceType SCRIPT_THEN_METADATA
"scripts-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
-
-
方法详细资料
-
values
public static SourceType[] values()
按照声明该枚举类型的常量的顺序, 返回 包含这些常量的数组。该方法可用于迭代 常量, 如下所示:for (SourceType c : SourceType.values()) System.out.println(c);
- 返回:
- 按照声明该枚举类型的常量的顺序返回的包含这些常量的数组
-
valueOf
public static SourceType valueOf(String name)
返回带有指定名称的该类型的枚举常量。 字符串必须与用于声明该类型的枚举常量的 标识符完全匹配。(不允许有多余 的空格字符。)- 参数:
name- 要返回的枚举常量的名称。- 返回:
- 返回带有指定名称的枚举常量
- 抛出:
IllegalArgumentException- 如果该枚举类型没有带有指定名称的常量NullPointerException- 如果参数为空值
-
interpret
public static SourceType interpret(Object value, SourceType defaultValue)
Used when processing JPA configuration to interpret the user config value- 参数:
value- The encountered user config value- 返回:
- The matching enum value. An empty value will return
null. - 抛出:
IllegalArgumentException- If the incoming value is unrecognized
-
-