Class ConstraintViolation


  • public class ConstraintViolation
    extends java.lang.Object
    Author:
    Uwe Schaefer, (us@thomas-daily.de)
    • Constructor Detail

      • ConstraintViolation

        public ConstraintViolation​(ConstraintViolation.Level level,
                                   MappedClass clazz,
                                   MappedField field,
                                   java.lang.Class<? extends ClassConstraint> validator,
                                   java.lang.String message)
        Creates a violation instance to record invalid mapping metadata
        Parameters:
        level - the severity of the violation
        clazz - the errant class
        field - the errant field
        validator - the constraint failed
        message - the message for the failure
      • ConstraintViolation

        public ConstraintViolation​(ConstraintViolation.Level level,
                                   MappedClass clazz,
                                   java.lang.Class<? extends ClassConstraint> validator,
                                   java.lang.String message)
        Creates a violation instance to record invalid mapping metadata
        Parameters:
        level - the severity of the violation
        clazz - the errant class
        validator - the constraint failed
        message - the message for the failure
    • Method Detail

      • getPrefix

        public java.lang.String getPrefix()
        Returns:
        the qualified name of the failing mapping
      • render

        public java.lang.String render()
        Returns:
        a human friendly version of the violation