Class NotInOperationValidator

  • All Implemented Interfaces:
    Validator

    public final class NotInOperationValidator
    extends OperationValidator
    Checks if the value can have the FilterOperator.NOT_IN operator applied to it.
    • Method Detail

      • getInstance

        public static NotInOperationValidator getInstance()
        Get the instance
        Returns:
        the Singleton instance of this validator
      • getOperator

        protected FilterOperator getOperator()
        Description copied from class: OperationValidator
        This method is called by the apply method to determine whether to validate the query. The validator will only work for a single FilterOperator, and this will be returned by this method
        Specified by:
        getOperator in class OperationValidator
        Returns:
        the FilterOperator this validator cares about.
      • validate

        protected void validate​(MappedField mappedField,
                                java.lang.Object value,
                                java.util.List<ValidationFailure> validationFailures)
        Description copied from class: OperationValidator
        Performs the actual validation, and assumes appliesTo has returned true
        Specified by:
        validate in class OperationValidator
        Parameters:
        mappedField - the field being queried
        value - the query value, to apply the operator to. This should not be null.
        validationFailures - the list to add any new ValidationFailures to. If validation passed this list will not change.