Package org.apache.cxf.jaxrs.ext.search
Class PrimitiveSearchCondition<T>
java.lang.Object
org.apache.cxf.jaxrs.ext.search.PrimitiveSearchCondition<T>
- All Implemented Interfaces:
SearchCondition<T>
- Direct Known Subclasses:
CollectionCheckCondition
-
Constructor Summary
ConstructorsConstructorDescriptionPrimitiveSearchCondition(String propertyName, Object propertyValue, Type propertyType, ConditionType ct, T condition) PrimitiveSearchCondition(String propertyName, Object propertyValue, ConditionType ct, T condition) -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(SearchConditionVisitor<T, ?> visitor) Provides a visitor which will convert this SearchCondition into a custom expression, for example, into the SQL statement, etcfindAll(Collection<T> pojos) Returns a list of pojos matching the conditionSome SearchConditions may use instance of T to capture the actual search criteria thus making it simpler to implement isMet(T).Returns the type of the condition this SearchCondition representsprotected static ObjectgetPrimitiveValue(String name, Object value) protected Stringprotected Typeprotected ObjectList of conditions this SearchCondition may represent.Primitive statement such a > b, i < 5, etc this condition may represent.booleanChecks if the given pojo instance meets this search condition
-
Constructor Details
-
PrimitiveSearchCondition
public PrimitiveSearchCondition(String propertyName, Object propertyValue, ConditionType ct, T condition) -
PrimitiveSearchCondition
public PrimitiveSearchCondition(String propertyName, Object propertyValue, Type propertyType, ConditionType ct, T condition)
-
-
Method Details
-
findAll
Description copied from interface:SearchConditionReturns a list of pojos matching the condition- Specified by:
findAllin interfaceSearchCondition<T>- Parameters:
pojos- list of pojos- Returns:
- list of the matching pojos or null if none have been found
-
getCondition
Description copied from interface:SearchConditionSome SearchConditions may use instance of T to capture the actual search criteria thus making it simpler to implement isMet(T). In some cases, the code which is given SearchCondition may find it more efficient to directly deal with the captured state for a more efficient lookup of matching data/records as opposed to calling SearchCondition.isMet for every instance of T it knows about.- Specified by:
getConditionin interfaceSearchCondition<T>- Returns:
- T the captured search criteria, can be null
-
getConditionType
Description copied from interface:SearchConditionReturns the type of the condition this SearchCondition represents- Specified by:
getConditionTypein interfaceSearchCondition<T>- Returns:
- condition type
-
getPropertyName
-
getPropertyValue
-
getPropertyType
-
getSearchConditions
Description copied from interface:SearchConditionList of conditions this SearchCondition may represent. Composite SearchConditions will return a list of conditions they are composed from, primitive ones will return null- Specified by:
getSearchConditionsin interfaceSearchCondition<T>- Returns:
- list of conditions, can be null
-
getStatement
Description copied from interface:SearchConditionPrimitive statement such a > b, i < 5, etc this condition may represent. Complex conditions will return null.- Specified by:
getStatementin interfaceSearchCondition<T>- Returns:
- primitive search statement, can be null
-
isMet
Description copied from interface:SearchConditionChecks if the given pojo instance meets this search condition- Specified by:
isMetin interfaceSearchCondition<T>- Parameters:
pojo- the object which will be checked- Returns:
- true if the pojo meets this search condition, false - otherwise
-
toSQL
-
accept
Description copied from interface:SearchConditionProvides a visitor which will convert this SearchCondition into a custom expression, for example, into the SQL statement, etc- Specified by:
acceptin interfaceSearchCondition<T>
-
getPrimitiveValue
-