class GuidedDTDRLPersistence {

    void doActions(List<BaseColumn> allColumns,
                   List<ActionCol52> actionCols,
                   TemplateDataProvider rowDataProvider,
                   List<DTCellValue52> row,
                   RuleModel rm) {

        List<LabelledAction> actions = new ArrayList<LabelledAction>();
        for (ActionCol52 c : actionCols) {

            if (c instanceof LimitedEntryBRLActionColumn) {
                doAction(allColumns,
                         (LimitedEntryBRLActionColumn) c,
                         actions,
                         rowDataProvider,
                         row,
                         rm);
            } else if (c instanceof BRLActionColumn) {
                doAction(allColumns,
                         (BRLActionColumn) c,
                         actions,
                         rowDataProvider,
                         row,
                         rm);
            } else {

                int index = allColumns.indexOf(c);
                DTCellValue52 dcv = row.get(index);
                String cell = "";

                if (c instanceof LimitedEntryCol) {
                    if (dcv.getBooleanValue() == true) {
                        LimitedEntryCol lec = (LimitedEntryCol) c;
                        cell = GuidedDTDRLUtilities.convertDTCellValueToString(lec.getValue());
                    }
                } else {
                    cell = GuidedDTDRLUtilities.convertDTCellValueToString(dcv);
                }

                if (validCell(cell,
                              dcv.getDataType())) {
                    if (c instanceof ActionWorkItemInsertFactCol52) {
                        doAction(actions,
                                 (ActionWorkItemInsertFactCol52) c,
                                 cell);
                    } else if (c instanceof ActionInsertFactCol52) {
                        doAction(actions,
                                 (ActionInsertFactCol52) c,
                                 cell);
                    } else if (c instanceof ActionWorkItemSetFieldCol52) {
                        doAction(actions,
                                 (ActionWorkItemSetFieldCol52) c,
                                 cell);
                    } else if (c instanceof ActionSetFieldCol52) {
                        doAction(actions,
                                 (ActionSetFieldCol52) c,
                                 cell);
                    } else if (c instanceof ActionRetractFactCol52) {
                        doAction(actions,
                                 cell);
                    } else if (c instanceof ActionWorkItemCol52) {
                        doAction(actions,
                                 (ActionWorkItemCol52) c,
                                 cell);
                    }
                }
            }
        }

        rm.rhs = new IAction[actions.size()];
        for (int i = 0; i < rm.rhs.length; i++) {
            rm.rhs[i] = actions.get(i).action;
        }
    }

}