public class BeanDescriptorImpl extends ElementDescriptorImpl implements javax.validation.metadata.BeanDescriptor
BeanDescriptor
.Modifier and Type | Field and Description |
---|---|
protected ApacheFactoryContext |
factoryContext
The
ApacheFactoryContext (not) used by this
BeanDescriptorImpl |
elementClass, metaBean
Modifier | Constructor and Description |
---|---|
protected |
BeanDescriptorImpl(ApacheFactoryContext factoryContext,
MetaBean metaBean)
Create a new BeanDescriptorImpl instance.
|
Modifier and Type | Method and Description |
---|---|
Set<javax.validation.metadata.PropertyDescriptor> |
getConstrainedProperties() |
javax.validation.metadata.PropertyDescriptor |
getConstraintsForProperty(String propertyName)
Return the property level constraints for a given propertyName or
null if
either the property does not exist or has no constraint. |
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 )
|
String |
toString() |
findConstraints, getConstraintDescriptors, getConstraintDescriptors, getElementClass, getMetaBean, getMutableConstraintDescriptors, hasConstraints, setConstraintDescriptors
protected final ApacheFactoryContext factoryContext
ApacheFactoryContext
(not) used by this
BeanDescriptorImpl
protected BeanDescriptorImpl(ApacheFactoryContext factoryContext, MetaBean metaBean)
factoryContext
- metaBean
- public boolean isBeanConstrained()
@Valid
)isBeanConstrained
in interface javax.validation.metadata.BeanDescriptor
public javax.validation.metadata.PropertyDescriptor getConstraintsForProperty(String propertyName)
null
if
either the property does not exist or has no constraint. The returned
object (and associated objects including ConstraintDescriptors) are
immutable.getConstraintsForProperty
in interface javax.validation.metadata.BeanDescriptor
propertyName
- property evaluatedpublic Set<javax.validation.metadata.PropertyDescriptor> getConstrainedProperties()
getConstrainedProperties
in interface javax.validation.metadata.BeanDescriptor
Copyright © 2010-2015 The Apache Software Foundation. All Rights Reserved.