V
- The type of entity to be validatedpublic final class CascadeConstraint<V> extends AbstractValidation<V> implements Constraint<V>
Constraint
implementation that performs
cascade validation on an entity.Cascade
,
ConstraintFactory.cascade(Class)
,
ConstraintFactory.cascade(EntityMetaData)
Modifier and Type | Method and Description |
---|---|
String |
getMessageTemplate(ValidationContext<?> context)
CascadeConstaint has no error message. |
Class<?> |
getType()
Returns the type of entity to be validated.
|
<T> V |
validate(V value,
ValidationContext<T> context)
Performs cascade validation on the specified entity.
|
appendMessageArguments
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
appendMessageArguments
public Class<?> getType()
getType
in interface Constraint<V>
getType
in interface Validation<V>
public String getMessageTemplate(ValidationContext<?> context)
CascadeConstaint
has no error message.getMessageTemplate
in interface Constraint<V>
getMessageTemplate
in interface Validation<V>
getMessageTemplate
in class AbstractValidation<V>
context
- Validation context.null
.public <T> V validate(V value, ValidationContext<T> context)
validate
in interface Constraint<V>
T
- The type of validated entity.value
- Entity to be validated.context
- Validation context.ConstraintViolationException
- if cascade validation fails.Copyright © 2011–2020 FoxLabs. All rights reserved.