Package reportgen.prototype.queryresults

Examples of reportgen.prototype.queryresults.ResultsRow


     * @return
     * @throws reportgen.ren.exception.ReportException
     */
    private List<ResultsRow> getSummRows() throws ReportException {
        List<ResultsRow> resultRows = new ArrayList<ResultsRow>();
        ResultsRow row = rows.get(0).clone();
        resultRows.add(row);
        row.initSummRow(data.getModes());
        for (int i = 1; i < rows.size(); i++) {
            row.merge(rows.get(i), null, data.getModes());
        }
        row.normalize(data.getModes());
        return resultRows;
    }
View Full Code Here


        List<TableProcessor> list = getAvailiableFormats();


        List<Map> models = new LinkedList<Map>();
        for(int i=0; i<results.getRowCount(); i++) {
            ResultsRow row = results.getRow(i);

            Map<ResultColumn, Object> model = new HashMap<ResultColumn, Object>();
            ResultColumnList cols = query.getColumns();
            for(int j=0; j< cols.size(); j++) {
                model.put(cols.get(j).getProperties(), row.getValue(j));
            }
            models.add(model);
        }

        for(TableProcessor format: list) {
View Full Code Here

        if(getActiveRows().isSingle()) {
            return defaultResults.getRow(0).getValue(col);
        }
        List set = new ArrayList();
        for(int i=0; i<defaultResults.getRowCount(); i++) {
            ResultsRow iRow = defaultResults.getRow(i);
            set.add(iRow.getValue(col));
        }
        return set;
    }
View Full Code Here

        if(isDefaultConstant() || !needUserActivity) {
            return null;
        }
        ArrayList<Object> options = new ArrayList<Object>();
        for(int i=0; i<queryResults.getRowCount(); i++) {
            ResultsRow row = queryResults.getRow(i);
            options.add(row.getValue(selectColumn));
        }

        return new UserInputSelect(new Integer(report.getId()).toString(),
                selectTitle, selectDescription, selectedRows, options, rowCount, canBeOmitted);
    }
View Full Code Here

            return queryResults.getRow(selectedRows.get(0)).getValue(col);
        }
        //several rows
        List set = new ArrayList();
        for(int i=0; i<selectedRows.size(); i++) {
            ResultsRow iRow = queryResults.getRow(selectedRows.get(i));
            set.add(iRow.getValue(col));
        }
        return set;
    }
View Full Code Here

            ResultsRowList rrlist = new ResultsRowList(colProps, core.getPostConditions(), core.getRowCount());

            //fill result set
            for(Object row: sqlQuery.getResultList()) {
                Map<QEntityProperty, Object> model = processor.analyze(row);
                ResultsRow resultRow = buildResultsRow(manager, core, model);
                rrlist.appendRow(resultRow);
            }
            System.out.println("<<<<<<<<<< CONTINUE 1 ANALYZE RESULTS >>>>>>>>>>>>>>");
            rrlist.commit();
            results.add(rrlist);
View Full Code Here

     * @param row
     */
    private ResultsRow buildResultsRow(EntityManager manager, QCore core,
            Map<QEntityProperty, Object> model) throws ReportException {
        List<QueryResultColumn> colProps = core.getColumns().getList();
        ResultsRow rr = new ResultsRow(colProps.size());
        // для каждой колонки получаем значение
        int i=0;
        for(QueryResultColumn col: colProps) {
            MathExpressionGeneric expession = col.getExpression();
            rr.setValue(i, expession.getValue(model));
            i++;
        }

        InlineCoreJavaList javacores = core.getResultInJavaList();
        if(javacores != null) {
View Full Code Here

TOP

Related Classes of reportgen.prototype.queryresults.ResultsRow

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.