Class OperatorSpecRegistry

java.lang.Object
nl.datasteel.crudcraft.codegen.writer.search.OperatorSpecRegistry

public final class OperatorSpecRegistry extends Object
Utility class that provides static methods to retrieve operator specifications based on the SearchOperator enum. This class is used to encapsulate the logic for determining the type of operator and returning the corresponding OperatorSpec.
  • Method Details

    • value

      public static OperatorSpec value()
      Returns ValueOperatorSpec for operators that involve value checks.
    • range

      public static OperatorSpec range()
      Returns ContainsOperatorSpec for operators that involve containment checks.
    • size

      public static OperatorSpec size()
      Returns ContainsOperatorSpec for operators that involve size checks.
    • isRangeOperator

      public static boolean isRangeOperator(SearchOperator op)
      Checks if the given operator is a range operator.
    • isSizeOperator

      public static boolean isSizeOperator(SearchOperator op)
      Checks if the given operator is a size operator.
    • isValueOperator

      public static boolean isValueOperator(SearchOperator op)
      Checks if the given operator is a value operator. Value operators are those that do not involve range or size checks, and are not related to emptiness checks.