Package org.netbeans.modules.exceptions.entity

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


    }

    private void verifyMergedReport(Report r) {
        assertTrue(r.getSubmitCollection().isEmpty());
        assertEquals(1, r.getCommentCollection().size());
        ReportComment rc = r.getCommentCollection().iterator().next();
        assertTrue(rc.getComment(), rc.getComment().contains("This report was marked "
                + "as a duplicate of <a href='http://statistics.netbeans.org/exceptions/detail.do?id=2'>report 2</a>"));
    }
View Full Code Here


        return mapping.findForward(SUCCESS);
    }

    void addComment(EntityManager em, String userName, Report report, String comment) {
        em.getTransaction().begin();
        ReportComment rc = new ReportComment(Utils.getNextId(ReportComment.class));
        rc.setComment(comment);
        rc.setReportId(report);
        rc.setCommentDate(new Date());
        rc.setNbuserId(getNbUser(em, userName));
        em.persist(rc);
        em.getTransaction().commit();
    }
View Full Code Here

                        report.preloadSubmitCollection(em);
                        for (Submit sub : report.getSubmitCollection()) {
                            sub.setReportId(rootReport);
                            em.merge(sub);
                        }
                        ReportComment rc = new ReportComment();
                        rc.generateId();
                        rc.setReportId(report);
                        String message = String.format(MARKED_AS_DUPLICATE, rootReport.getId());
                        rc.setComment(message);

                        rc.setNbuserId(getReporterUser(em));
                        em.persist(rc);
                    }
                }
                return TransactionResult.COMMIT;
            }
View Full Code Here

TOP

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

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.