Class CriteriaBehavior<T>

  • Type Parameters:
    T -
    Direct Known Subclasses:
    IpLikeCriteriaBehavior, StringCriteriaBehavior

    public class CriteriaBehavior<T>
    extends Object

    Specify a custom handler for a FIQL query term. This allows us to:

    • Map the query term to a different criteria property name
    • Specify a function to convert the String value to a specific Java type (Enum, Integer, etc.)
    • Specify a function that will be executed when the search term is specified
    • Constructor Detail

      • CriteriaBehavior

        public CriteriaBehavior​(java.util.function.Function<String,​T> converter)
      • CriteriaBehavior

        public CriteriaBehavior​(String name,
                                java.util.function.Function<String,​T> converter)
    • Method Detail

      • getPropertyName

        public String getPropertyName()
      • getConverter

        public java.util.function.Function<String,​T> getConverter()
      • beforeVisit

        public void beforeVisit​(CriteriaBuilder builder,
                                Object value,
                                org.apache.cxf.jaxrs.ext.search.ConditionType c,
                                boolean isWildcard)
      • convert

        public T convert​(String value)
      • setSkipPropertyByDefault

        public void setSkipPropertyByDefault​(boolean skip)
      • shouldSkipProperty

        public boolean shouldSkipProperty​(org.apache.cxf.jaxrs.ext.search.ConditionType condition,
                                          boolean wildcard)