private void flatten(VariableRestrictionDescr descr,
VerifierComponent parent, int orderNumber) {
Variable variable = data.getVariableByRuleAndVariableName(currentRule
.getRuleName(), descr.getIdentifier());
VariableRestriction restriction = new VariableRestriction();
restriction.setRuleId(currentRule.getId());
restriction.setRuleName(currentRule.getRuleName());
restriction.setPatternId(currentPattern.getId());
restriction.setPatternIsNot(currentPattern.isPatternNot());
restriction.setConstraintId(currentConstraint.getId());
restriction.setFieldId(currentConstraint.getFieldId());
restriction.setOperator(Operator.determineOperator(
descr.getEvaluator(), descr.isNegated()));
restriction.setVariable(variable);
restriction.setOrderNumber(orderNumber);
restriction.setParent(parent);
// Set field value, if it is unset.
currentField.setFieldType(Field.FieldType.VARIABLE);
data.add(restriction);