public enum GenerationType extends Enum<GenerationType>
| Enum Constant and Description |
|---|
AUTO
使用数据库自增策略进行自增;
比如mysql的自增策略,oracle触发器自增策略。
|
SEQUENCE
使用序列进行自增,当使用序列类型自增时,需要执行序列名。目前已验证的仅Oracle支持
|
| Modifier and Type | Method and Description |
|---|---|
static GenerationType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static GenerationType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final GenerationType AUTO
public static final GenerationType SEQUENCE
GeneratedValue.sequenceName()public static GenerationType[] values()
for (GenerationType c : GenerationType.values()) System.out.println(c);
public static GenerationType valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2024–2025 Dynamic-SQL. All rights reserved.