Package org.opennms.web.rest.support
Class CriteriaBuilderSearchVisitor<T,Q>
- java.lang.Object
-
- org.apache.cxf.jaxrs.ext.search.visitor.AbstractSearchConditionVisitor<Q,CriteriaBuilder>
-
- org.opennms.web.rest.support.CriteriaBuilderSearchVisitor<T,Q>
-
- Type Parameters:
T
- Entity object type (eg. OnmsNode)Q
- Query bean type. In some cases, this will be the same as the entity object type but for complex objects, a specific query bean or the CXFSearchBean
may be used instead.
- All Implemented Interfaces:
org.apache.cxf.jaxrs.ext.search.SearchConditionVisitor<Q,CriteriaBuilder>
public class CriteriaBuilderSearchVisitor<T,Q> extends org.apache.cxf.jaxrs.ext.search.visitor.AbstractSearchConditionVisitor<Q,CriteriaBuilder>
ThisSearchConditionVisitor
will convert CXFSearchCondition
instances into aCriteria
that is suitable for querying one of our DAO interfaces.
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.Date
NULL_DATE_VALUE
Use this value to represent nullDate
values.static java.lang.String
NULL_VALUE
Use this value to represent null values.
-
Constructor Summary
Constructors Constructor Description CriteriaBuilderSearchVisitor(CriteriaBuilder criteriaBuilder, java.lang.Class<T> clazz)
Constructor that just specifies the target class.CriteriaBuilderSearchVisitor(CriteriaBuilder criteriaBuilder, java.lang.Class<T> clazz, java.util.Map<java.lang.String,CriteriaBehavior<?>> behaviors)
Constructor that specifies the target class and a list of field aliases.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CriteriaBuilder
getQuery()
void
visit(org.apache.cxf.jaxrs.ext.search.SearchCondition<Q> sc)
-
Methods inherited from class org.apache.cxf.jaxrs.ext.search.visitor.AbstractSearchConditionVisitor
getFieldTypeConverter, getPrimitiveFieldClass, getPrimitiveFieldClass, getPrimitiveFieldClass, getRealPropertyName, isWildcardStringMatch, setFieldTypeConverter, setPrimitiveFieldTypeMap, setValidator, setWildcardStringMatch, validatePropertyValue, visitor
-
-
-
-
Field Detail
-
NULL_VALUE
public static final java.lang.String NULL_VALUE
Use this value to represent null values. This will translate into aCriteriaBuilder.isNull(String)
orCriteriaBuilder.isNotNull(String)
call (depending on the operator).- See Also:
- Constant Field Values
-
NULL_DATE_VALUE
public static final java.util.Date NULL_DATE_VALUE
Use this value to represent nullDate
values. This will translate into aCriteriaBuilder.isNull(String)
orCriteriaBuilder.isNotNull(String)
call (depending on the operator).
-
-
Constructor Detail
-
CriteriaBuilderSearchVisitor
public CriteriaBuilderSearchVisitor(CriteriaBuilder criteriaBuilder, java.lang.Class<T> clazz)
Constructor that just specifies the target class.
-
CriteriaBuilderSearchVisitor
public CriteriaBuilderSearchVisitor(CriteriaBuilder criteriaBuilder, java.lang.Class<T> clazz, java.util.Map<java.lang.String,CriteriaBehavior<?>> behaviors)
Constructor that specifies the target class and a list of field aliases.
-
-
Method Detail
-
visit
public void visit(org.apache.cxf.jaxrs.ext.search.SearchCondition<Q> sc)
-
getQuery
public CriteriaBuilder getQuery()
-
-