Class GenericQuery.GenericBuilder.FilterOpLiteral

java.lang.Object
com.appiancorp.common.query.GenericQuery.GenericBuilder.FilterOpLiteral
Enclosing class:
GenericQuery.GenericBuilder

public static final class GenericQuery.GenericBuilder.FilterOpLiteral extends Object

This class is available as a preview of functionality that will be added to the supported public API in a future release. While it is in the preview phase, it is subject to change or removal without deprecation or notice. Although notice of change is not guaranteed, we will try to let developers know of major changes through announcements in release notes.

This class encapsulates the available filters and allows to specify an specific value to filter by.

  • Constructor Details

    • FilterOpLiteral

      public FilterOpLiteral()
  • Method Details

    • filter

      public static Filter<Object> filter(String c, FilterOperator fo, Object v)
      Creates a GenericFilter instance with the given values.
      Parameters:
      c - column or alias name
      fo - filter type define as FilterOperator
      v - Object use to constraint the column or alias
      Returns:
      a Filter<Object> constraint instance
    • equal

      public static Filter<Object> equal(String c, Object v)
      Apply an equality constraint to the given column or alias
      Parameters:
      c - column or alias
      v - Object use to constraint the column or alias
      Returns:
      a Filter<Object> "equals" constraint
    • eq

      public static Filter<Object> eq(String c, Object v)
      Apply an equality constraint to the given column or alias
      Parameters:
      c - column or alias
      v - Object use to constraint the column or alias
      Returns:
      a Filter<Object> "equals" constraint
    • isNull

      public static Filter<Object> isNull(String c)
      Apply an "is null" constraint to the given column or alias
      Parameters:
      c - column or alias
      Returns:
      a Filter<Object> "is null" constraint
    • startsWith

      public static Filter<Object> startsWith(String c, String prefix)
      Apply a "starts with" constraint to the given column or alias Checks if starts with the given prefix. Applies to string values.
      Parameters:
      c - column or alias
      prefix - the prefix
      Returns:
      a Filter<Object> "starts with" constraint
    • endsWith

      public static Filter<Object> endsWith(String c, String sufix)
      Apply a "ends with" constraint to the given column or alias Checks if ends with the given suffix. Applies to string values.
      Parameters:
      c - column or alias
      sufix - the suffix
      Returns:
      a Filter<Object> "ends with" constraint
    • includes

      public static Filter<Object> includes(String c, String infix)
      Apply a "includes" constraint to the given column or alias Checks if it contains the given substring. Applies to string values.
      Parameters:
      c - column or alias
      substring - the substring
      Returns:
      a Filter<Object> "includes" constraint
    • in

      public static Filter<Object> in(String c, Object v)
      Apply an "in" constraint to the given column or alias
      Parameters:
      c - column or alias
      v - Object use to constraint the column or alias
      Returns:
      a Filter<Object> "in" constraint
    • in

      @SafeVarargs public static <T> Filter<Object> in(String c, T... values)
      Apply an "in" constraint to the given column or alias
      Parameters:
      c - column or alias
      values - array of Objects to constraint the column or alias
      Returns:
      a Filter<Object> "in" constraint
    • in

      public static Filter<Object> in(String c, Collection<?> values)
      Apply an "in" constraint to the given column or alias
      Parameters:
      c - column or alias
      values - collection of Objects to constraint the column or alias
      Returns:
      a Filter<Object> "in" constraint
    • notEquals

      public static Filter<Object> notEquals(String c, Object v)
      Apply a "not equals" constraint to the given column or alias
      Parameters:
      c - column or alias
      v - Object use to constraint the column or alias
      Returns:
      a Filter<Object> "not equals" constraint
    • neq

      public static Filter<Object> neq(String c, Object v)
      Apply a "not equals" constraint to the given column or alias
      Parameters:
      c - column or alias
      v - Object use to constraint the column or alias
      Returns:
      a Filter<Object> "not equals" constraint
    • notNull

      public static Filter<Object> notNull(String c)
      Apply a "not null" constraint to the given column or alias
      Parameters:
      c - column or alias
      Returns:
      a Filter<Object> "not null" constraint
    • notStartsWith

      public static Filter<Object> notStartsWith(String c, String prefix)
      Apply a "not starts with" constraint to the given column or alias Checks if it doesn't starts with the given prefix. Applies to string values.
      Parameters:
      c - column or alias
      prefix - the prefix
      Returns:
      a Filter<Object> "not starts with" constraint
    • notEndsWith

      public static Filter<Object> notEndsWith(String c, String sufix)
      Apply a "not ends with" constraint to the given column or alias Checks if it doesn't ends with the given suffix. Applies to string values.
      Parameters:
      c - column or alias
      suffix - the suffix
      Returns:
      a Filter<Object> "not ends with" constraint
    • notIncludes

      public static Filter<Object> notIncludes(String c, String infix)
      Apply a "not includes" constraint to the given column or alias Checks if it doesn't contains the given substring. Applies to string values.
      Parameters:
      c - column or alias
      substring - the substring
      Returns:
      a Filter<Object> "not includes" constraint
    • notIn

      public static Filter<Object> notIn(String c, Object v)
      Apply a "not in" constraint to the given column or alias
      Parameters:
      c - column or alias
      v - Object use to constraint the column or alias
      Returns:
      a Filter<Object> "not in" constraint
    • notIn

      @SafeVarargs public static <T> Filter<Object> notIn(String c, T... values)
      Apply a "not in" constraint to the given column or alias
      Parameters:
      c - column or alias
      values - array of Objects to constraint the column or alias
      Returns:
      a Filter<Object> "not in" constraint
    • notIn

      public static Filter<Object> notIn(String c, Collection<?> values)
      Apply a "not in" constraint to the given column or alias
      Parameters:
      c - column or alias
      values - collection of Objects to constraint the column or alias
      Returns:
      a Filter<Object> "not in" constraint
    • between

      public static Criteria between(String c, Object lowBound, Object highBound)
      Apply an "in bound between" constraint to the given column or alias.
      Parameters:
      c - column or alias
      lowBound - low in bound Object value to constraint the column or alias
      highBound - high in bound Object value to constraint the column or alias
      Returns:
      a Filter<Object> "between" constraint
    • greaterThan

      public static Filter<Object> greaterThan(String c, Object v)
      Apply a "greater than" constraint to the given column or alias
      Parameters:
      c - column or alias
      v - Object use to constraint the column or alias
      Returns:
      a Filter<Object> "greater than" constraint
    • gt

      public static Filter<Object> gt(String c, Object v)
      Apply a "greater than" constraint to the given column or alias
      Parameters:
      c - column or alias
      v - Object use to constraint the column or alias
      Returns:
      a Filter<Object> "greater than" constraint
    • greaterThanOrEqual

      public static Filter<Object> greaterThanOrEqual(String c, Object v)
      Apply a "greater than or equal" constraint to the given column or alias
      Parameters:
      c - column or alias
      v - Object use to constraint the column or alias
      Returns:
      a Filter<Object> "greater than or equal" constraint
    • gte

      public static Filter<Object> gte(String c, Object v)
      Apply a "greater than or equal" constraint to the given column or alias
      Parameters:
      c - column or alias
      v - Object use to constraint the column or alias
      Returns:
      a Filter<Object> "greater than or equal" constraint
    • lessThan

      public static Filter<Object> lessThan(String c, Object v)
      Apply a "less than" constraint to the given column or alias
      Parameters:
      c - column or alias
      v - Object use to constraint the column or alias
      Returns:
      a Filter<Object> "less than" constraint
    • lt

      public static Filter<Object> lt(String c, Object v)
      Apply a "less than" constraint to the given column or alias
      Parameters:
      c - column or alias
      v - Object use to constraint the column or alias
      Returns:
      a Filter<Object> "less than" constraint
    • lessThanOrEqual

      public static Filter<Object> lessThanOrEqual(String c, Object v)
      Apply a "less than or equal" constraint to the given column or alias
      Parameters:
      c - column or alias
      v - Object use to constraint the column or alias
      Returns:
      a Filter<Object> "less than or equal" constraint
    • lte

      public static Filter<Object> lte(String c, Object v)
      Apply a "less than or equal" constraint to the given column or alias
      Parameters:
      c - column or alias
      v - Object use to constraint the column or alias
      Returns:
      a Filter<Object> "less than or equal" constraint