Package javax.jdo

Examples of javax.jdo.PersistenceManager.deletePersistent()


            while(puit.hasNext()) {
                ProductUnits pu = (ProductUnits) puit.next();
                System.out.println("remove : " + pu);
                pm.deletePersistent(pu);
            }
            pm.deletePersistent(i);
        }
        q.closeAll();
        pm.currentTransaction().commit();
        pm.close();
    }
View Full Code Here


    public void removeInvoice(Invoice i) {
        PersistenceManager pm = pmf.getPersistenceManager();
        pm.currentTransaction().begin();
        pm.deletePersistentAll(i.getProductUnits());
        pm.deletePersistent(i);
        pm.currentTransaction().commit();
        pm.close();
    }

}
View Full Code Here

      assertTrue(b3.getAs().contains(a2));
      assertTrue(b3.getAs().contains(a3));
      closePM(pm, threadId, txId, task, res);
      pm = getPM(task, threadId, txId);
      beginTx(pm, task, threadId, txId);
      pm.deletePersistent(pm.getObjectById(oidb3, false));
      commitTx(pm, task, threadId, txId);
      closePM(pm, threadId, txId, task, res);
      pm = getPM(task, threadId, txId);

      assertTrue(a1.getBs().size() == 1);
View Full Code Here

      assertTrue(!b2.getAs().contains(a1));
      assertTrue(!b2.getAs().contains(a2));
      assertTrue(b2.getAs().contains(a3));

      beginTx(pm, task, threadId, txId);
      pm.deletePersistent(pm.getObjectById(oida1, false));
      pm.deletePersistent(pm.getObjectById(oida2, false));
      pm.deletePersistent(pm.getObjectById(oida3, false));
      pm.deletePersistent(pm.getObjectById(oidb1, false));
      pm.deletePersistent(pm.getObjectById(oidb2, false));
      commitTx(pm, task, threadId, txId);
View Full Code Here

      assertTrue(!b2.getAs().contains(a2));
      assertTrue(b2.getAs().contains(a3));

      beginTx(pm, task, threadId, txId);
      pm.deletePersistent(pm.getObjectById(oida1, false));
      pm.deletePersistent(pm.getObjectById(oida2, false));
      pm.deletePersistent(pm.getObjectById(oida3, false));
      pm.deletePersistent(pm.getObjectById(oidb1, false));
      pm.deletePersistent(pm.getObjectById(oidb2, false));
      commitTx(pm, task, threadId, txId);
View Full Code Here

      assertTrue(b2.getAs().contains(a3));

      beginTx(pm, task, threadId, txId);
      pm.deletePersistent(pm.getObjectById(oida1, false));
      pm.deletePersistent(pm.getObjectById(oida2, false));
      pm.deletePersistent(pm.getObjectById(oida3, false));
      pm.deletePersistent(pm.getObjectById(oidb1, false));
      pm.deletePersistent(pm.getObjectById(oidb2, false));
      commitTx(pm, task, threadId, txId);

      res.endTest();
View Full Code Here

      beginTx(pm, task, threadId, txId);
      pm.deletePersistent(pm.getObjectById(oida1, false));
      pm.deletePersistent(pm.getObjectById(oida2, false));
      pm.deletePersistent(pm.getObjectById(oida3, false));
      pm.deletePersistent(pm.getObjectById(oidb1, false));
      pm.deletePersistent(pm.getObjectById(oidb2, false));
      commitTx(pm, task, threadId, txId);

      res.endTest();
    } catch (JDOFatalException e) {
View Full Code Here

      beginTx(pm, task, threadId, txId);
      pm.deletePersistent(pm.getObjectById(oida1, false));
      pm.deletePersistent(pm.getObjectById(oida2, false));
      pm.deletePersistent(pm.getObjectById(oida3, false));
      pm.deletePersistent(pm.getObjectById(oidb1, false));
      pm.deletePersistent(pm.getObjectById(oidb2, false));
      commitTx(pm, task, threadId, txId);

      res.endTest();
    } catch (JDOFatalException e) {
      rollbackOnException(pm, e, res, task, threadId, txId);
View Full Code Here

      assertSameCollection("The set of ref", expectedRef, ac.getSet_ref());

      // Execute second transaction on persistent Collections
      beginTx(pm, task, threadId, txId);
      logger.log(BasicLevel.DEBUG, ac.getId() + " is being deleted");
      pm.deletePersistent(ac);
      commitTx(pm, task, threadId, txId);
      res.endTest();
     
    } catch (JDOFatalException e) {
      rollbackOnException(pm, e, res, task, threadId, txId);
View Full Code Here

      assertTrue(b2.getA() == null);
      assertTrue(a2.getB() == null);

      // Delete persistent (speedoproxy)
      beginTx(pm, task, threadId, txId);
      pm.deletePersistent(a1);
      pm.deletePersistent(a2);
      pm.deletePersistent(b1);
      pm.deletePersistent(b2);
      commitTx(pm, task, threadId, txId);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.