Class ComparisonPredicates

java.lang.Object
io.github.torand.fastersql.predicate.comparison.ComparisonPredicates

public final class ComparisonPredicates extends Object
Provides factory methods for comparison predicates.
  • Method Details

    • eq

      public static Eq eq(LeftOperand left, Object right)
      Creates an equivalence predicate taking a scalar value as right operand.
      Parameters:
      left - the left operand.
      right - the right operand.
      Returns:
      the predicate.
    • eq

      public static Eq eq(LeftOperand left, Expression right)
      Creates an equivalence predicate taking an expression as right operand.
      Parameters:
      left - the left operand.
      right - the right operand.
      Returns:
      the predicate.
    • ne

      public static Ne ne(LeftOperand left, Object right)
      Creates a non-equivalence predicate taking a scalar value as right operand.
      Parameters:
      left - the left operand.
      right - the right operand.
      Returns:
      the predicate.
    • ne

      public static Ne ne(LeftOperand left, Expression right)
      Creates a non-equivalence predicate taking an expression as right operand.
      Parameters:
      left - the left operand.
      right - the right operand.
      Returns:
      the predicate.
    • lt

      public static Lt lt(LeftOperand left, Object right)
      Creates a less than predicate taking a scalar value as right operand.
      Parameters:
      left - the left operand.
      right - the right operand.
      Returns:
      the predicate.
    • lt

      public static Lt lt(LeftOperand left, Expression right)
      Creates a less than predicate taking an expression as right operand.
      Parameters:
      left - the left operand.
      right - the right operand.
      Returns:
      the predicate.
    • le

      public static Le le(LeftOperand left, Object right)
      Creates a less than or equal predicate taking a scalar value as right operand.
      Parameters:
      left - the left operand.
      right - the right operand.
      Returns:
      the predicate.
    • le

      public static Le le(LeftOperand left, Expression right)
      Creates a less than or equal predicate taking an expression as right operand.
      Parameters:
      left - the left operand.
      right - the right operand.
      Returns:
      the predicate.
    • gt

      public static Gt gt(LeftOperand left, Object right)
      Creates a greater than predicate taking a scalar value as right operand.
      Parameters:
      left - the left operand.
      right - the right operand.
      Returns:
      the predicate.
    • gt

      public static Gt gt(LeftOperand left, Expression right)
      Creates a greater than predicate taking an expression as right operand.
      Parameters:
      left - the left operand.
      right - the right operand.
      Returns:
      the predicate.
    • ge

      public static Ge ge(LeftOperand left, Object right)
      Creates a greater than or equal predicate taking a scalar value as right operand.
      Parameters:
      left - the left operand.
      right - the right operand.
      Returns:
      the predicate.
    • ge

      public static Ge ge(LeftOperand left, Expression right)
      Creates a greater than or equal predicate taking an expression as right operand.
      Parameters:
      left - the left operand.
      right - the right operand.
      Returns:
      the predicate.
    • between

      public static Between between(LeftOperand left, Object lowerBound, Object upperBound)
      Creates a between predicate taking scalar values as lower and upper bound operands.
      Parameters:
      left - the left operand.
      lowerBound - the lower bound operand.
      upperBound - the upper bound operand.
      Returns:
      the predicate.
    • between

      public static Between between(LeftOperand left, Expression lowerBound, Expression upperBound)
      Creates a between predicate taking expressions as lower and upper bound operands.
      Parameters:
      left - the left operand.
      lowerBound - the lower bound operand.
      upperBound - the upper bound operand.
      Returns:
      the predicate.