|
Apache CXF API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.cxf.jaxrs.ext.search.PrimitiveSearchCondition<T>
public class PrimitiveSearchCondition<T>
Constructor Summary | |
---|---|
PrimitiveSearchCondition(String propertyName,
Object propertyValue,
ConditionType ct,
T condition)
|
Method Summary | |
---|---|
void |
accept(SearchConditionVisitor<T> visitor)
Provides a visitor which will convert this SearchCondition into a custom expression, for example, into the SQL statement, etc |
List<T> |
findAll(Collection<T> pojos)
Returns a list of pojos matching the condition |
T |
getCondition()
Some SearchConditions may use instance of T to capture the actual search criteria thus making it simpler to implement isMet(T). |
ConditionType |
getConditionType()
Returns the type of the condition this SearchCondition represents |
List<SearchCondition<T>> |
getSearchConditions()
List of conditions this SearchCondition may represent. |
PrimitiveStatement |
getStatement()
Primitive statement such a > b, i < 5, etc this condition may represent. |
boolean |
isMet(T pojo)
Checks if the given pojo instance meets this search condition |
String |
toSQL(String table,
String... columns)
This method is now deprecated and will be removed soon. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PrimitiveSearchCondition(String propertyName, Object propertyValue, ConditionType ct, T condition)
Method Detail |
---|
public List<T> findAll(Collection<T> pojos)
SearchCondition
findAll
in interface SearchCondition<T>
pojos
- list of pojos
public T getCondition()
SearchCondition
getCondition
in interface SearchCondition<T>
public ConditionType getConditionType()
SearchCondition
getConditionType
in interface SearchCondition<T>
public List<SearchCondition<T>> getSearchConditions()
SearchCondition
getSearchConditions
in interface SearchCondition<T>
public PrimitiveStatement getStatement()
SearchCondition
getStatement
in interface SearchCondition<T>
public boolean isMet(T pojo)
SearchCondition
isMet
in interface SearchCondition<T>
pojo
- the object which will be checked
public String toSQL(String table, String... columns)
SearchCondition
toSQL
in interface SearchCondition<T>
table
- table namecolumns
- column names, a wildcard as in 'SELECT * from table' will be used
if names are not provided
public void accept(SearchConditionVisitor<T> visitor)
SearchCondition
accept
in interface SearchCondition<T>
|
Apache CXF API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |