@Entity public class EntityConstraintViolation extends CdmBase
EntityConstraintViolation
represents a single error resulting from
the validation of an entity. It basically is a database model for the
ConstraintValidator
class of the javax.validation framework.CLOB_LENGTH, uuid
Modifier | Constructor and Description |
---|---|
protected |
EntityConstraintViolation() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Is
true if UUID and created timestamp (is this really needed/make sense?)
is the same for the passed Object and this one. |
EntityValidation |
getEntityValidation() |
java.lang.String |
getInvalidValue()
Get the value that violated the constraint.
|
java.lang.String |
getMessage()
Get the error message associated with the constraint violation.
|
java.lang.String |
getPropertyPath()
Get the path from the root bean to the field with the invalid value.
|
Severity |
getSeverity()
Get the severity of the constraint violation.
|
java.lang.String |
getUserFriendlyFieldName()
A user-friendly name for the property path.
|
java.lang.String |
getValidationGroup() |
java.lang.String |
getValidator()
Get the fully qualified class name of the
ConstraintValidator
responsible for invalidating the entity. |
int |
hashCode()
Overrides
Object.hashCode()
See hibernate109 , geocities
or ibm
for more information about equals and hashcode. |
static EntityConstraintViolation |
newInstance() |
static <T extends ICdmBase> |
newInstance(T entity,
javax.validation.ConstraintViolation<T> error) |
void |
setEntityValidation(EntityValidation entityValidation) |
void |
setInvalidValue(java.lang.String invalidValue) |
void |
setMessage(java.lang.String message) |
void |
setPropertyPath(java.lang.String propertyPath) |
void |
setSeverity(Severity severity) |
void |
setUserFriendlyFieldName(java.lang.String userFriendlyFieldName) |
void |
setValidationGroup(java.lang.String validationGroup) |
void |
setValidator(java.lang.String validator) |
addPropertyChangeListener, addPropertyChangeListener, addToSetWithChangeEvent, clone, deproxy, deproxy, fireOnCreateEvent, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getCreated, getCreatedBy, getId, getUserFriendlyDescription, getUserFriendlyFieldName, getUserFriendlyTypeName, getUuid, hasListeners, initListener, instanceToString, invokeSetMethod, invokeSetMethodWithNull, isBlank, isInstanceOf, isNotBlank, isPersited, removeFromSetWithChangeEvent, removePropertyChangeListener, removePropertyChangeListener, replaceInList, setCreated, setCreatedBy, setId, setNewEntityListener, setUuid, toString
public static EntityConstraintViolation newInstance()
public static <T extends ICdmBase> EntityConstraintViolation newInstance(T entity, javax.validation.ConstraintViolation<T> error)
public java.lang.String getPropertyPath()
EntityValidation.getValidatedEntityClass()
). Only if
you have used @Valid annotations, and the error was in a parent or child
entity, will this be a dot-separated path (e.g. "addresses[0].street" or
"company.name").public void setPropertyPath(java.lang.String propertyPath)
public java.lang.String getUserFriendlyFieldName()
public void setUserFriendlyFieldName(java.lang.String userFriendlyFieldName)
public java.lang.String getInvalidValue()
public void setInvalidValue(java.lang.String invalidValue)
public Severity getSeverity()
public void setSeverity(Severity severity)
public java.lang.String getMessage()
public void setMessage(java.lang.String message)
public java.lang.String getValidator()
ConstraintValidator
responsible for invalidating the entity.validator
- public void setValidator(java.lang.String validator)
public java.lang.String getValidationGroup()
public void setValidationGroup(java.lang.String validationGroup)
validationGroup
- the validationGroup to setpublic EntityValidation getEntityValidation()
public void setEntityValidation(EntityValidation entityValidation)
public boolean equals(java.lang.Object obj)
CdmBase
true
if UUID and created timestamp (is this really needed/make sense?)
is the same for the passed Object and this one.
This method is final as subclasses should not override it.VersionableEntity.equals(Object)
.
For discussion see #7202.
match strategy
and make sure
matching
is implemented for the respective CdmBase subclass.
You may adapt your match strategy to your own needs.
See hibernate109
, geocities
,
or ibm
for more information about equals and hashcode.
Copyright © 2007-2020 EDIT. All Rights Reserved.