public class ConstraintViolationImpl<T> extends Object implements HibernateConstraintViolation<T>, Serializable
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o)
IMPORTANT - some behaviour of Validator depends on the correct implementation of this equals method! (HF)
|
static <T> ConstraintViolation<T> |
forBeanValidation(String messageTemplate,
Map<String,Object> messageParameters,
Map<String,Object> expressionVariables,
String interpolatedMessage,
Class<T> rootBeanClass,
T rootBean,
Object leafBeanInstance,
Object value,
Path propertyPath,
ConstraintDescriptor<?> constraintDescriptor,
Object dynamicPayload) |
static <T> ConstraintViolation<T> |
forParameterValidation(String messageTemplate,
Map<String,Object> messageParameters,
Map<String,Object> expressionVariables,
String interpolatedMessage,
Class<T> rootBeanClass,
T rootBean,
Object leafBeanInstance,
Object value,
Path propertyPath,
ConstraintDescriptor<?> constraintDescriptor,
Object[] executableParameters,
Object dynamicPayload) |
static <T> ConstraintViolation<T> |
forReturnValueValidation(String messageTemplate,
Map<String,Object> messageParameters,
Map<String,Object> expressionVariables,
String interpolatedMessage,
Class<T> rootBeanClass,
T rootBean,
Object leafBeanInstance,
Object value,
Path propertyPath,
ConstraintDescriptor<?> constraintDescriptor,
Object executableReturnValue,
Object dynamicPayload) |
ConstraintDescriptor<?> |
getConstraintDescriptor() |
<C> C |
getDynamicPayload(Class<C> type) |
Object[] |
getExecutableParameters() |
Object |
getExecutableReturnValue() |
Map<String,Object> |
getExpressionVariables() |
Object |
getInvalidValue() |
Object |
getLeafBean() |
String |
getMessage() |
Map<String,Object> |
getMessageParameters() |
String |
getMessageTemplate() |
Path |
getPropertyPath() |
T |
getRootBean() |
Class<T> |
getRootBeanClass() |
int |
hashCode() |
String |
toString() |
<C> C |
unwrap(Class<C> type) |
public static <T> ConstraintViolation<T> forBeanValidation(String messageTemplate, Map<String,Object> messageParameters, Map<String,Object> expressionVariables, String interpolatedMessage, Class<T> rootBeanClass, T rootBean, Object leafBeanInstance, Object value, Path propertyPath, ConstraintDescriptor<?> constraintDescriptor, Object dynamicPayload)
public static <T> ConstraintViolation<T> forParameterValidation(String messageTemplate, Map<String,Object> messageParameters, Map<String,Object> expressionVariables, String interpolatedMessage, Class<T> rootBeanClass, T rootBean, Object leafBeanInstance, Object value, Path propertyPath, ConstraintDescriptor<?> constraintDescriptor, Object[] executableParameters, Object dynamicPayload)
public static <T> ConstraintViolation<T> forReturnValueValidation(String messageTemplate, Map<String,Object> messageParameters, Map<String,Object> expressionVariables, String interpolatedMessage, Class<T> rootBeanClass, T rootBean, Object leafBeanInstance, Object value, Path propertyPath, ConstraintDescriptor<?> constraintDescriptor, Object executableReturnValue, Object dynamicPayload)
public final String getMessage()
getMessage
in interface ConstraintViolation<T>
public final String getMessageTemplate()
getMessageTemplate
in interface ConstraintViolation<T>
public Map<String,Object> getMessageParameters()
HibernateConstraintValidatorContext.addMessageParameter(String, Object)
public Map<String,Object> getExpressionVariables()
HibernateConstraintValidatorContext.addExpressionVariable(String, Object)
public final T getRootBean()
getRootBean
in interface ConstraintViolation<T>
public final Class<T> getRootBeanClass()
getRootBeanClass
in interface ConstraintViolation<T>
public final Object getLeafBean()
getLeafBean
in interface ConstraintViolation<T>
public final Object getInvalidValue()
getInvalidValue
in interface ConstraintViolation<T>
public final Path getPropertyPath()
getPropertyPath
in interface ConstraintViolation<T>
public final ConstraintDescriptor<?> getConstraintDescriptor()
getConstraintDescriptor
in interface ConstraintViolation<T>
public <C> C unwrap(Class<C> type)
unwrap
in interface ConstraintViolation<T>
public Object[] getExecutableParameters()
getExecutableParameters
in interface ConstraintViolation<T>
public Object getExecutableReturnValue()
getExecutableReturnValue
in interface ConstraintViolation<T>
public <C> C getDynamicPayload(Class<C> type)
getDynamicPayload
in interface HibernateConstraintViolation<T>
type
- The type of payload to retrieveHibernateConstraintValidatorContext.withDynamicPayload(Object)
or null
if no constraint payload
if the given type has been set.public boolean equals(Object o)
messageParameters
, expressionVariables
and dynamicPayload
are not taken into account for
equality. These variables solely enrich the actual Constraint Violation with additional information e.g how we
actually got to this CV.
Copyright © 2007-2021 Red Hat, Inc. All Rights Reserved