class KiePMMLDescrLhsFactory {

    public void declareLhs(final KiePMMLDroolsRule rule) {
        logger.trace("declareLhs {}", rule);
        final PatternDescrBuilder<CEDescrBuilder<RuleDescrBuilder, AndDescr>> patternDescrBuilder = builder.pattern(KiePMMLStatusHolder.class.getSimpleName()).id(STATUS_HOLDER, false);
        if (rule.getStatusConstraint() != null) {
            patternDescrBuilder.constraint(rule.getStatusConstraint());
        }
        if (rule.getAndConstraints() != null) {
            declareConstraintsAndOr(rule.getAndConstraints(), builder.and());
        }
        if (rule.getOrConstraints() != null) {
            declareConstraintsAndOr(rule.getOrConstraints(), builder.or());
        }
        if (rule.getXorConstraints() != null) {
            declareConstraintsXor(rule.getXorConstraints());
        }
        if (rule.getNotConstraints() != null) {
            declareNotConstraints(rule.getNotConstraints());
        }
        if (rule.getInConstraints() != null) {
            rule.getInConstraints().forEach(this::declareConstraintIn);
        }
        if (rule.getNotInConstraints() != null) {
            rule.getNotInConstraints().forEach(this::declareConstraintNotIn);
        }
        if (rule.getIfBreakField() != null) {
            declareIfBreak(rule.getIfBreakField(), rule.getIfBreakOperator(), rule.getIfBreakValue());
        }
    }

    private  KiePMMLDescrLhsFactory(final CEDescrBuilder<RuleDescrBuilder, AndDescr> builder);

}