public void checkConstraints()
{
for( PropertyDescriptor propertyDescriptor : stateModel.properties() )
{
ConstraintsCheck constraints = (ConstraintsCheck) propertyDescriptor;
Property<Object> property = this.propertyFor( propertyDescriptor.accessor() );
constraints.checkConstraints( property.get() );
}
for( AssociationDescriptor associationDescriptor : stateModel.associations() )
{
ConstraintsCheck constraints = (ConstraintsCheck) associationDescriptor;
Association<Object> association = this.associationFor( associationDescriptor.accessor() );
constraints.checkConstraints( association.get() );
}
// TODO Should ManyAssociations be checked too?
}