Package org.netbeans.modules.exceptions.entity

Examples of org.netbeans.modules.exceptions.entity.Report


                    String query = "SELECT id FROM report WHERE (status & " + Report.Status.ISSUEZILLA_TRANSFER.intValue() + ") <> 0";
                    l = em.createNativeQuery(query).getResultList();
                }
                for (Iterator<Integer> it = l.iterator(); it.hasNext();) {
                    Integer id = it.next();
                    Report report = em.find(Report.class, id);
                    boolean changed = false;
                    if (!report.isInIssuezilla()) {
                        Integer bugId = reverseMap.get(report.getId());
                        if (bugId != null) {
                            report.setIssueId(bugId, SynchronizeIssues.class);
                            changed = true;
                            SYNCHRONIZATION_LOGGER.log(Level.INFO, "setting bugId {0} for report id {1}", new Object[]{bugId.toString(), id.toString()});
                        }
                    }
                    if (report.getIssueId() != null || reportsToClean.contains(report.getId())) {
                        report.setIssuezillaTransfer(false);
                        changed = true;
                        reportsToClean.remove(report.getId());
                        SYNCHRONIZATION_LOGGER.log(Level.INFO, "cleaning in transfer for report id {0}", id.toString());
                    } else {
                        reportsToClean.add(report.getId());
                    }
                    if (changed) {
                        em.merge(report);
                    }
                }
View Full Code Here


                    return TransactionResult.ROLLBACK;
                }
                for (Entry<Integer, Integer> mappingEntry : mappings.getMappings().entrySet()) {
                    Integer bugId = mappingEntry.getKey();
                    Integer cfAutoreporterId = mappingEntry.getValue();
                    Report rep = em.find(Report.class, cfAutoreporterId);
                    if (rep == null) {
                        continue;
                    }
                    if (rep.getIssueId() == null) {
                        SYNCHRONIZATION_LOGGER.log(Level.INFO, "updating report {0} from {1} to {2}", new Object[]{String.valueOf(cfAutoreporterId), String.valueOf(rep.getIssueId()), String.valueOf(bugId)});
                        rep.setIssueId(bugId, SynchronizeIssues.class);
                        em.merge(rep);
                    }
                }
                return TransactionResult.COMMIT;
            }
View Full Code Here

        em.getTransaction().begin();
        Exceptions exc = em.find(Exceptions.class, excData.getSubmitId());
        Throwable thr = exc.getMockThrowable();
        assertNotNull(Utils.checkOpenIssues(em, thr));

        Report r = em.find(Report.class, excData.getReportId());
        r.setIssueId(issueID);
        em.persist(r);
        em.getTransaction().commit();

        assertNotNull(Utils.checkIssue(em, thr));
        assertNull(Utils.checkOpenIssues(em, thr));
View Full Code Here

TOP

Related Classes of org.netbeans.modules.exceptions.entity.Report

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.