Java Code Examples for org.jooq.Field#equal()
The following examples show how to use
org.jooq.Field#equal() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: StaDateTimeWrapper.java From FROST-Server with GNU Lesser General Public License v3.0 | 4 votes |
private Condition specificOpBool(String op, StaDateTimeWrapper other) { Field<OffsetDateTime> t1 = field; Field<OffsetDateTime> t2 = other.field; switch (op) { case "=": return t1.equal(t2); case "!=": return t1.notEqual(t2); case ">": return t1.greaterThan(t2); case ">=": return t1.greaterOrEqual(t2); case "<": return t1.lessThan(t2); case "<=": return t1.lessOrEqual(t2); case "a": return t1.greaterThan(t2); case "b": return t1.lessThan(t2); case "c": throw new UnsupportedOperationException("First parameter of contains must be an interval."); case "m": return t1.equal(t2); case "o": return t1.equal(t2); case "s": return t1.equal(t2); case "f": return t1.equal(t2); default: throw new UnsupportedOperationException("Unknown boolean operation: " + op); } }
Example 2
Source File: StaDateTimeWrapper.java From FROST-Server with GNU Lesser General Public License v3.0 | 4 votes |
private Condition specificOpBool(String op, StaTimeIntervalWrapper other) { Field<OffsetDateTime> t1 = field; Field<OffsetDateTime> s2 = other.getStart(); Field<OffsetDateTime> e2 = other.getEnd(); switch (op) { case "=": return t1.equal(s2).and(t1.equal(e2)); case "!=": return t1.notEqual(s2).and(t1.notEqual(e2)); case ">": return t1.greaterOrEqual(e2).and(t1.greaterThan(s2)); case ">=": return t1.greaterOrEqual(e2); case "<": return t1.lessThan(s2); case "<=": return t1.lessOrEqual(s2); case "a": return t1.greaterOrEqual(e2).and(t1.greaterThan(s2)); case "b": return t1.lessThan(s2); case "c": throw new UnsupportedOperationException("First parameter of contains must be an interval."); case "m": return t1.equal(s2).or(t1.equal(e2)); case "o": return t1.equal(s2).or(s2.lessOrEqual(t1).and(e2.greaterThan(t1))); case "s": return t1.equal(s2); case "f": return t1.equal(e2); default: throw new UnsupportedOperationException("Unknown boolean operation: " + op); } }
Example 3
Source File: StaTimeIntervalWrapper.java From FROST-Server with GNU Lesser General Public License v3.0 | 4 votes |
private Condition specificOpBool(String op, StaDateTimeWrapper other) { Field<OffsetDateTime> s1 = start; Field<OffsetDateTime> e1 = end; Field<OffsetDateTime> t2 = other.getDateTime(); switch (op) { case "=": return s1.equal(t2).and(e1.equal(t2)); case "!=": return s1.notEqual(t2).and(e1.notEqual(t2)); case ">": return s1.greaterThan(t2); case ">=": return s1.greaterOrEqual(t2); case "<": return e1.lessOrEqual(t2).and(s1.lessThan(t2)); case "<=": return e1.lessOrEqual(t2); case "a": return s1.greaterThan(t2); case "b": return e1.lessOrEqual(t2).and(s1.lessThan(t2)); case "c": return s1.lessOrEqual(t2).and(e1.greaterThan(t2)); case "m": return s1.equal(t2).or(e1.equal(t2)); case "o": return s1.equal(t2).or(s1.lessOrEqual(t2).and(e1.greaterThan(t2))); case "s": return s1.equal(t2); case "f": return e1.equal(t2); default: throw new UnsupportedOperationException("Unknown boolean operation: " + op); } }
Example 4
Source File: StaTimeIntervalWrapper.java From FROST-Server with GNU Lesser General Public License v3.0 | 4 votes |
private Condition specificOpBool(String op, StaTimeIntervalWrapper other) { Field<OffsetDateTime> s1 = start; Field<OffsetDateTime> e1 = end; Field<OffsetDateTime> s2 = other.getStart(); Field<OffsetDateTime> e2 = other.getEnd(); switch (op) { case "=": return s1.equal(s2).and(e1.equal(e2)); case "!=": return s1.notEqual(s2).and(e1.notEqual(e2)); case ">": return s1.greaterOrEqual(e2).and(s1.greaterThan(s2)); case ">=": return s1.greaterOrEqual(s2).and(e1.greaterOrEqual(e2)); case "<": return e1.lessOrEqual(s2).and(s1.lessThan(s2)); case "<=": return s1.lessOrEqual(s2).and(e1.lessOrEqual(e2)); case "a": return s1.greaterOrEqual(e2).and(s1.greaterThan(s2)); case "b": return e1.lessOrEqual(s2).and(s1.lessThan(s2)); case "c": return s1.lessOrEqual(s2).and(e1.greaterThan(s2)).and(e1.greaterOrEqual(e2)); case "m": return s1.equal(e2).or(e1.equal(s2)); case "o": return s1.greaterOrEqual(e2).or(s2.greaterOrEqual(e1)).not().or(s1.equal(s2)); case "s": return s1.equal(s2); case "f": return e1.equal(e2); default: throw new UnsupportedOperationException("Unknown boolean operation: " + op); } }