Package dev.morphia.query.validation
Class PatternValueValidator
- java.lang.Object
-
- dev.morphia.query.validation.ValueValidator
-
- dev.morphia.query.validation.PatternValueValidator
-
- All Implemented Interfaces:
Validator
public final class PatternValueValidator extends ValueValidator
Validates query values that are Pattern to check the field type is a String.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PatternValueValidator
getInstance()
Get the instance.protected java.lang.Class
getRequiredValueType()
Used byapply
to figure out whether to apply the validation or simply return.protected void
validate(java.lang.Class<?> type, java.lang.Object value, java.util.List<ValidationFailure> validationFailures)
-
Methods inherited from class dev.morphia.query.validation.ValueValidator
apply
-
-
-
-
Method Detail
-
getInstance
public static PatternValueValidator getInstance()
Get the instance.- Returns:
- the Singleton instance of this validator
-
getRequiredValueType
protected java.lang.Class getRequiredValueType()
Description copied from class:ValueValidator
Used byapply
to figure out whether to apply the validation or simply return.- Specified by:
getRequiredValueType
in classValueValidator
- Returns:
- the class the value should be in order to go ahead and perform validation
-
validate
protected void validate(java.lang.Class<?> type, java.lang.Object value, java.util.List<ValidationFailure> validationFailures)
- Specified by:
validate
in classValueValidator
-
-