Class ConstraintViolation


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

      • ConstraintViolation

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

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

      • getPrefix

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

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