Package javax.jdo

Examples of javax.jdo.PersistenceManager.evictAll()


      if (segmentTypeIDs != null)
        createSegments(pm, trader, order, segmentTypeIDs);
      {
        OrderID orderID = (OrderID) JDOHelper.getObjectId(order);
        pm.evictAll();
        order = (RecurringOrder) pm.getObjectById(orderID);
      }

      pm.getFetchPlan().setMaxFetchDepth(maxFetchDepth);
      if (fetchGroups != null)
View Full Code Here


        Object oide2 = pm.getObjectId(e2);
        e1 = null;
        e2 = null;
        pm.currentTransaction().commit();

        pm.evictAll();
       
        pm.currentTransaction().begin();
        e1 = (E) pm.getObjectById(E.class, oide1);
        assertEquals("bad e1.myA.aid", e1.getMyA().getAid(), "a1");
        assertEquals("bad e1.myC.aid", e1.getMyC().getAid(), "c1");
View Full Code Here

        assertEquals("bad e2.myC.aid", e2.getMyC().getAid(), "d3");
        assertEquals("bad e2.myD.aid", e2.getMyD().getAid(), "d4");
        e2 = null;
        pm.currentTransaction().commit();
       
        pm.evictAll();
       
        pm.currentTransaction().begin();
        Query q = pm.newQuery(A.class);
        Collection c = (Collection) q.execute();
        List expected = Arrays.asList(
View Full Code Here

    pm.currentTransaction().commit();

    a = null;
    cat = null;
    mar = null;
    pm.evictAll();

    Extent extent = pm.getExtent(Catalogue.class, true);
    Iterator it = extent.iterator();
    while(it.hasNext()) {
      cat = (Catalogue) it.next();
View Full Code Here

        Object oide2 = pm.getObjectId(e2);
        e1 = null;
        e2 = null;
        pm.currentTransaction().commit();

        pm.evictAll();
       
        pm.currentTransaction().begin();
        e1 = (E) pm.getObjectById(E.class, oide1);
        assertEquals("bad e1.myA.aid", e1.getMyA().getAid(), "a1");
        assertEquals("bad e1.myC.aid", e1.getMyC().getAid(), "c1");
View Full Code Here

        assertEquals("bad e2.myC.aid", e2.getMyC().getAid(), "d3");
        assertEquals("bad e2.myD.aid", e2.getMyD().getAid(), "d4");
        e2 = null;
        pm.currentTransaction().commit();
       
        pm.evictAll();
       
        pm.currentTransaction().begin();
        Query q = pm.newQuery(A.class);
        Collection c = (Collection) q.execute();
        List expected = Arrays.asList(
View Full Code Here

        r1 = null;
        r2 = null;
        r3 = null;
        pm = pmf.getPersistenceManager();
        pm.evictAll();
        r1 = (Registry) pm.getObjectById(oid1, true);
        Assert.assertNotNull("null instance returned by getObjectById(oid1)", r1);
        r2 = (Registry) r1.lookup("a");
        Assert.assertNotNull("null instance returned by r1.lookup(a)", r2);
        r3 = (Registry) r1.lookup("b");
View Full Code Here

    pm.close();

    //Clear the cache
    a = null; //permit the GC to garbage instances
    pm = pmf.getPersistenceManager();
    pm.evictAll();
    pm.close();

    //Check the instance existing
    pm = pmf.getPersistenceManager();
    try {
View Full Code Here

      fail(e.getMessage());
    } finally {
      if (pm.currentTransaction().isActive())
        pm.currentTransaction().rollback();
      //remove all the objects from the cache
      pm.evictAll();
      pm.close();
    }
  }

  //iterate over all the instances of a class
View Full Code Here

    } catch (Exception e) {
      fail(e.getMessage());
    } finally {
      if (pm.currentTransaction().isActive())
        pm.currentTransaction().rollback();
      pm.evictAll();
      pm.close();
    }
  }
 
  public void retrieveAllXXA(int bid){
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.