Package dev.morphia.query.validation
Class GeoWithinOperationValidator
- java.lang.Object
-
- dev.morphia.query.validation.OperationValidator
-
- dev.morphia.query.validation.GeoWithinOperationValidator
-
- All Implemented Interfaces:
Validator
public final class GeoWithinOperationValidator extends OperationValidator
Supports validation for queries using theFilterOperator.GEO_WITHIN
operator.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GeoWithinOperationValidator
getInstance()
Get the instance.protected 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 GeoWithinOperationValidator 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.
-
-