Package dev.morphia.query.validation
Class NotInOperationValidator
- java.lang.Object
-
- dev.morphia.query.validation.OperationValidator
-
- dev.morphia.query.validation.NotInOperationValidator
-
- All Implemented Interfaces:
Validator
public final class NotInOperationValidator extends OperationValidator
Checks if the value can have theFilterOperator.NOT_IN
operator applied to it.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NotInOperationValidator
getInstance()
Get the instanceprotected FilterOperator
getOperator()
This method is called by theapply
method to determine whether to validate the query.protected void
validate(MappedField mappedField, java.lang.Object value, java.util.List<ValidationFailure> validationFailures)
Performs the actual validation, and assumesappliesTo
has returned true-
Methods inherited from class dev.morphia.query.validation.OperationValidator
apply
-
-
-
-
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 theapply
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 classOperationValidator
- 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 assumesappliesTo
has returned true- Specified by:
validate
in classOperationValidator
- Parameters:
mappedField
- the field being queriedvalue
- the query value, to apply the operator to. This should not be null.validationFailures
- the list to add any newValidationFailures
to. If validation passed this list will not change.
-
-