Enum Class QueryOption
- All Implemented Interfaces:
Serializable,Comparable<QueryOption>,Constable
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription替换现有在 in 或 not in 中 如果有效的参数条目 (指去除 null 后的) 为空 则跳过添加而不是报错 和SKIP_IF_NULL相同 是为了简化书写 其实际意义为参数中去除非法数值(为 null)后的列表长度是否为 0如果查询的参数值为 null 则跳过添加而不是报错 这里虽然叫做 SKIP_IF_NULL 但实际上表示的有效参数数量是不是和所接受的参数数量一致 只是为了简化书写使用 JSON 查询 注意和WhereType.JSON_CONTAINS一起使用时无效 因为WhereType.JSON_CONTAINS自己有针对 Json 的特殊实现使用原始名称 (不进行转换)注意只适用于 JSON_CONTAINS JSON_CONTAINS 默认会将值转换为 JSON 并去除为 value 为 null 的 字段 使用 原始值 时会将值 直接传递到 SQL 语句 若值为 实体类 则会转换为 JSON 不过 和默认情况相比, 转换的 JSON 会包含 value 为 null 的字段 -
Method Summary
Modifier and TypeMethodDescriptionstatic QueryOption.InfoofInfo(QueryOption... queryOptions) static QueryOptionReturns the enum constant of this class with the specified name.static QueryOption[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
REPLACE
替换现有 -
SKIP_IF_NULL
如果查询的参数值为 null 则跳过添加而不是报错 这里虽然叫做 SKIP_IF_NULL 但实际上表示的有效参数数量是不是和所接受的参数数量一致 只是为了简化书写 -
SKIP_IF_EMPTY_LIST
在 in 或 not in 中 如果有效的参数条目 (指去除 null 后的) 为空 则跳过添加而不是报错 和SKIP_IF_NULL相同 是为了简化书写 其实际意义为参数中去除非法数值(为 null)后的列表长度是否为 0 -
USE_ORIGINAL_NAME
使用原始名称 (不进行转换) -
USE_JSON_EXTRACT
使用 JSON 查询 注意和WhereType.JSON_CONTAINS一起使用时无效 因为WhereType.JSON_CONTAINS自己有针对 Json 的特殊实现 -
USE_ORIGINAL_VALUE
注意只适用于 JSON_CONTAINS JSON_CONTAINS 默认会将值转换为 JSON 并去除为 value 为 null 的 字段 使用 原始值 时会将值 直接传递到 SQL 语句 若值为 实体类 则会转换为 JSON 不过 和默认情况相比, 转换的 JSON 会包含 value 为 null 的字段
-
-
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
-
ofInfo
-