Examples of QCore


Examples of reportgen.prototype.QCore

    }

    private void initCores() throws ReportException {
        CoresList cores = reportQuery.getCores();
        for(int i=0; i<cores.size(); i++) {
            QCore core = cores.get(i);
            CorePanel panel = new CorePanel(parent, core);
            tabs.put(core, panel);
            maintab.add(panel, 1);
            maintab.setTitleAt(1, "Выборка '" + core.toString() + "'");
        }
    }
View Full Code Here

Examples of reportgen.prototype.QCore

            CoreFactoryList factory = new CoreFactoryList();
            List<String> cores = factory.getCores();
            if(cores.size() == 0) {
                throw new ReportException("Нет доступных типов выборок");
            }
            QCore core = null;
            if(cores.size() == 1) {
                core = factory.createCore(0, reportQuery.getReportContext(new NoNeedAtom()));
            } else {
                Object title = JOptionPane.showInputDialog(parent, "Выберите тип нового запроса",
                        "", JOptionPane.QUESTION_MESSAGE, null, cores.toArray(), null);
                int index = cores.indexOf(title);
                if(index == -1) {
                    return;
                }
                core = factory.createCore(index, reportQuery.getReportContext(new NoNeedAtom()));
            }
            reportQuery.getCores().add(core);

            CorePanel panel = new CorePanel(parent, core);
            tabs.put(core, panel);
            maintab.add(panel, 1);
            maintab.setTitleAt(1, "Выборка '" + core.toString() + "'");
        }
View Full Code Here

Examples of reportgen.prototype.QCore

            maintab.setTitleAt(1, "Выборка '" + core.toString() + "'");
        }

        @Override
        protected void removeCore(int index) throws ReportException {
            QCore core = reportQuery.getCores().get(index);
            reportQuery.getCores().remove(index);
           
            CorePanel panel = tabs.remove(core);
            if(panel != null) {
                maintab.remove(panel);
View Full Code Here

Examples of reportgen.prototype.QCore

            }
        }

        @Override
        protected void editCore(int index) throws ReportException {
            QCore core = reportQuery.getCores().get(index);
            String title = JOptionPane.showInputDialog(parent, "Изменение названия запроса",
                    core.getTitle(), JOptionPane.QUESTION_MESSAGE);
            if(title == null) {
                return;
            }
            core.setTitle(title);
            CorePanel panel = tabs.get(core);
            int panelIndex = maintab.indexOfComponent(panel);
            if(panelIndex != -1) {
                maintab.setTitleAt(panelIndex, "Выборка '" + title + "'");
            }
View Full Code Here

Examples of reportgen.prototype.QCore

        this.rowCount = new RowCount();
        this.version = ReportFactory.getActualVersion();
        this.cores = new CoresList(this);

        CoreFactoryList factory = new CoreFactoryList();
        QCore core = factory.createDefaultCore(getReportContext(new NoNeedAtom()));
        this.cores.add(core);
    }
View Full Code Here

Examples of reportgen.prototype.QCore

        }

        //get all subreport columns
        Set set = new HashSet();
        for(int i=0; i<cores.size(); i++) {
            QCore core = cores.get(i);
            core.buildUsedSet(UsedReportableType.subreport_column, set);
        }

        //check every subreport column, is it in specified subreport or not, and
        //if it does, mark it as used
        Iterator it = set.iterator();
View Full Code Here

Examples of reportgen.prototype.QCore

        subReports.validate();
        tableFormats.validate();

        //проверка, что результаты всех выборок соответствуют результатам отчета
        for(int i=0; i<cores.size(); i++) {
            QCore core = cores.get(i);
            CoreColumnList coreColumns = core.getColumns();
            if(coreColumns.size() != results.size()) {
                throw new ReportException("Результаты выборки '" + core.getTitle()
                    + "' не соответствуют результатам отчета");
            }

            for(int j=0; j<coreColumns.size(); j++) {
                QueryResultColumn coreCol = coreColumns.get(j);
View Full Code Here

Examples of reportgen.prototype.QCore


    @Override
    public void ensureSafeRemove(Object obj2remove) throws ReportException {
        for(int i=0; i<cores.size(); i++) {
            QCore core = cores.get(i);
            core.ensureSafeRemove(obj2remove);
        }
       
        if (results.isContain(obj2remove)) {
            throw new ReportException("Нельзя удалить этот элемент, ссылка на него содержится в "
                    + "результатах отчета");
View Full Code Here

Examples of reportgen.prototype.QCore

        CoresList cores = report.getCores();
        List<ResultsRowList> results = new ArrayList<ResultsRowList>();

        //execute cores
        for(int i=0; i<cores.size(); i++) {
            QCore core = cores.get(i);
            QSQLProcessor processor = core.getSQLProcessor();
            Query sqlQuery = prepareSQL(manager, processor);

            //prepare result set
            List<ResultColumn> colProps = new ArrayList<ResultColumn>();
            for(QueryResultColumn col:core.getColumns().getList()) {
                colProps.add(col.getProperty());
            }
            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);
View Full Code Here

Examples of reportgen.prototype.QCore

            return;
        }
        try {
            CoreColumnList cols = cores.get(0).getColumns();
            for(int i=1; i<cores.size(); i++) {
                QCore core = cores.get(i);
                if(core.getColumns().size() != cols.size()) {
                    throw new ReportException("Выборки отличаются количеством результатов");
                }
            }
            ResultColumnList results = query.getColumns();
            for(int j=0; j<cols.size(); j++) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.