use of com.revolsys.record.query.Condition in project com.revolsys.open by revolsys.
the class QueryValueTest method testIn.
private void testIn() {
final Condition trueCondition1 = Q.in(this.idField, 10, 11);
assertConditionTrue(trueCondition1, this.record);
final Condition trueCondition2 = Q.in(this.idField, "10");
assertConditionTrue(trueCondition2, this.record);
final Condition falseCondition1 = Q.in(this.idField, 11);
assertConditionFalse(falseCondition1, this.record);
}
use of com.revolsys.record.query.Condition in project com.revolsys.open by revolsys.
the class QueryValueTest method testNotEqual.
private void testNotEqual() {
final Condition trueCondition1 = Q.notEqual(this.idField, 11);
assertConditionTrue(trueCondition1, this.record);
final Condition trueCondition2 = Q.notEqual(this.idField, "11");
assertConditionTrue(trueCondition2, this.record);
final Condition falseCondition1 = Q.notEqual(this.idField, 10);
assertConditionFalse(falseCondition1, this.record);
}
use of com.revolsys.record.query.Condition in project com.revolsys.open by revolsys.
the class QueryValueTest method testBetween.
private void testBetween() {
final Condition trueCondition1 = Q.between(this.idField, 9, 10);
assertConditionTrue(trueCondition1, this.record);
final Condition trueCondition2 = Q.between(this.idField, 10, 10);
assertConditionTrue(trueCondition2, this.record);
final Condition trueCondition3 = Q.between(this.idField, 10, 11);
assertConditionTrue(trueCondition3, this.record);
final Condition trueCondition4 = Q.between(this.idField, 9, 10);
assertConditionTrue(trueCondition4, this.record);
final Condition falseCondition1 = Q.between(this.idField, 11, 12);
assertConditionFalse(falseCondition1, this.record);
}
use of com.revolsys.record.query.Condition in project com.revolsys.open by revolsys.
the class QueryValueTest method testAnd.
private void testAnd() {
final Condition trueCondition1 = Q.and(Q.equal(this.idField, 10));
assertConditionTrue(trueCondition1, this.record);
final Condition trueCondition2 = Q.and(Q.equal(this.idField, 10), Q.equal(this.nameAttribute, "foobar"));
assertConditionTrue(trueCondition2, this.record);
final Condition falseCondition1 = Q.and(Q.equal(this.idField, 10), Q.equal(this.nameAttribute, "foobar1"));
assertConditionFalse(falseCondition1, this.record);
}
use of com.revolsys.record.query.Condition in project com.revolsys.open by revolsys.
the class QueryValueTest method testNot.
private void testNot() {
final Condition trueCondition1 = Q.not(Q.equal(this.idField, 11));
assertConditionTrue(trueCondition1, this.record);
final Condition falseCondition1 = Q.not(Q.equal(this.idField, 10));
assertConditionFalse(falseCondition1, this.record);
}
Aggregations