Package org.opennms.web.rest.support
Class CriteriaBehavior<T>
- java.lang.Object
-
- org.opennms.web.rest.support.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
CriteriaBehavior.BeforeVisit
-
Constructor Summary
Constructors Constructor Description CriteriaBehavior(String name, java.util.function.Function<String,T> converter)
CriteriaBehavior(String name, java.util.function.Function<String,T> converter, CriteriaBehavior.BeforeVisit beforeVisit)
CriteriaBehavior(java.util.function.Function<String,T> converter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
beforeVisit(CriteriaBuilder builder, Object value, org.apache.cxf.jaxrs.ext.search.ConditionType c, boolean isWildcard)
T
convert(String value)
java.util.function.Function<String,T>
getConverter()
String
getPropertyName()
void
setSkipPropertyByDefault(boolean skip)
boolean
shouldSkipProperty(org.apache.cxf.jaxrs.ext.search.ConditionType condition, boolean wildcard)
String
toString()
-
-
-
Method Detail
-
getPropertyName
public String getPropertyName()
-
beforeVisit
public void beforeVisit(CriteriaBuilder builder, Object value, org.apache.cxf.jaxrs.ext.search.ConditionType c, boolean isWildcard)
-
setSkipPropertyByDefault
public void setSkipPropertyByDefault(boolean skip)
-
shouldSkipProperty
public boolean shouldSkipProperty(org.apache.cxf.jaxrs.ext.search.ConditionType condition, boolean wildcard)
-
-