/** * @return a {@link Criterion} that the field must be greater than the given value */ public Criterion gt(Object value) { return new BinaryCriterion(this, Operator.gt, value); }
@Override protected void populate(SqlBuilder builder, boolean forSqlValidation) { beforePopulateOperator(builder, forSqlValidation); populateOperator(builder.sql); afterPopulateOperator(builder, forSqlValidation); }
@Override protected void afterPopulateOperator(SqlBuilder builder, boolean forSqlValidation) { super.afterPopulateOperator(builder, forSqlValidation); builder.sql.append(" COLLATE NOCASE "); }
@Override public Criterion negate() { Operator contrary = operator.getContrary(); if (contrary != null) { return constructNegatedCriterion(contrary); } return super.negate(); }
@Override protected void populate(SqlBuilder builder, boolean forSqlValidation) { super.populate(builder, forSqlValidation); if (compiledOnce.compareAndSet(false, true)) { try { blockThread.release(); blockCriterion.acquire(); } catch (InterruptedException e) { fail("InterruptedException"); } } } };
@Override protected void afterPopulateOperator(SqlBuilder builder, boolean forSqlValidation) { super.afterPopulateOperator(builder, forSqlValidation); if (escape != '\0') { builder.sql.append(" ESCAPE ").append(SqlUtils.sanitizeStringAsLiteral(Character.toString(escape))); } }
@Override public Criterion negate() { Operator contrary = operator.getContrary(); if (contrary != null) { return constructNegatedCriterion(contrary); } return super.negate(); }
/** * @return a {@link Criterion} comparing the field to the given value using the IS NOT operator. */ public Criterion isNot(Object value) { return new BinaryCriterion(this, Operator.isNot, value); }
@Override protected void populate(SqlBuilder builder, boolean forSqlValidation) { beforePopulateOperator(builder, forSqlValidation); populateOperator(builder.sql); afterPopulateOperator(builder, forSqlValidation); }
@Override protected void afterPopulateOperator(SqlBuilder builder, boolean forSqlValidation) { super.afterPopulateOperator(builder, forSqlValidation); builder.sql.append(" COLLATE NOCASE "); }
/** * @return a {@link Criterion} that the any column matches the full-text query expression. This is only useful for * queries on virtual tables using fts3 or fts4. * @see <a href="http://www.sqlite.org/fts3.html#section_3">http://www.sqlite.org/fts3.html#section_3</a> */ public Criterion match(String value) { return new BinaryCriterion(anyColumn, Operator.match, value); }
@Override protected void afterPopulateOperator(SqlBuilder builder, boolean forSqlValidation) { super.afterPopulateOperator(builder, forSqlValidation); if (escape != '\0') { builder.sql.append(" ESCAPE ").append(SqlUtils.sanitizeStringAsLiteral(Character.toString(escape))); } }
/** * @return a {@link Criterion} that the property matches the full-text query expression. This is only useful for * queries on virtual tables using fts3 or fts4. * @see <a href="http://www.sqlite.org/fts3.html#section_3">http://www.sqlite.org/fts3.html#section_3</a> */ public Criterion match(String value) { return new BinaryCriterion(this, Operator.match, value); } }
/** * @return a {@link Criterion} that the field must be less than the given value */ public Criterion lt(Object value) { return new BinaryCriterion(this, Operator.lt, value); }
/** * @return a {@link Criterion} comparing the field to the given value using the IS operator. */ public Criterion is(Object value) { return new BinaryCriterion(this, Operator.is, value); }
/** * @return a {@link Criterion} that the field must be greater than or equal to the given value */ public Criterion gte(Object value) { return new BinaryCriterion(this, Operator.gte, value); }
/** * @return a {@link Criterion} that the field must be less than or equal to the given value */ public Criterion lte(Object value) { return new BinaryCriterion(this, Operator.lte, value); }
/** * @param value the pattern to compare against * @return a {@link Criterion} that the field matches the given pattern */ public Criterion glob(Object value) { return new BinaryCriterion(this, Operator.glob, value); }
/** * @param value the pattern to compare against * @return a {@link Criterion} that the field does not match the given pattern */ public Criterion notGlob(Object value) { return new BinaryCriterion(this, Operator.notGlob, value); }
protected BinaryCriterion constructNegatedCriterion(Operator negatedOperator) { return new BinaryCriterion(field, negatedOperator, value); } }