Package javax.jdo

Examples of javax.jdo.PersistenceManager.deletePersistentAll()


    pm.currentTransaction().commit();
    pm.evictAll();
    pm.currentTransaction().begin();
    ar1 = (AutoRef) pm.getObjectById(
        pm.newObjectIdInstance(AutoRef.class, "testA_ar1"), false);
    pm.deletePersistentAll(ar1.getMyRefs());
    pm.deletePersistent(ar1.getMyRef());
    pm.deletePersistent(ar1);
    pm.currentTransaction().commit();
    pm.close();   
  }
View Full Code Here


    pm.currentTransaction().begin();
    H h0 = (H) pm.getObjectById(pm.newObjectIdInstance(H.class, "hid_0"), false);
    assertNotNull("Null h0", h0);
    g = h0.getG();
    assertNotNull("Null g", g);
    pm.deletePersistentAll(g.getHs());
    pm.deletePersistent(g);
    pm.currentTransaction().commit();
    pm.close();

  }
View Full Code Here

    }
    pm.currentTransaction().commit();

    //Clean up
    pm.currentTransaction().begin();
    pm.deletePersistentAll(g.getHs());
    pm.deletePersistent(g);
    pm.currentTransaction().commit();
    pm.close();

  }
View Full Code Here

            al.add(new AutoIncFieldId());
            Ref2AutoIncFieldId ref = new Ref2AutoIncFieldId(new AutoIncFieldId(), al);
            pm.makePersistent(ref);
            pm.currentTransaction().commit();
            pm.currentTransaction().begin();
            pm.deletePersistentAll(al);
      pm.deletePersistent(ref.getSimpleRef());
            pm.deletePersistent(ref);
            pm.currentTransaction().commit();
            pm.close();
        } catch (Exception e) {
View Full Code Here

      Collection col1 = new java.util.HashSet();
      col1.add(ba2);
      col1.add(ba3);

      pm2.deletePersistentAll(col1);

      throw new Exception("FAILED in deletePersistentAll1() - should not go that further");
    } catch (Exception ex) {
      if (ex instanceof JDOUserException) {
        ; // expected result
View Full Code Here

      col1.add(ba4);
      col1.add(ba5);

      Object[] obj1 = col1.toArray();

      pm2.deletePersistentAll(obj1);

      throw new Exception("FAILED in deletePersistentAll2() - should not go that further");
    } catch (Exception ex) {
      if (ex instanceof JDOUserException) {
        ; // expected result
View Full Code Here

          }
      }
      pm = pmf.getPersistenceManager();
      int size = group.getUsers().size();
      pm.currentTransaction().begin();
      pm.deletePersistentAll(group.getUsers());
      pm.deletePersistent(group);
      pm.currentTransaction().commit();
      pm.close();
      assertEquals("Bad number of users", NB, size);
  }
View Full Code Here

      a = (ArticlePersistantImpl) it.next();
      cat = a.getCatalogue();
      if (cat != null) {
        pm.deletePersistent(cat);
      }
      pm.deletePersistentAll(a.getMarches());
      pm.deletePersistent(a);
    }
    pm.currentTransaction().commit();
    pm.close();
  }
View Full Code Here

        assertSameCollection("The set of Long", expectedLong, ac.getSet_Long());
        Assert.assertNotNull("The set of reference is null", ac.getSet_ref());
        assertSameCollection("The set of ref", expectedRef, ac.getSet_ref());

        pm.currentTransaction().begin();
        pm.deletePersistentAll(ac.getArraylist_ref());       
      ac.setRefs(null);
      ac.setLongs(null);
        pm.deletePersistent(ac);
        pm.currentTransaction().commit();
        pm.close();
View Full Code Here

      a = (Article) it.next();
      cat = a.getCatalogue();
      if (cat != null) {
        pm.deletePersistent(cat);
      }
      pm.deletePersistentAll(a.getMarches());
      pm.deletePersistent(a);
    }
    pm.currentTransaction().commit();
    pm.close();
  }
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.