class GuidedDTDRLPersistence {

    void doConditions(List<BaseColumn> allColumns,
                      List<CompositeColumn<? extends BaseColumn>> conditionPatterns,
                      TemplateDataProvider rowDataProvider,
                      List<DTCellValue52> row,
                      List<List<DTCellValue52>> data,
                      RuleModel rm) {

        List<IPattern> patterns = new ArrayList<IPattern>();

        for (CompositeColumn<?> cc : conditionPatterns) {

            if (cc instanceof LimitedEntryBRLConditionColumn) {
                doCondition(allColumns,
                            (LimitedEntryBRLConditionColumn) cc,
                            patterns,
                            rowDataProvider,
                            row,
                            rm);
            } else if (cc instanceof BRLConditionColumn) {
                doCondition(allColumns,
                            (BRLConditionColumn) cc,
                            patterns,
                            rowDataProvider,
                            row,
                            rm);
            } else if (cc instanceof Pattern52) {
                doCondition(allColumns,
                            (Pattern52) cc,
                            patterns,
                            row,
                            data,
                            rm);
            }
        }
        rm.lhs = patterns.toArray(new IPattern[patterns.size()]);
    }

}