if (insertGroup instanceof RelationalGroup == false)
{
if (lastGroup == null)
{
definition.setRootGroup(group);
group.setBody(new SubGroupBody(insertGroup));
return;
}
final GroupBody body = lastGroup.getBody();
final SubGroupBody sgb = new SubGroupBody(group);
lastGroup.setBody(sgb);
group.setBody(body);
return;
}
final GroupBody body = insertGroup.getBody();
if (body instanceof SubGroupBody == false)
{
final SubGroupBody sgb = new SubGroupBody(group);
insertGroup.setBody(sgb);
group.setBody(body);
return;
}
lastGroup = insertGroup;
final SubGroupBody sgb = (SubGroupBody) body;
insertGroup = sgb.getGroup();
}
}