public interface BeanMetaData<T> extends Validatable
Modifier and Type | Method and Description |
---|---|
boolean |
defaultGroupSequenceIsRedefined() |
Class<T> |
getBeanClass() |
BeanDescriptor |
getBeanDescriptor() |
List<Class<? super T>> |
getClassHierarchy() |
List<Class<?>> |
getDefaultGroupSequence(T beanState)
Get the composition of the default group sequence.
|
Iterator<Sequence> |
getDefaultValidationSequence(T beanState)
Returns a
ValidationOrder representing the default
validation group sequence as configured through @GroupSequence /@DefaultGroupSequenceProvider . |
Set<MetaConstraint<?>> |
getDirectMetaConstraints() |
Set<MetaConstraint<?>> |
getMetaConstraints() |
ExecutableMetaData |
getMetaDataFor(ExecutableElement method)
Returns the constraint-related meta data for the given method of the
class represented by this bean meta data.
|
PropertyMetaData |
getMetaDataFor(String propertyName)
Returns constraint-related meta data for the given property of this bean.
|
boolean |
hasConstraints()
Returns
true if the bean class for this bean meta data has any constraints at all, false otherwise. |
getCascadables
boolean hasConstraints()
true
if the bean class for this bean meta data has any constraints at all, false
otherwise.true
if the bean class for this bean meta data has any constraints at all, false
otherwise.BeanDescriptor getBeanDescriptor()
ElementDescriptor
describing the bean this meta data applies for.PropertyMetaData getMetaDataFor(String propertyName)
propertyName
- The property name.null
if no property with the given name exists.List<Class<?>> getDefaultGroupSequence(T beanState)
If the bean state is given in parameter and the bean metadata has a default group sequence provider then the dynamic default group sequence composition is returned. In the other cases the default group sequence redefinition specified by BV is used.
beanState
- the bean state.Iterator<Sequence> getDefaultValidationSequence(T beanState)
ValidationOrder
representing the default
validation group sequence as configured through @GroupSequence
/@DefaultGroupSequenceProvider
. If
this bean type does not re-declare the default validation group sequence ValidationOrder.DEFAULT_SEQUENCE
will be returned.boolean defaultGroupSequenceIsRedefined()
true
if the entity redefines the default group sequence, false
otherwise.Set<MetaConstraint<?>> getMetaConstraints()
MetaConstraint
instances encapsulating the information of all the constraints
defined on the bean. This collection includes constraints from super classes as wellSet<MetaConstraint<?>> getDirectMetaConstraints()
MetaConstraint
instances encapsulating the information of all the constraints
defined on the bean directly (including constraints defined on implemented interfaces). It does not
contain constraints from super classes or interfaces implemented by super classesExecutableMetaData getMetaDataFor(ExecutableElement method) throws ConstraintDeclarationException
method
- The method of interest.ConstraintDeclarationException
- In case any of the rules for the declaration of method
constraints described in the Bean Validation specification is violated.Copyright © 2016 JBoss by Red Hat. All rights reserved.