Package org.netbeans.modules.exceptions.entity

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


        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();
        List<String> list = new DetailAction().getPatches(em, exc, hand.list);
        assertNotNull(list);
View Full Code Here


        }
        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;
                }
            });
        } else {
            if (moduleName != null) {
                request.setAttribute("last_module_name", moduleName);
            }
            if (specVersion != null) {
                request.setAttribute("last_spec_version", specVersion);
            }
        }
        if (drop != null) {
            final Integer dropId = Integer.parseInt(drop);
            Utils.processPersistable(new Persistable.Transaction() {

                public TransactionResult runQuery(EntityManager em) {
                    Patch removedPatch = em.find(Patch.class, dropId);
                    em.remove(removedPatch);
                    return TransactionResult.COMMIT;
                }
            });
        }
View Full Code Here

TOP

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

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.