Enum FilterOperation

  • All Implemented Interfaces:
    Serializable, Comparable<FilterOperation>

    public enum FilterOperation
    extends Enum<FilterOperation>
    Available filter operations
    Mapping operation abbreviation to filter operation
    Symbol Operation Example filter query param
    eq equals city=eq:Munich
    eq_notset equals or not set city=eq_notset:Munich
    neq not equals country=neq:de
    gt greater than amount=gt:10000
    gt_notset greater than or not set presentationEnd=gt_notset:2020-10-06
    gte greater than or equals amount=gte:10000
    gte_notsetgreater than or equals or not setamount=gte_notset:10000
    lt less than amount=lt:10000
    lt_notset less than or not set amount=lt_notset:10000
    lt_set less than and set amount=lt_set:10000
    lte less than or equals to amount=lte:10000
    lte_set less than or equals and set presentationStart=lte_set:2020-10-06
    lte_notsetless than or equals or not set presentationStart=lte_notset:2020-10-06
    in in country=in:uk,usa,au
    nin not in country=nin:fr,de,nz
    btn between (inclusive) joiningDate=btn:2018-01-01,2016-01-01
    like like firstName=like:John
    stw starts with firstName=stw:A
    set value exists (not null) firstName=set:
    notset value is not set (null) firstName=notset:

    References:

    See Also:
    An example application using Spring boot MVC, Spring Data JPA with the ability to do filter, pagination and sorting.
    • Method Detail

      • values

        public static FilterOperation[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (FilterOperation c : FilterOperation.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static FilterOperation valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null