use of org.drools.workbench.models.datamodel.rule.CEPWindow in project drools-wb by kiegroup.
the class RuleModelCloneVisitor method visitFactPattern.
private FactPattern visitFactPattern(FactPattern pattern) {
FactPattern clone = new FactPattern();
clone.setBoundName(pattern.getBoundName());
clone.setFactType(pattern.getFactType());
clone.setNegated(pattern.isNegated());
CEPWindow cloneCEPWindow = new CEPWindow();
cloneCEPWindow.setOperator(pattern.getWindow().getOperator());
cloneCEPWindow.setParameters(cloneCEPWindowParameters(pattern.getWindow()));
clone.setWindow(cloneCEPWindow);
for (FieldConstraint fc : pattern.getFieldConstraints()) {
clone.addConstraint((FieldConstraint) visit(fc));
}
return clone;
}
Aggregations