程序包 me.magicall.db

Enum Class ConditionOperator

java.lang.Object
java.lang.Enum<ConditionOperator>
me.magicall.db.ConditionOperator
所有已实现的接口:
Serializable, Comparable<ConditionOperator>, Constable

public enum ConditionOperator extends Enum<ConditionOperator>
负责构造where中的各种条件子句的格式
作者:
MaGiCalL
  • 枚举常量详细资料

  • 方法详细资料

    • values

      public static ConditionOperator[] 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

      public static ConditionOperator valueOf(String name)
      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 name
      NullPointerException - 如果参数为空值
    • buildSqlUsingColumnName

      public StringBuilder buildSqlUsingColumnName(StringBuilder sb, String resultColumnName, SqlValueHandler sqlValueHandler, List<?> refedValues)
      拼接sql
      参数:
      sb - 用来拼接sql的StringBuilder
      resultColumnName -
      sqlValueHandler - 处理sql中"值"部分的处理器.
      refedValues - 参考值列表
      返回:
    • facadeValue

      public Object facadeValue(Object value)
      修饰"值".此值最终会被用到sql.当以下情况时需要用此方法: 使用PrepareStatement写出如下sql : ...where name like ? 时,LIKE系列的ConditionOperator(STARTS_WITH、ENDS_WITH、CONTAINS……)会使用数据库通配符(%)替换sql占位符(?)
      参数:
      value - 值
      返回:
    • isFit

      public boolean isFit(Object target, List<?> refedValues)
      检查目标参数是否在参考值列表指定的范围之内
      参数:
      target - 需要检查的数据目标
      refedValues - 参考值列表
      返回: