org.apache.bval.jsr303
Class BeanDescriptorImpl
java.lang.Object
org.apache.bval.jsr303.ElementDescriptorImpl
org.apache.bval.jsr303.BeanDescriptorImpl
- All Implemented Interfaces:
- BeanDescriptor, ElementDescriptor
- Direct Known Subclasses:
- MethodBeanDescriptorImpl
public class BeanDescriptorImpl
- extends ElementDescriptorImpl
- implements BeanDescriptor
Description: Implements BeanDescriptor.
factoryContext
protected final ApacheFactoryContext factoryContext
- The
ApacheFactoryContext (not) used by this
BeanDescriptorImpl
BeanDescriptorImpl
protected BeanDescriptorImpl(ApacheFactoryContext factoryContext,
MetaBean metaBean)
- Create a new BeanDescriptorImpl instance.
- Parameters:
factoryContext - metaBean -
isBeanConstrained
public 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)
- Specified by:
isBeanConstrained in interface BeanDescriptor
- Returns:
- true if the bean involves validation
getConstraintsForProperty
public PropertyDescriptor getConstraintsForProperty(String propertyName)
- <<<<<<< .working
Return the property level constraints for a given propertyName
or null if either the property does not exist or has no constraint
The returned object (and associated objects including ConstraintDescriptors)
are immutable.
- Specified by:
getConstraintsForProperty in interface BeanDescriptor
- Parameters:
propertyName - property evaludated
=======
Return the property level constraints for a given propertyName or null if
either the property does not exist or has no constraint The returned
object (and associated objects including ConstraintDescriptors) are
immutable.propertyName - property evaluated
>>>>>>> .merge-right.r997084
getConstrainedProperties
public Set<PropertyDescriptor> getConstrainedProperties()
-
- Specified by:
getConstrainedProperties in interface BeanDescriptor
- Returns:
- the property descriptors having at least a constraint defined
toString
public String toString()
-
- Overrides:
toString in class Object
Copyright © 2010-2011 The Apache Software Foundation. All Rights Reserved.