use of org.drools.core.spi.Constraint.ConstraintType in project drools by kiegroup.
the class Pattern method setConstraintType.
private void setConstraintType(final MutableTypeConstraint constraint) {
final Declaration[] declarations = constraint.getRequiredDeclarations();
boolean isAlphaConstraint = true;
for (int i = 0; isAlphaConstraint && i < declarations.length; i++) {
if (!declarations[i].isGlobal() && declarations[i].getPattern() != this) {
isAlphaConstraint = false;
}
}
ConstraintType type = isAlphaConstraint ? ConstraintType.ALPHA : ConstraintType.BETA;
constraint.setType(type);
}
Aggregations