Package com.isomorphic.criteria
Class OperatorBase
java.lang.Object
com.isomorphic.criteria.OperatorBase
- All Implemented Interfaces:
CanParseCriterion,Operator
- Direct Known Subclasses:
LogicalOperator,OtherFieldOperator,RangeOperator,SimpleOperator
Base class for operators that provide check for base operator parameters during parsing.
-
Method Summary
Modifier and TypeMethodDescriptionconvertToMap(Criterion criterion) Convert criterion to map representation.abstract booleanDoes operator need criteria list parameter.abstract booleanDoes operator need fieldName parameter.abstract booleanDoes operator need value parameter.abstract CriterionparseCriterion(String fieldName, Object value, List<Criterion> criteria, Map fieldQuery, Map valueQuery) Logic for parsing criterion.
-
Method Details
-
isRequiresFieldName
public abstract boolean isRequiresFieldName()Does operator need fieldName parameter. -
isRequiresValue
public abstract boolean isRequiresValue()Does operator need value parameter. -
isRequiresCriteria
public abstract boolean isRequiresCriteria()Does operator need criteria list parameter. -
parseCriterion
public abstract Criterion parseCriterion(String fieldName, Object value, List<Criterion> criteria, Map fieldQuery, Map valueQuery) Logic for parsing criterion. Should be implemented in operator classes- Parameters:
fieldName- - value of fieldName parameter.value- - value of value parameter.criteria- - list of criteriafieldQuery- - fieldQuery definition (null if not applicable)valueQuery- - valueQuery definition (null if not applicable)- Returns:
- parsed criterion.
-
convertToMap
Convert criterion to map representation.- Parameters:
criterion- - criterion to convert.- Returns:
- map representation of criterion.
-