12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- package org.jeecg.common.system.query;
- import org.jeecg.common.util.oConvertUtils;
- /**
- * 查询链接规则
- *
- * @Author Sunjianlei
- */
- public enum MatchTypeEnum {
- AND("AND"),
- OR("OR");
- private String value;
- MatchTypeEnum(String value) {
- this.value = value;
- }
- public String getValue() {
- return value;
- }
- public static MatchTypeEnum getByValue(Object value) {
- if (oConvertUtils.isEmpty(value)) {
- return null;
- }
- return getByValue(value.toString());
- }
- public static MatchTypeEnum getByValue(String value) {
- if (oConvertUtils.isEmpty(value)) {
- return null;
- }
- for (MatchTypeEnum val : values()) {
- if (val.getValue().toLowerCase().equals(value.toLowerCase())) {
- return val;
- }
- }
- return null;
- }
- }
|