/** SQL <code>></code> operator applied to Object values (at least one * operand has ANY type; neither may be null). */ public static boolean gtAny(Object b0, Object b1) { if (b0.getClass().equals(b1.getClass()) && b0 instanceof Comparable) { //noinspection unchecked return ((Comparable) b0).compareTo(b1) > 0; } else if (allAssignable(Number.class, b0, b1)) { return gt(toBigDecimal((Number) b0), toBigDecimal((Number) b1)); } throw notComparable(">", b0, b1); }
/** SQL <code>></code> operator applied to Object values (at least one * operand has ANY type; neither may be null). */ public static boolean gtAny(Object b0, Object b1) { if (b0.getClass().equals(b1.getClass()) && b0 instanceof Comparable) { //noinspection unchecked return ((Comparable) b0).compareTo(b1) > 0; } else if (allAssignable(Number.class, b0, b1)) { return gt(toBigDecimal((Number) b0), toBigDecimal((Number) b1)); } throw notComparable(">", b0, b1); }
/** SQL <code><</code> operator applied to Object values. */ public static boolean ltAny(Object b0, Object b1) { if (b0.getClass().equals(b1.getClass()) && b0 instanceof Comparable) { //noinspection unchecked return ((Comparable) b0).compareTo(b1) < 0; } else if (allAssignable(Number.class, b0, b1)) { return lt(toBigDecimal((Number) b0), toBigDecimal((Number) b1)); } throw notComparable("<", b0, b1); }
/** SQL <code>≥</code> operator applied to Object values (at least one * operand has ANY type; neither may be null). */ public static boolean geAny(Object b0, Object b1) { if (b0.getClass().equals(b1.getClass()) && b0 instanceof Comparable) { //noinspection unchecked return ((Comparable) b0).compareTo(b1) >= 0; } else if (allAssignable(Number.class, b0, b1)) { return ge(toBigDecimal((Number) b0), toBigDecimal((Number) b1)); } throw notComparable(">=", b0, b1); }
/** SQL <code>≥</code> operator applied to Object values (at least one * operand has ANY type; neither may be null). */ public static boolean geAny(Object b0, Object b1) { if (b0.getClass().equals(b1.getClass()) && b0 instanceof Comparable) { //noinspection unchecked return ((Comparable) b0).compareTo(b1) >= 0; } else if (allAssignable(Number.class, b0, b1)) { return ge(toBigDecimal((Number) b0), toBigDecimal((Number) b1)); } throw notComparable(">=", b0, b1); }
/** SQL <code>≤</code> operator applied to Object values (at least one * operand has ANY type; neither may be null). */ public static boolean leAny(Object b0, Object b1) { if (b0.getClass().equals(b1.getClass()) && b0 instanceof Comparable) { //noinspection unchecked return ((Comparable) b0).compareTo(b1) <= 0; } else if (allAssignable(Number.class, b0, b1)) { return le(toBigDecimal((Number) b0), toBigDecimal((Number) b1)); } throw notComparable("<=", b0, b1); }
/** SQL <code><</code> operator applied to Object values. */ public static boolean ltAny(Object b0, Object b1) { if (b0.getClass().equals(b1.getClass()) && b0 instanceof Comparable) { //noinspection unchecked return ((Comparable) b0).compareTo(b1) < 0; } else if (allAssignable(Number.class, b0, b1)) { return lt(toBigDecimal((Number) b0), toBigDecimal((Number) b1)); } throw notComparable("<", b0, b1); }
/** SQL <code>≤</code> operator applied to Object values (at least one * operand has ANY type; neither may be null). */ public static boolean leAny(Object b0, Object b1) { if (b0.getClass().equals(b1.getClass()) && b0 instanceof Comparable) { //noinspection unchecked return ((Comparable) b0).compareTo(b1) <= 0; } else if (allAssignable(Number.class, b0, b1)) { return le(toBigDecimal((Number) b0), toBigDecimal((Number) b1)); } throw notComparable("<=", b0, b1); }
/** SQL <code><</code> operator applied to Object values. */ public static boolean ltAny(Object b0, Object b1) { if (b0.getClass().equals(b1.getClass()) && b0 instanceof Comparable) { //noinspection unchecked return ((Comparable) b0).compareTo(b1) < 0; } else if (allAssignable(Number.class, b0, b1)) { return lt(toBigDecimal((Number) b0), toBigDecimal((Number) b1)); } throw notComparable("<", b0, b1); }
/** SQL <code>≥</code> operator applied to Object values (at least one * operand has ANY type; neither may be null). */ public static boolean geAny(Object b0, Object b1) { if (b0.getClass().equals(b1.getClass()) && b0 instanceof Comparable) { //noinspection unchecked return ((Comparable) b0).compareTo(b1) >= 0; } else if (allAssignable(Number.class, b0, b1)) { return ge(toBigDecimal((Number) b0), toBigDecimal((Number) b1)); } throw notComparable(">=", b0, b1); }
/** SQL <code>></code> operator applied to Object values (at least one * operand has ANY type; neither may be null). */ public static boolean gtAny(Object b0, Object b1) { if (b0.getClass().equals(b1.getClass()) && b0 instanceof Comparable) { //noinspection unchecked return ((Comparable) b0).compareTo(b1) > 0; } else if (allAssignable(Number.class, b0, b1)) { return gt(toBigDecimal((Number) b0), toBigDecimal((Number) b1)); } throw notComparable(">", b0, b1); }
/** SQL <code>+</code> operator applied to Object values (at least one operand * has ANY type; either may be null). */ public static Object plusAny(Object b0, Object b1) { if (b0 == null || b1 == null) { return null; } if (allAssignable(Number.class, b0, b1)) { return plus(toBigDecimal((Number) b0), toBigDecimal((Number) b1)); } throw notArithmetic("+", b0, b1); }
/** SQL <code>+</code> operator applied to Object values (at least one operand * has ANY type; either may be null). */ public static Object plusAny(Object b0, Object b1) { if (b0 == null || b1 == null) { return null; } if (allAssignable(Number.class, b0, b1)) { return plus(toBigDecimal((Number) b0), toBigDecimal((Number) b1)); } throw notArithmetic("+", b0, b1); }
/** SQL <code>*</code> operator applied to Object values (at least one operand * has ANY type; either may be null). */ public static Object multiplyAny(Object b0, Object b1) { if (b0 == null || b1 == null) { return null; } if (allAssignable(Number.class, b0, b1)) { return multiply(toBigDecimal((Number) b0), toBigDecimal((Number) b1)); } throw notArithmetic("*", b0, b1); }
/** SQL <code>-</code> operator applied to Object values (at least one operand * has ANY type; either may be null). */ public static Object minusAny(Object b0, Object b1) { if (b0 == null || b1 == null) { return null; } if (allAssignable(Number.class, b0, b1)) { return minus(toBigDecimal((Number) b0), toBigDecimal((Number) b1)); } throw notArithmetic("-", b0, b1); }
/** SQL <code>/</code> operator applied to Object values (at least one operand * has ANY type; either may be null). */ public static Object divideAny(Object b0, Object b1) { if (b0 == null || b1 == null) { return null; } if (allAssignable(Number.class, b0, b1)) { return divide(toBigDecimal((Number) b0), toBigDecimal((Number) b1)); } throw notArithmetic("/", b0, b1); }
/** SQL <code>*</code> operator applied to Object values (at least one operand * has ANY type; either may be null). */ public static Object multiplyAny(Object b0, Object b1) { if (b0 == null || b1 == null) { return null; } if (allAssignable(Number.class, b0, b1)) { return multiply(toBigDecimal((Number) b0), toBigDecimal((Number) b1)); } throw notArithmetic("*", b0, b1); }
/** SQL <code>+</code> operator applied to Object values (at least one operand * has ANY type; either may be null). */ public static Object plusAny(Object b0, Object b1) { if (b0 == null || b1 == null) { return null; } if (allAssignable(Number.class, b0, b1)) { return plus(toBigDecimal((Number) b0), toBigDecimal((Number) b1)); } throw notArithmetic("+", b0, b1); }
/** SQL <code>-</code> operator applied to Object values (at least one operand * has ANY type; either may be null). */ public static Object minusAny(Object b0, Object b1) { if (b0 == null || b1 == null) { return null; } if (allAssignable(Number.class, b0, b1)) { return minus(toBigDecimal((Number) b0), toBigDecimal((Number) b1)); } throw notArithmetic("-", b0, b1); }
/** SQL <code>/</code> operator applied to Object values (at least one operand * has ANY type; either may be null). */ public static Object divideAny(Object b0, Object b1) { if (b0 == null || b1 == null) { return null; } if (allAssignable(Number.class, b0, b1)) { return divide(toBigDecimal((Number) b0), toBigDecimal((Number) b1)); } throw notArithmetic("/", b0, b1); }