Class ConstraintViolationBean

java.lang.Object
jp.ecuacion.lib.core.util.internal.ReflectionUtil
jp.ecuacion.lib.core.jakartavalidation.bean.ConstraintViolationBean

public class ConstraintViolationBean extends jp.ecuacion.lib.core.util.internal.ReflectionUtil
Stores ConstraintViolation info.

The reason of the existence of the class is that the violations which are not created by Jakarata Validation can also be treated just like the one created by Jakarata Validation.

  • Constructor Details

    • ConstraintViolationBean

      public ConstraintViolationBean(jakarta.validation.ConstraintViolation<?> cv)
      Constructs a new instance with ConstraintViolation.
      Parameters:
      cv - ConstraintViolation
    • ConstraintViolationBean

      public ConstraintViolationBean(String message, String validatorClass, String rootClassName, String itemNameKey)
      Constructs a new instance with message, propertyPath and validatorClass.

      This is used for NotEmpty validation logic.

      Parameters:
      message - message
      validatorClass - validatorClass
  • Method Details

    • getMessage

      public String getMessage()
      Gets message.
      Returns:
      message
    • getPropertyPath

      public String getPropertyPath()
      Gets propertyPath.
      Returns:
      propertyPath
    • getValidatorClass

      public String getValidatorClass()
      Gets validatorClass.
      Returns:
      validatorClass
    • getAnnotationDescriptionString

      public String getAnnotationDescriptionString()
      Gets annotationDescriptionString.
      Returns:
      annotationDescriptionString
    • getAnnotation

      public String getAnnotation()
      Gets annotation.
      Returns:
      annotation
    • getAnnotationAttributes

      public Map<String,Object> getAnnotationAttributes()
      Gets annotationAttributes.
      Returns:
      annotationAttributes
    • getMessageTemplate

      public String getMessageTemplate()
      Gets messageTemplate.
      Returns:
      messageTemplate
    • getRootClassName

      public String getRootClassName()
      Gets rootClassName.
      Returns:
      rootClassName
    • getLeafClassName

      public String getLeafClassName()
      Gets leafClassName.
      Returns:
      leafClassName
    • getInvalidValue

      public String getInvalidValue()
      Gets invalidValue.
      Returns:
      invalidValue
    • getMessageId

      @Nonnull public String getMessageId()
      Gets messageId.
      Returns:
      annotation
    • getInstance

      public Object getInstance()
      Gets instance.
      Returns:
      instance
    • getItemNameKeys

      public String[] getItemNameKeys()
    • getParamMap

      @Nonnull public Map<String,Object> getParamMap()
    • getFieldPropertyPaths

      public String[] getFieldPropertyPaths()