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
Base implementation for
ConstraintMetaData with attributes common
to all type of meta data.- Author:
- Gunnar Morling, Hardy Ferentschik
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractConstraintMetaData(String name, Type type, Set<MetaConstraint<?>> directConstraints, Set<MetaConstraint<?>> containerElementsConstraints, boolean isCascading, boolean isConstrained) -
Method Summary
Modifier and TypeMethodDescriptionprotected Set<ContainerElementTypeDescriptor>asContainerElementTypeDescriptors(Set<MetaConstraint<?>> containerElementsConstraints, CascadingMetaData cascadingMetaData, boolean defaultGroupSequenceRedefined, List<Class<?>> defaultGroupSequence) protected Set<ConstraintDescriptorImpl<?>>asDescriptors(Set<MetaConstraint<?>> constraints) booleanSet<MetaConstraint<?>>Set<MetaConstraint<?>>Set<MetaConstraint<?>>getName()Returns the name of this meta data object.getType()Returns the data type of this meta data object, e.g.inthashCode()final booleanWhether this meta data object is marked for cascaded validation or not.booleanWhether this meta data object is constrained by any means or not.iterator()toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.hibernate.validator.internal.metadata.aggregated.ConstraintMetaData
asDescriptor, getKindMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
AbstractConstraintMetaData
public AbstractConstraintMetaData(String name, Type type, Set<MetaConstraint<?>> directConstraints, Set<MetaConstraint<?>> containerElementsConstraints, boolean isCascading, boolean isConstrained)
-
-
Method Details
-
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
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
- Specified by:
iteratorin interfaceIterable<MetaConstraint<?>>
-
getAllConstraints
-
getDirectConstraints
-
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.
-
toString
-
hashCode
public int hashCode() -
equals
-
asDescriptors
-
asContainerElementTypeDescriptors
protected Set<ContainerElementTypeDescriptor> asContainerElementTypeDescriptors(Set<MetaConstraint<?>> containerElementsConstraints, CascadingMetaData cascadingMetaData, boolean defaultGroupSequenceRedefined, List<Class<?>> defaultGroupSequence)
-