Class CriteriaBehavior<T>

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

    public class CriteriaBehavior<T>
    extends java.lang.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<java.lang.String,​T> converter)
      • CriteriaBehavior

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

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

      • getPropertyName

        public java.lang.String getPropertyName()
      • getConverter

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

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

        public T convert​(java.lang.String value)
      • setSkipPropertyByDefault

        public void setSkipPropertyByDefault​(boolean skip)
      • shouldSkipProperty

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object