Class AbstractConstraintMetaData
- java.lang.Object
-
- org.hibernate.validator.internal.metadata.aggregated.AbstractConstraintMetaData
-
- All Implemented Interfaces:
Iterable<MetaConstraint<?>>,ConstraintMetaData
- Direct Known Subclasses:
ClassMetaData,ExecutableMetaData,ParameterMetaData,PropertyMetaData,ReturnValueMetaData
public abstract class AbstractConstraintMetaData extends Object implements ConstraintMetaData
Base implementation forConstraintMetaDatawith attributes common to all type of meta data.- Author:
- Gunnar Morling, Hardy Ferentschik
-
-
Constructor Summary
Constructors Constructor Description AbstractConstraintMetaData(String name, Type type, Set<MetaConstraint<?>> directConstraints, Set<MetaConstraint<?>> containerElementsConstraints, boolean isCascading, boolean isConstrained)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Set<ContainerElementTypeDescriptor>asContainerElementTypeDescriptors(Set<MetaConstraint<?>> containerElementsConstraints, CascadingMetaData cascadingMetaData, boolean defaultGroupSequenceRedefined, List<Class<?>> defaultGroupSequence)protected Set<ConstraintDescriptorImpl<?>>asDescriptors(Set<MetaConstraint<?>> constraints)booleanequals(Object obj)Set<MetaConstraint<?>>getAllConstraints()Set<MetaConstraint<?>>getContainerElementsConstraints()Set<MetaConstraint<?>>getDirectConstraints()StringgetName()Returns the name of this meta data object.TypegetType()Returns the data type of this meta data object, e.g.inthashCode()booleanisCascading()Whether this meta data object is marked for cascaded validation or not.booleanisConstrained()Whether this meta data object is constrained by any means or not.Iterator<MetaConstraint<?>>iterator()StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.hibernate.validator.internal.metadata.aggregated.ConstraintMetaData
asDescriptor, getKind
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
AbstractConstraintMetaData
public AbstractConstraintMetaData(String name, Type type, Set<MetaConstraint<?>> directConstraints, Set<MetaConstraint<?>> containerElementsConstraints, boolean isCascading, boolean isConstrained)
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:ConstraintMetaDataReturns the name of this meta data object.- Specified by:
getNamein interfaceConstraintMetaData- Returns:
- This meta data object's name.
-
getType
public Type getType()
Description copied from interface:ConstraintMetaDataReturns the data type of this meta data object, e.g. the type of a bean property or the return type of a method.- Specified by:
getTypein interfaceConstraintMetaData- Returns:
- This meta data object's type.
-
iterator
public Iterator<MetaConstraint<?>> iterator()
- Specified by:
iteratorin interfaceIterable<MetaConstraint<?>>
-
getAllConstraints
public Set<MetaConstraint<?>> getAllConstraints()
-
getDirectConstraints
public Set<MetaConstraint<?>> getDirectConstraints()
-
getContainerElementsConstraints
public Set<MetaConstraint<?>> getContainerElementsConstraints()
-
isCascading
public final boolean isCascading()
Description copied from interface:ConstraintMetaDataWhether this meta data object is marked for cascaded validation or not.- Specified by:
isCascadingin interfaceConstraintMetaData- Returns:
trueif this object is marked for cascaded validation,falseotherwise.
-
isConstrained
public boolean isConstrained()
Description copied from interface:ConstraintMetaDataWhether this meta data object is constrained by any means or not.- Specified by:
isConstrainedin interfaceConstraintMetaData- Returns:
trueif this object is marked for cascaded validation or has any constraints,falseotherwise.
-
asDescriptors
protected Set<ConstraintDescriptorImpl<?>> asDescriptors(Set<MetaConstraint<?>> constraints)
-
asContainerElementTypeDescriptors
protected Set<ContainerElementTypeDescriptor> asContainerElementTypeDescriptors(Set<MetaConstraint<?>> containerElementsConstraints, CascadingMetaData cascadingMetaData, boolean defaultGroupSequenceRedefined, List<Class<?>> defaultGroupSequence)
-
-