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
ConstructorDescriptionAbstractConstraintMetaData
(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) boolean
Set<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.int
hashCode()
final boolean
Whether this meta data object is marked for cascaded validation or not.boolean
Whether 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, wait
Methods inherited from interface org.hibernate.validator.internal.metadata.aggregated.ConstraintMetaData
asDescriptor, getKind
Methods 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:ConstraintMetaData
Returns the name of this meta data object.- Specified by:
getName
in interfaceConstraintMetaData
- Returns:
- This meta data object's name.
-
getType
Description copied from interface:ConstraintMetaData
Returns 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:
getType
in interfaceConstraintMetaData
- Returns:
- This meta data object's type.
-
iterator
- Specified by:
iterator
in interfaceIterable<MetaConstraint<?>>
-
getAllConstraints
-
getDirectConstraints
-
getContainerElementsConstraints
-
isCascading
public final boolean isCascading()Description copied from interface:ConstraintMetaData
Whether this meta data object is marked for cascaded validation or not.- Specified by:
isCascading
in interfaceConstraintMetaData
- Returns:
true
if this object is marked for cascaded validation,false
otherwise.
-
isConstrained
public boolean isConstrained()Description copied from interface:ConstraintMetaData
Whether this meta data object is constrained by any means or not.- Specified by:
isConstrained
in interfaceConstraintMetaData
- Returns:
true
if this object is marked for cascaded validation or has any constraints,false
otherwise.
-
toString
-
hashCode
public int hashCode() -
equals
-
asDescriptors
-
asContainerElementTypeDescriptors
protected Set<ContainerElementTypeDescriptor> asContainerElementTypeDescriptors(Set<MetaConstraint<?>> containerElementsConstraints, CascadingMetaData cascadingMetaData, boolean defaultGroupSequenceRedefined, List<Class<?>> defaultGroupSequence)
-