private function fieldValueMatches($entity, $fieldName, $fieldValue)
    {
        $value = $this->getFieldValue($entity, $fieldName);
        if (is_array($fieldValue)) {
            $matches = in_array($value, $fieldValue);
        }
        else {
            $matches = ($value == $fieldValue);
        }

        return $matches;
    }