use of org.qi4j.runtime.composite.ConstraintsCheck in project qi4j-sdk by Qi4j.
the class EntityStateInstance method checkConstraints.
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?
}
Aggregations