public interface BeanDescriptor extends ElementDescriptor
ElementDescriptor.ConstraintFinder
Modifier and Type | Method and Description |
---|---|
Set<PropertyDescriptor> |
getConstrainedProperties()
Returns a set of property descriptors having at least one constraint defined
or marked as cascaded (
@Valid |
PropertyDescriptor |
getConstraintsForProperty(String propertyName)
Return the property descriptor for a given property.
|
boolean |
isBeanConstrained()
Returns
true if the bean involves validation:
a constraint is hosted on the bean itself
a constraint is hosted on one of the bean properties
or a bean property is marked for cascade (@Valid )
|
findConstraints, getConstraintDescriptors, getElementClass, hasConstraints
boolean isBeanConstrained()
true
if the bean involves validation:
@Valid
)true
if the bean involves validation, false
otherwise.PropertyDescriptor getConstraintsForProperty(String propertyName)
null
if the property does not exist or has no
constraint nor is marked as cascaded (see getConstrainedProperties()
)
The returned object (and associated objects including ConstraintDescriptor
s)
are immutable.propertyName
- property evaluatedIllegalArgumentException
- if propertyName is nullSet<PropertyDescriptor> getConstrainedProperties()
@Valid). If not property matches,
an empty set is returned.
Copyright © 2018 JBoss by Red Hat. All rights reserved.