public enum FieldStrategy extends Enum<FieldStrategy>
如果字段是基本数据类型则最终效果等同于 ALWAYS
| 枚举常量和说明 |
|---|
ALWAYS
任何时候都加入 SQL
|
DEFAULT
默认的,一般只用于注解里
1.
|
NEVER
不加入 SQL
|
NOT_EMPTY
非空判断(只对字符串类型字段,其他类型字段依然为非NULL判断)
|
NOT_NULL
非NULL判断
|
public static final FieldStrategy ALWAYS
public static final FieldStrategy NOT_NULL
public static final FieldStrategy NOT_EMPTY
public static final FieldStrategy DEFAULT
1. 在全局里代表 NOT_NULL
2. 在注解里代表 跟随全局
public static final FieldStrategy NEVER
public static FieldStrategy[] values()
for (FieldStrategy c : FieldStrategy.values()) System.out.println(c);
public static FieldStrategy valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值Copyright © 2024. All rights reserved.