public abstract class CriteriaFilter<T> extends Object implements org.apache.commons.collections.Transformer, Lookup, org.apache.commons.collections.Predicate, Predicate<T>
Predicate.
It applies checkCriteria(Object) over the input and returns the same input object if it passes the criteria.PredicateLinkedTransformer| Constructor and Description |
|---|
CriteriaFilter() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract boolean |
checkCriteria(T input)
Checks the business logic against which the Predicate will succeed (response as true) or fail (false).
|
boolean |
evaluate(Object input) |
String |
getErrorMsg()
If specified will provide
getErrorMsg() in the ContinueProcessingException |
void |
setErrorMsg(String errorMsg)
If specified will provide
getErrorMsg() in the ContinueProcessingException |
boolean |
test(T input) |
Object |
transform(Object input)
For a Given String, Lookup a value for it
|
public Object transform(Object input)
Lookuppublic boolean evaluate(Object input)
protected abstract boolean checkCriteria(T input) throws ContinueProcessingException, BreakChainException, Exception
ContinueProcessingException.
Exception type.input - ContinueProcessingException - skipping further record processingBreakChainException - for explained business logic failed conditionsException - for any serious Errorpublic String getErrorMsg()
getErrorMsg() in the ContinueProcessingExceptionpublic void setErrorMsg(String errorMsg)
getErrorMsg() in the ContinueProcessingExceptionCopyright © 2018. All rights reserved.