Examples of deletePersistent()


Examples of javax.jdo.PersistenceManager.deletePersistent()

    Assert.assertEquals("Bad group name", gName, grp.getName());
   
    /* Delete the group.
     */
    pm.currentTransaction().begin();
    pm.deletePersistent(grp);
    pm.currentTransaction().commit();
        pm.close();
      
        // Check that the group has been deleted
        pm = pmf.getPersistenceManager();
View Full Code Here

Examples of javax.jdo.PersistenceManager.deletePersistent()

                Iterator it = col.iterator();
                while(it.hasNext()) {
                    Object o = it.next();
                    Assert.assertNotNull("null object in the query result"
                        + cs[i].getName(), o);
                    pm.deletePersistent(o);

                }
                query.close(col);
            }
          pm.currentTransaction().commit();
View Full Code Here

Examples of javax.jdo.PersistenceManager.deletePersistent()

   
    /* Delete the group :
     * this should delete the president.
     */
    pm.currentTransaction().begin();
    pm.deletePersistent(grp);
    pm.currentTransaction().commit();
        pm.close();
      
        // Check that the president has been deleted
        pm = pmf.getPersistenceManager();
View Full Code Here

Examples of javax.jdo.PersistenceManager.deletePersistent()

        r2 = (Registry) r1.lookup("a");
        Assert.assertNotNull("null instance returned by r1.lookup(a)", r2);
        r3 = (Registry) r1.lookup("b");
        Assert.assertNotNull("null instance returned by r1.lookup(b)", r3);
        pm.currentTransaction().begin();
        pm.deletePersistent(r1);
        pm.deletePersistent(r2);
        pm.deletePersistent(r3);
        pm.currentTransaction().commit();
        pm.close();
    }
View Full Code Here

Examples of javax.jdo.PersistenceManager.deletePersistent()

        Assert.assertNotNull("null instance returned by getObjectById", e1);
        Assert.assertEquals("Bad employee name", "e1", e1.getName());
        Assert.assertNotNull("null instance returned by getObjectById", e1.getBoss());
        Assert.assertEquals("Bad boss name", "e2", e1.getBoss().getName());
        pm.currentTransaction().begin();
        pm.deletePersistent(e1);
        pm.deletePersistent(e1.getBoss());
        pm.currentTransaction().commit();
        pm.close();
  }
View Full Code Here

Examples of javax.jdo.PersistenceManager.deletePersistent()

        r3 = (Registry) r1.lookup("b");
        Assert.assertNotNull("null instance returned by r1.lookup(b)", r3);
        pm.currentTransaction().begin();
        pm.deletePersistent(r1);
        pm.deletePersistent(r2);
        pm.deletePersistent(r3);
        pm.currentTransaction().commit();
        pm.close();
    }

  public void testA() {
View Full Code Here

Examples of org.apache.jetspeed.components.persistence.store.PersistenceStore.deletePersistent()

        {
            prepareTransaction(store);

            entityCache.remove(portletEntity.getId());

            store.deletePersistent(portletEntity);

            store.getTransaction().checkpoint();
        }
        catch (Exception e)
        {
View Full Code Here

Examples of org.apache.jetspeed.components.persistence.store.ojb.pb.PBStore.deletePersistent()

        a2.setName("a2");
        store2.makePersistent(a2);
        store2.getTransaction().commit();
       
        store2.getTransaction().begin();
        store2.deletePersistent(a2);
        store2.getTransaction().commit();
       
        mockListener.verify();
    }
View Full Code Here

Examples of org.apache.ojb.odmg.TransactionImpl.deletePersistent()

        DListEntry entry = (DListEntry) elements.get(index);
        // if we are in a transaction: acquire locks !
        TransactionImpl tx = getTransaction();
        if (checkForOpenTransaction(tx))
        {
            tx.deletePersistent(new RuntimeObject(entry, tx));
        }
        elements.remove(index);
        // changing the position markers of entries:
        int offset = 0;
        try
View Full Code Here

Examples of org.apache.ojb.odmg.TransactionImpl.deletePersistent()

            oldValue = correctEntry.getValue();
            i.remove();
            TransactionImpl tx = getTransaction();
            if ((tx != null) && (tx.isOpen()))
            {
                tx.deletePersistent(new RuntimeObject(correctEntry, tx));
            }
        }
        return oldValue;
    }
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.