Package dev.morphia.query.validation
Class DefaultTypeValidator
- java.lang.Object
-
- dev.morphia.query.validation.TypeValidator
-
- dev.morphia.query.validation.DefaultTypeValidator
-
- All Implemented Interfaces:
Validator
public final class DefaultTypeValidator extends TypeValidator
This is a fall-through validator that looks at the type and at the class of the value and figures out if they're similar enough to be used to query.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
appliesTo(java.lang.Class<?> type)
Always returns true, applies to all typesstatic DefaultTypeValidator
getInstance()
Get the instance.protected void
validate(java.lang.Class<?> type, java.lang.Object value, java.util.List<ValidationFailure> validationFailures)
-
Methods inherited from class dev.morphia.query.validation.TypeValidator
apply
-
-
-
-
Method Detail
-
getInstance
public static DefaultTypeValidator getInstance()
Get the instance.- Returns:
- the Singleton instance of this validator
-
appliesTo
protected boolean appliesTo(java.lang.Class<?> type)
Always returns true, applies to all types- Specified by:
appliesTo
in classTypeValidator
- Parameters:
type
- the type to be validated- Returns:
- true. Always.
-
validate
protected void validate(java.lang.Class<?> type, java.lang.Object value, java.util.List<ValidationFailure> validationFailures)
- Specified by:
validate
in classTypeValidator
-
-