A map of String annotations to ThriftConstraintValidator.
A map of String annotations to ThriftConstraintValidator.
There is a Java helper toScalaMap
, which takes a java.util.Map
and return a scala.collection.immutable.Map for customAnnotations
.
Must override this method to define all custom validations in an implementation of ThriftValidator.
Check if a given annotation is already defined.
Check if a given annotation is already defined.
the String annotation defined on IDL.
true if the annotation is already defined.
All custom annotations defined in this validator.
All custom annotations defined in this validator.
A helper method that converts a java.util.Map to a scala.collection.immutable.Map
A helper method that converts a java.util.Map to a scala.collection.immutable.Map
Validate a field value against its annotation.
Validate a field value against its annotation.
The type of the field.
The name of the field.
The value of the field to be validated.
The annotation name and its value set on the field in Thrift IDL.
A set of ThriftValidationViolations for violated constraints. Return an empty set if all validations passed.
See a Java-friendly version of validateField
that takes
fieldAnnotations as a java.util.Map, and return a set
of ThriftValidationViolations as java.util.Set in
BaseValidator.validateField().
A Java-friendly version of validateField, that takes fieldAnnotations as a java.util.Map, and return a set of ThriftValidationViolations as java.util.Set.
A Java-friendly version of validateField, that takes fieldAnnotations as a java.util.Map, and return a set of ThriftValidationViolations as java.util.Set.
Implement this class to define a validator with custom validations.