Package org.netbeans.modules.exceptions.entity

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


        addLog(f, "log444");
        logsManager.close();
        logsManager = LogsManager.createManager(data);
        EntityManager em = perUtils.createEntityManager();
        em.getTransaction().begin();
        Nbversion version = (Nbversion) PersistenceUtils.getExist(em, "Nbversion.findByVersion", "6.0");
        Nbversion version61 = (Nbversion) PersistenceUtils.getExist(em, "Nbversion.findByVersion", "6.1");
        assertNotNull(version);
        assertNotNull(version61);
        waitVersionRecountFinished(version61);
        List<Value> values61 = LogsManager.getDefault().getVersionStatistics(version61).getData();
        assertNotNull(values61);
View Full Code Here


    }

    protected List<String> getPatches(EntityManager em, Exceptions exceptions, List<LogRecord> records) {

        Logfile logfile = exceptions.getLogfileId();
        Nbversion version = logfile.getProductVersionId().getNbversionId();
        Map<String, Object> params = Collections.singletonMap("nbversion", (Object) version);
        List<Patch> patches = PersistenceUtils.executeNamedQuery(em, "Patch.findNbVersion", params, Patch.class);
        NetBeansModules modules = new NetBeansModules();
        modules.setRememberDistinctVersions(true);
        List<String> installedPatches = new ArrayList<String>();
View Full Code Here

    public static Submit prepareData(EntityManager em, int i, boolean isSlowness) throws IOException {
        Nbuser user = new Nbuser(i);
        user.setName(SOME_EXISTING_USERS[i % SOME_EXISTING_USERS.length]);
        em.persist(user);

        Nbversion version = (Nbversion) PersistenceUtils.getExist(em, "Nbversion.findByVersion", "6.8");
        if (version == null) {
            version = new Nbversion(i);
            version.setVersion("6.8");
            em.persist(version);
        }

        ProductVersion pv = (ProductVersion) PersistenceUtils.getExist(em, "ProductVersion.findByProductVersion", "NetBeans IDE 6.8 Beta (Build 200910020947)");
        if (pv == null) {
View Full Code Here

        waitLog(log, IP1);
       
        Utils.processPersistable(reports);
        LogsManager.getDefault().preparePageContext(page, IP1, null);
        exceptionReports = (ExceptionReports.Data)page.getAttribute("globalExceptionReports");
        Nbversion version = perUtils.getAll(Nbversion.class).get(0);
        assertEquals(exceptionReports.getMonthStats().get(0), new ExceptionReports.ReportItem(1, 7, 1, version));
        assertEquals(exceptionReports.getMonthStats().get(1), new ExceptionReports.ReportItem(2, 7, 1, version));
        assertEquals(exceptionReports.getMonthStats().get(2), new ExceptionReports.ReportItem(3, 7, 1, version));
       
        log = LogsManagerTest.extractResourceAs(LogsManagerTest.class, data, "dup2", "NB2040811605.4");
View Full Code Here

        assertFalse(exceptionReports.getMonthStats().contains(new ExceptionReports.ReportItem(9, 7, 0, version)));// 0 <= MIN_COUNT
        assertTrue(exceptionReports.getMonthStats().contains(new ExceptionReports.ReportItem(8, 7, 1, version)));
    }
   
    public void testReportItem() throws Exception{
        Nbversion version = new Nbversion();
        ExceptionReports.ReportItem item = new ExceptionReports.ReportItem(8, 7, 5, version);
        assertEquals("Aug7", item.getKey());
        item = new ExceptionReports.ReportItem(11, 4, 9, version);
        assertEquals("Nov4", item.getKey());
        item = new ExceptionReports.ReportItem(1, 2, 1, version);
View Full Code Here

        EntityManager em = perUtils.createEntityManager();
        em.getTransaction().begin();
        Logfile log = new Logfile("testDir", 1);
        ProductVersion pv = new ProductVersion(1);
        pv.setProductVersion("NetBeans IDE 6.0 (Build 081204)");
        Nbversion nbv = new Nbversion(1);
        nbv.setVersion("6.0");
        pv.setNbversionId(nbv);
        log.setProductVersionId(pv);
        TestLogFileTask task = new TestLogFileTask(em, log);
        Nbuser user = new Nbuser(1);
        user.setName("HALLO");
View Full Code Here

            request.setAttribute("last_version", nbVersion);
        }
        if ((patchName != null) && (moduleName != null) && (specVersion != null) && (nbVersion != null)) {
            Utils.processPersistable(new Persistable.Transaction() {
                public TransactionResult runQuery(EntityManager em) {
                    Nbversion entity = (Nbversion) PersistenceUtils.getExist(em, "Nbversion.findByVersion", nbVersion);
                    Patch newPatch = new Patch(patchName, moduleName, specVersion, entity);
                    em.persist(newPatch);
                    return TransactionResult.COMMIT;
                }
            });
View Full Code Here

TOP

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

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.