本文整理匯總了Java中org.jooq.TableField.gt方法的典型用法代碼示例。如果您正苦於以下問題:Java TableField.gt方法的具體用法?Java TableField.gt怎麽用?Java TableField.gt使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.jooq.TableField
的用法示例。
在下文中一共展示了TableField.gt方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: toCondition
import org.jooq.TableField; //導入方法依賴的package包/類
protected static org.jooq.Condition toCondition(TableField<?, Object> field, Condition value) {
Condition condition = value;
switch (condition.getConditionType()) {
case EQ:
return field.eq(condition.getValue());
case GT:
return field.gt(condition.getValue());
case GTE:
return field.ge(condition.getValue());
case IN:
List<Object> values = condition.getValues();
if ( values.size() == 1 ) {
return field.eq(values.get(0));
} else {
return field.in(condition.getValues());
}
case LIKE:
return field.like(condition.getValue().toString());
case LT:
return field.lt(condition.getValue());
case LTE:
return field.le(condition.getValue());
case NE:
return field.ne(condition.getValue());
case NOTLIKE:
return field.notLike(condition.getValue().toString());
case NOTNULL:
return field.isNotNull();
case NULL:
return field.isNull();
case PREFIX:
return field.like(condition.getValue() + "%");
case OR:
return toCondition(field, condition.getLeft()).or(toCondition(field, condition.getRight()));
default:
throw new IllegalArgumentException("Invalid condition type [" + condition.getConditionType() + "]");
}
}
示例2: toCondition
import org.jooq.TableField; //導入方法依賴的package包/類
protected static org.jooq.Condition toCondition(TableField<?, Object> field, Condition value) {
Condition condition = value;
switch (condition.getConditionType()) {
case EQ:
return field.eq(condition.getValue());
case GT:
return field.gt(condition.getValue());
case GTE:
return field.ge(condition.getValue());
case IN:
List<Object> values = condition.getValues();
if (values.size() == 1) {
return field.eq(values.get(0));
} else {
return field.in(condition.getValues());
}
case NOTIN:
List<Object> vals = condition.getValues();
if (vals.size() == 1) {
return field.ne(vals.get(0));
} else {
return field.notIn(condition.getValues());
}
case LIKE:
return field.like(condition.getValue().toString());
case LT:
return field.lt(condition.getValue());
case LTE:
return field.le(condition.getValue());
case NE:
return field.ne(condition.getValue());
case NOTLIKE:
return field.notLike(condition.getValue().toString());
case NOTNULL:
return field.isNotNull();
case NULL:
return field.isNull();
case PREFIX:
return field.like(condition.getValue() + "%");
case OR:
return toCondition(field, condition.getLeft()).or(toCondition(field, condition.getRight()));
default:
throw new IllegalArgumentException("Invalid condition type [" + condition.getConditionType() + "]");
}
}