Package org.netbeans.modules.exceptions.entity

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


        Utils.processPersistable(brc);
        return brc.getResult();
    }

    public TransactionResult runQuery(EntityManager em) throws Exception {
        Nbversion version = (Nbversion) PersistenceUtils.getExist(em, "Nbversion.findByVersion", Nbversion.DEV_VERSION);
        List<Object[]> rs = PersistenceUtils.executeNamedQuery(em, "Exceptions.groupByBuilds", Collections.singletonMap("version", version));
        if (rs.isEmpty()) {
            bugReportCounts = Collections.<Data>emptyList();
        } else {
            ArrayList<Data> reportCounts = new ArrayList<Data>();
View Full Code Here


        }

        private boolean isOldBuild(Logfile tempLog) {
            ProductVersion pv = tempLog.getProductVersionId();
            if (pv != null){
                Nbversion nbv = pv.getNbversionId();
                if (nbv != null){
                    if (Nbversion.DEV_VERSION.equals(nbv.getVersion())){
                        if (tempLog.getBuildnumber() < getFirstDevBuild()){
                            return true;
                        }
                    } else if(!getReleaseVersions().contains(nbv.getVersion())){
                        return true;
                    }
                }
            }
            return false;
View Full Code Here

                org.netbeans.web.Utils.processPersistable(this);
            }

            private void prepareVersionRecount(EntityManager em) {
                for (String versionName : getReleaseVersions()) {
                    Nbversion version = (Nbversion) PersistenceUtils.getExist(em, "Nbversion.findByVersion", versionName);// NOI18N
                    if (version != null){
                        preparedVersionRecounts.add(new VersionRecount(dir, version));
                    }
                }
            }
View Full Code Here

            ProductVersion  pVersion = logInfo.getProductVersionId();
            if (pVersion == null){
                return;
            }
            Nbversion version = pVersion.getNbversionId();
            VersionData versionData = LogsManager.getDefault().getVersionStatistics(version);
            if (versionData != null){
                info.addValues(versionData.getData());
                versionData.addLog();
            }
View Full Code Here

    @Test
    public void testGetStats() {
        EntityManager em = perUtils.createEntityManager();
        em.getTransaction().begin();

        Nbversion nv = new Nbversion(1);
        nv.setVersion(Nbversion.DEV_VERSION);
        em.persist(nv);

        ProductVersion pw = new ProductVersion(1);
        pw.setNbversionId(nv);
        pw.setProductVersion("pw");
View Full Code Here

        em.getTransaction().begin();
        Logfile log = new Logfile("testDir", 1);
        TestLogFileTask task = new TestLogFileTask(em, log);
        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);
        Nbuser user = new Nbuser(1);
        user.setName("HALLO");
        Slowness slown = new Slowness(100);
View Full Code Here

        waitLog(log, IP1);
        TestHandler hand = new TestHandler();
        InputStream is = new FileInputStream(log);
        LogRecords.scan(is, hand);
        EntityManager em = perUtils.createEntityManager();
        Nbversion nbVersion = PersistenceUtils.getAll(em, Nbversion.class).get(0);
        Exceptions exc = PersistenceUtils.getAll(em, Exceptions.class).get(0);
        Patch patch = new Patch(PatchName, ModuleName, "1.1", nbVersion);
        em.getTransaction().begin();
        em.persist(patch);
        em.getTransaction().commit();
View Full Code Here

        exc.setReportId(report);
        Stacktrace stack = new Stacktrace(Utils.getNextId(Stacktrace.class));
        Logfile logfile = new Logfile(userId, 0);
        ProductVersion pVersion = new ProductVersion(Utils.getNextId(ProductVersion.class));
        pVersion.setProductVersion("pVersion");
        Nbversion version = new Nbversion(Utils.getNextId(Nbversion.class));
        version.setVersion("version");
        pVersion.setNbversionId(version);
        logfile.setProductVersionId(pVersion);
        exc.setLogfileId(logfile);
        exc.setStacktrace(stack);
        em.persist(version);
View Full Code Here

        assertEquals(expectedResult,Utils.getNbVersion(productVersion));

    }

    public void testGetVersionNumber() {
        Nbversion nbv = new Nbversion();
        nbv.setVersion(Utils.getNbVersion("NetBeans IDE 6.0 beta"));
        String result = Utils.getBugzillaVersion(nbv);
        assertEquals("6.0", result);
        nbv.setVersion(Utils.getNbVersion("NetBeans IDE 6.0"));
        result = Utils.getBugzillaVersion(nbv);
        assertEquals(result, "6.0", result);
        nbv.setVersion(Utils.getNbVersion("NetBeans IDE 6.0.1 RC1"));
        result = Utils.getBugzillaVersion(nbv);
        assertEquals("6.0.1", result);
        nbv.setVersion(Utils.getNbVersion("NetBeans IDE 6.5.1"));
        result = Utils.getBugzillaVersion(nbv);
        assertEquals("6.5", result);
        nbv.setVersion(Utils.getNbVersion("NetBeans IDE 6.5"));
        result = Utils.getBugzillaVersion(nbv);
        assertEquals("6.5", result);
        nbv.setVersion(Utils.getNbVersion("NetBeans IDE 6.7"));
        result = Utils.getBugzillaVersion(nbv);
        assertEquals("6.7", result);
        nbv.setVersion(Utils.getNbVersion("NetBeans IDE Dev"));
        result = Utils.getBugzillaVersion(nbv);
        assertEquals(Nbversion.DEFAULT_VERSION, result);
    }
View Full Code Here

    private void performTest(String productVersion, String TM, boolean result){
        org.netbeans.modules.exceptions.entity.Exceptions exc = new org.netbeans.modules.exceptions.entity.Exceptions();
        Logfile lf = new Logfile();
        ProductVersion pv = new ProductVersion();
        Nbversion nb = new Nbversion();
        lf.setProductVersionId(pv);
        pv.setNbversionId(nb);
        exc.setLogfileId(lf);
        String nbVersion = org.netbeans.modules.exceptions.utils.Utils.getNbVersion(productVersion);
        nb.setVersion(nbVersion);
        Issue iss = new Issue(1);
        iss.setTargetMilestone(TM);
        assertEquals(result, Utils.isIssueTMBeforeExcProductVersion(exc, iss));
    }
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.