public JRDesignGroup getGroup(DRIDesignGroup group) {
   JRDesignGroup jrGroup =
       (JRDesignGroup) accessor.getDesign().getGroupsMap().get(group.getName());
   if (jrGroup == null)
     throw new JasperDesignException("Group " + group.getName() + " is not registered");
   return jrGroup;
 }
 public void transformExpressions() {
   for (DRIDesignGroup group : accessor.getReport().getGroups()) {
     getGroup(group)
         .setExpression(
             accessor.getExpressionTransform().getExpression(group.getGroupExpression()));
   }
 }
 private JRDesignGroup group(DRIDesignGroup group) {
   JRDesignGroup jrGroup = new JRDesignGroup();
   jrGroup.setName(group.getName());
   jrGroup.setReprintHeaderOnEachPage(group.isReprintHeaderOnEachPage());
   jrGroup.setStartNewColumn(group.isStartInNewColumn());
   jrGroup.setStartNewPage(group.isStartInNewPage());
   jrGroup.setResetPageNumber(group.isResetPageNumber());
   if (group.getMinHeightToStartNewPage() != null) {
     jrGroup.setMinHeightToStartNewPage(group.getMinHeightToStartNewPage());
   }
   jrGroup.setFooterPosition(ConstantTransform.groupFooterPosition(group.getFooterPosition()));
   jrGroup.setKeepTogether(group.isKeepTogether());
   return jrGroup;
 }
 private void addGroup(DRIDesignGroup group) {
   try {
     JRDesignGroup jrGroup = group(group);
     accessor.getDesign().addGroup(jrGroup);
   } catch (JRException e) {
     throw new JasperDesignException(
         "Registration failed for group \"" + group.getName() + "\"", e);
   }
 }