Enum Class CompareOp

java.lang.Object
java.lang.Enum<CompareOp>
com.midi.his.sdk.query.CompareOp
所有已实现的接口:
Serializable, Comparable<CompareOp>, Constable

public enum CompareOp extends Enum<CompareOp>
查询比较符,写入报文 MsgInfo/query/@compy。

定义书列出 > < >= <= like,实测样例还用到 = 与 is (配 not null 值)。平台把这一段直接拼进视图过滤条件,因此取值必须来自本枚举, 不接受调用方自由拼接,避免条件注入。

  • 枚举常量详细资料

    • EQ

      public static final CompareOp EQ
      等于。
    • NE

      public static final CompareOp NE
      不等于,平台按视图条件表达式处理。
    • GT

      public static final CompareOp GT
      大于。
    • GE

      public static final CompareOp GE
      大于等于。
    • LT

      public static final CompareOp LT
      小于。
    • LE

      public static final CompareOp LE
      小于等于。
    • LIKE

      public static final CompareOp LIKE
      模糊匹配,值需要自带通配符 %。
    • IS

      public static final CompareOp IS
      空值判断,配合 QuerySpec.notNull(item) / QuerySpec.isNull(item) 使用,不追加值引号。
    • IS_NOT_NULL

      public static final CompareOp IS_NOT_NULL
      非空判断,等价 is not null。
  • 方法详细资料

    • values

      public static CompareOp[] 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 CompareOp 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 - 如果参数为空值
    • literal

      public String literal()
      返回:
      写入 compy 属性的字面值,前后各留一个空格以贴近样例报文
    • valueRequired

      public boolean valueRequired()
      返回:
      该比较符是否需要在 value 中给出比较值
    • parse

      public static CompareOp parse(String raw)
      按字面值解析,支持 "="、"eq"、">="、"like" 等写法。
      参数:
      raw - 原文
      返回:
      对应枚举
      抛出:
      IllegalArgumentException - 未支持的字面值