程序包 me.magicall.db
Enum Class ConditionOperator
- 所有已实现的接口:
Serializable,Comparable<ConditionOperator>,Constable
负责构造where中的各种条件子句的格式
- 作者:
- MaGiCalL
-
嵌套类概要
从类继承的嵌套类/接口 java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
枚举常量概要
枚举常量 -
方法概要
修饰符和类型方法说明buildSqlUsingColumnName(StringBuilder sb, String resultColumnName, SqlValueHandler sqlValueHandler, List<?> refedValues) 拼接sqlfacadeValue(Object value) 修饰"值".此值最终会被用到sql.当以下情况时需要用此方法: 使用PrepareStatement写出如下sql : ...where name like ?boolean检查目标参数是否在参考值列表指定的范围之内static ConditionOperatorReturns the enum constant of this class with the specified name.static ConditionOperator[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
枚举常量详细资料
-
EQUALS
-
NOT_EQUALS
-
GT
-
GE
-
LT
-
LE
-
BETWEEN
-
IN
-
IS
-
IS_NOT
-
STARTS_WITH
-
ENDS_WITH
-
CONTAINS
-
NOT_IN
-
NOT_STARTS_WITH
-
NOT_ENDS_WITH
-
NOT_CONTAINS
-
-
方法详细资料
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- 返回:
- 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.)- 参数:
name- 要返回的枚举常量的名称。- 返回:
- 返回带有指定名称的枚举常量
- 抛出:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- 如果参数为空值
-
buildSqlUsingColumnName
public StringBuilder buildSqlUsingColumnName(StringBuilder sb, String resultColumnName, SqlValueHandler sqlValueHandler, List<?> refedValues) 拼接sql- 参数:
sb- 用来拼接sql的StringBuilderresultColumnName-sqlValueHandler- 处理sql中"值"部分的处理器.refedValues- 参考值列表- 返回:
-
facadeValue
修饰"值".此值最终会被用到sql.当以下情况时需要用此方法: 使用PrepareStatement写出如下sql : ...where name like ? 时,LIKE系列的ConditionOperator(STARTS_WITH、ENDS_WITH、CONTAINS……)会使用数据库通配符(%)替换sql占位符(?)- 参数:
value- 值- 返回:
-
isFit
检查目标参数是否在参考值列表指定的范围之内- 参数:
target- 需要检查的数据目标refedValues- 参考值列表- 返回:
-