public final class UnconstrainedEntityMetaDataSingleton<T> extends Object implements BeanMetaData<T>
BeanMetaData
used as a placeholder for unconstrained types.Modifier and Type | Method and Description |
---|---|
boolean |
defaultGroupSequenceIsRedefined() |
Class<T> |
getBeanClass() |
BeanDescriptor |
getBeanDescriptor() |
Iterable<Cascadable> |
getCascadables()
Returns the cascaded elements of this validatable, e.g.
|
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.
|
static UnconstrainedEntityMetaDataSingleton<?> |
getSingleton() |
boolean |
hasConstraints()
Returns
true if the bean class for this bean meta data has any constraints at all, false otherwise. |
public static UnconstrainedEntityMetaDataSingleton<?> getSingleton()
public Class<T> getBeanClass()
getBeanClass
in interface BeanMetaData<T>
public boolean hasConstraints()
BeanMetaData
true
if the bean class for this bean meta data has any constraints at all, false
otherwise.hasConstraints
in interface BeanMetaData<T>
true
if the bean class for this bean meta data has any constraints at all, false
otherwise.public BeanDescriptor getBeanDescriptor()
getBeanDescriptor
in interface BeanMetaData<T>
ElementDescriptor
describing the bean this meta data applies for.public PropertyMetaData getMetaDataFor(String propertyName)
BeanMetaData
getMetaDataFor
in interface BeanMetaData<T>
propertyName
- The property name.null
if no property with the given name exists.public List<Class<?>> getDefaultGroupSequence(T beanState)
BeanMetaData
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.
getDefaultGroupSequence
in interface BeanMetaData<T>
beanState
- the bean state.public boolean defaultGroupSequenceIsRedefined()
defaultGroupSequenceIsRedefined
in interface BeanMetaData<T>
true
if the entity redefines the default group sequence, false
otherwise.public Iterator<Sequence> getDefaultValidationSequence(T beanState)
BeanMetaData
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.getDefaultValidationSequence
in interface BeanMetaData<T>
public Set<MetaConstraint<?>> getMetaConstraints()
getMetaConstraints
in interface BeanMetaData<T>
MetaConstraint
instances encapsulating the information of all the constraints
defined on the bean. This collection includes constraints from super classes as wellpublic Set<MetaConstraint<?>> getDirectMetaConstraints()
getDirectMetaConstraints
in interface BeanMetaData<T>
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 classespublic ExecutableMetaData getMetaDataFor(ExecutableElement method) throws ConstraintDeclarationException
BeanMetaData
getMetaDataFor
in interface BeanMetaData<T>
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.public List<Class<? super T>> getClassHierarchy()
getClassHierarchy
in interface BeanMetaData<T>
public Iterable<Cascadable> getCascadables()
Validatable
@Valid
.getCascadables
in interface Validatable
Copyright © 2016 JBoss by Red Hat. All rights reserved.