final Map<String, String> parameters = constr.getParameters(); if (constr.getConnectives() == null) { generateNormalFieldRestriction(constr,
private SingleFieldConstraint visitSingleFieldConstraint(SingleFieldConstraint sfc) { SingleFieldConstraint clone = new SingleFieldConstraint(); clone.setConstraintValueType(sfc.getConstraintValueType()); clone.setExpressionValue((ExpressionFormLine) visit(sfc.getExpressionValue())); clone.setFieldBinding(sfc.getFieldBinding()); clone.setFactType(sfc.getFactType()); clone.setFieldName(sfc.getFieldName()); clone.setFieldType(sfc.getFieldType()); clone.setId(sfc.getId()); clone.setOperator(sfc.getOperator()); clone.setParent((FieldConstraint) visit(sfc.getParent())); for (Map.Entry<String, String> entry : sfc.getParameters().entrySet()) { clone.setParameter(entry.getKey(), entry.getValue()); } clone.setValue(sfc.getValue()); if (sfc.getConnectives() != null) { clone.setConnectives(new ConnectiveConstraint[sfc.getConnectives().length]); for (int i = 0; i < sfc.getConnectives().length; i++) { clone.getConnectives()[i] = (ConnectiveConstraint) visit(sfc.getConnectives()[i]); } } return clone; }
private SingleFieldConstraint visitSingleFieldConstraint(SingleFieldConstraint sfc) { SingleFieldConstraint clone = new SingleFieldConstraint(); clone.setConstraintValueType(sfc.getConstraintValueType()); clone.setExpressionValue((ExpressionFormLine) visit(sfc.getExpressionValue())); clone.setFieldBinding(sfc.getFieldBinding()); clone.setFactType(sfc.getFactType()); clone.setFieldName(sfc.getFieldName()); clone.setFieldType(sfc.getFieldType()); clone.setId(sfc.getId()); clone.setOperator(sfc.getOperator()); clone.setParent((FieldConstraint) visit(sfc.getParent())); for (Map.Entry<String, String> entry : sfc.getParameters().entrySet()) { clone.setParameter(entry.getKey(), entry.getValue()); } clone.setValue(sfc.getValue()); if (sfc.getConnectives() != null) { clone.setConnectives(new ConnectiveConstraint[sfc.getConnectives().length]); for (int i = 0; i < sfc.getConnectives().length; i++) { clone.getConnectives()[i] = (ConnectiveConstraint) visit(sfc.getConnectives()[i]); } } return clone; }