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`

public abstract class OperatorBase extends Object implements CanParseCriterion, Operator
Base class for operators that provide check for base operator parameters during parsing.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `abstract Map<String,Object>`
  `convertToMap(Criterion criterion)`
  Convert criterion to map representation.
  `abstract boolean`
  `isRequiresCriteria()`
  Does operator need criteria list parameter.
  `abstract boolean`
  `isRequiresFieldName()`
  Does operator need fieldName parameter.
  `abstract boolean`
  `isRequiresValue()`
  Does operator need value parameter.
  `abstract Criterion`
  `parseCriterion(String fieldName, Object value, List<Criterion> criteria)`
  Logic for parsing criterion.

  ### Methods inherited from interface com.isomorphic.criteria.Operator

  `condition, getID`

- ## 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)
    Logic for parsing criterion. Should be implemented in operator classes.
    Parameters:
      `fieldName` - - value of fieldName parameter.
      `value` - - value of value parameter.
      `criteria` - - list of criteria
    Returns:
      parsed criterion.

  - ### convertToMap

    public abstract Map<String,Object> convertToMap(Criterion criterion)
    Convert criterion to map representation.
    Parameters:
      `criterion` - - criterion to convert.
    Returns:
      map representation of criterion.