/** Creates an "NOT IN (..., ..., ...)" condition for this property. */ public WhereCondition notIn(Object... notInValues) { StringBuilder condition = new StringBuilder(" NOT IN ("); SqlUtils.appendPlaceholders(condition, notInValues.length).append(')'); return new PropertyCondition(this, condition.toString(), notInValues); }
/** Creates an "IS NOT NULL" condition for this property. */ public WhereCondition isNotNull() { return new PropertyCondition(this, " IS NOT NULL"); }
/** Creates an "less or equal ('<=')" condition for this property. */ public WhereCondition le(Object value) { return new PropertyCondition(this, "<=?", value); }
/** Creates an "greater than ('>')" condition for this property. */ public WhereCondition gt(Object value) { return new PropertyCondition(this, ">?", value); }
/** Creates an "not equal ('<>')" condition for this property. */ public WhereCondition notEq(Object value) { return new PropertyCondition(this, "<>?", value); }
/** Creates an "equal ('=')" condition for this property. */ public WhereCondition eq(Object value) { return new PropertyCondition(this, "=?", value); }
/** Creates an "IS NULL" condition for this property. */ public WhereCondition isNull() { return new PropertyCondition(this, " IS NULL"); }
/** Creates an "less than ('<')" condition for this property. */ public WhereCondition lt(Object value) { return new PropertyCondition(this, "<?", value); }
/** Creates an "NOT IN (..., ..., ...)" condition for this property. */ public WhereCondition notIn(Object... notInValues) { StringBuilder condition = new StringBuilder(" NOT IN ("); SqlUtils.appendPlaceholders(condition, notInValues.length).append(')'); return new PropertyCondition(this, condition.toString(), notInValues); }
/** Creates an "IN (..., ..., ...)" condition for this property. */ public WhereCondition in(Object... inValues) { StringBuilder condition = new StringBuilder(" IN ("); SqlUtils.appendPlaceholders(condition, inValues.length).append(')'); return new PropertyCondition(this, condition.toString(), inValues); }
private static Object[] checkValuesForType(Property property, Object[] values) { for (int i = 0; i < values.length; i++) { values[i] = checkValueForType(property, values[i]); } return values; }
/** Creates an "greater or equal ('>=')" condition for this property. */ public WhereCondition ge(Object value) { return new PropertyCondition(this, ">=?", value); }
/** Creates an "BETWEEN ... AND ..." condition for this property. */ public WhereCondition between(Object value1, Object value2) { Object[] values = { value1, value2 }; return new PropertyCondition(this, " BETWEEN ? AND ?", values); }
public PropertyCondition(Property property, String op, Object value) { super(checkValueForType(property, value)); this.property = property; this.op = op; }
/** Creates an "LIKE" condition for this property. */ public WhereCondition like(String value) { return new PropertyCondition(this, " LIKE ?", value); }
public PropertyCondition(Property property, String op, Object[] values) { super(checkValuesForType(property, values)); this.property = property; this.op = op; }
/** Creates an "less or equal ('<=')" condition for this property. */ public WhereCondition le(Object value) { return new PropertyCondition(this, "<=?", value); }
/** Creates an "LIKE" condition for this property. */ public WhereCondition like(String value) { return new PropertyCondition(this, " LIKE ?", value); }
/** Creates an "equal ('=')" condition for this property. */ public WhereCondition eq(Object value) { return new PropertyCondition(this, "=?", value); }
/** Creates an "IS NOT NULL" condition for this property. */ public WhereCondition isNotNull() { return new PropertyCondition(this, " IS NOT NULL"); }