eu.esdihumboldt.hale.common.schema.model.impl.internal
Class ConstraintOverrideProperty
java.lang.Object
eu.esdihumboldt.hale.common.schema.model.impl.AbstractPropertyDecorator
eu.esdihumboldt.hale.common.schema.model.impl.internal.ConstraintOverrideProperty
- All Implemented Interfaces:
- Locatable, ChildDefinition<PropertyConstraint>, Definition<PropertyConstraint>, PropertyDefinition, Comparable<Definition<?>>
@Immutable
public class ConstraintOverrideProperty
- extends AbstractPropertyDecorator
Decorator for PropertyDefinition
s that overrides given constraints.
- Author:
- Simon Templer
Method Summary |
|
getConstraint(Class<T> constraintType)
Get the constraint with the given constraint type.
Should usually not be called while creating the model, exceptions can be
getting mutable constraints where this is intended. |
Methods inherited from class eu.esdihumboldt.hale.common.schema.model.impl.AbstractPropertyDecorator |
asGroup, asProperty, compareTo, getDeclaringGroup, getDescription, getDisplayName, getIdentifier, getLocation, getName, getParentType, getPropertyType, toString |
ConstraintOverrideProperty
public ConstraintOverrideProperty(PropertyDefinition property,
PropertyConstraint... constraints)
- Create a decorator for the given property where the given constraints
override the constraints of the property.
- Parameters:
property
- the property to decorateconstraints
- the overriding constraints
getConstraint
public <T extends PropertyConstraint> T getConstraint(Class<T> constraintType)
- Description copied from interface:
Definition
- Get the constraint with the given constraint type.
Should usually not be called while creating the model, exceptions can be
getting mutable constraints where this is intended.
- Specified by:
getConstraint
in interface Definition<PropertyConstraint>
- Overrides:
getConstraint
in class AbstractPropertyDecorator
- Type Parameters:
T
- the constraint type- Parameters:
constraintType
- the constraint type, see Constraint
- Returns:
- the constraint with the given type
- See Also:
AbstractPropertyDecorator.getConstraint(Class)
Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d