Examples of writeF1()


Examples of org.objectweb.speedo.pobjects.basic.BasicA.writeF1()

         pm.close();
  }
  public void testDeleteAndUse() {
    logger.log(BasicLevel.DEBUG, "testRefreshDirty");
    BasicA ba = new BasicA();
    ba.writeF1("testRefreshDirty");
    ba.writeF2(2);
    PersistenceManager pm = pmf.getPersistenceManager();
    pm.currentTransaction().begin();
    pm.makePersistent(ba);
        pm.currentTransaction().commit();
View Full Code Here

Examples of org.objectweb.speedo.pobjects.basic.BasicA.writeF1()

        for (int i = 0; i < listeners.length; i++) {
            pmf.addInstanceLifecycleListener(listeners[i], new Class[]{BasicA.class});
        }
        BasicA ba = new BasicA();
        assertEquals("unexpect event on create ", 0, nbEvent[0]);
        ba.writeF1("testInstanceLifecycleListener_1");
        assertEquals("unexpect event on write ", 0, nbEvent[0]);
        pm.currentTransaction().begin();
        pm.makePersistent(ba);
        assertEquals("Bad event number on make persistent: ", 1, nbEvent[0]);
        ba.writeF1("testInstanceLifecycleListener_1");
View Full Code Here

Examples of org.objectweb.speedo.pobjects.basic.BasicA.writeF1()

        ba.writeF1("testInstanceLifecycleListener_1");
        assertEquals("unexpect event on write ", 0, nbEvent[0]);
        pm.currentTransaction().begin();
        pm.makePersistent(ba);
        assertEquals("Bad event number on make persistent: ", 1, nbEvent[0]);
        ba.writeF1("testInstanceLifecycleListener_1");
        assertEquals("Bad event number on make persistent after write: ", 3, nbEvent[0]);
        assertNotNull("Not postCreate event", marks[InstanceLifecycleEvent.CREATE][POST]);
        assertTrue("Bad source ", marks[InstanceLifecycleEvent.CREATE][POST].getSource() == ba);

        clear(nbEvent, marks);
View Full Code Here

Examples of org.objectweb.speedo.pobjects.basic.BasicA.writeF1()

    logger.log(BasicLevel.DEBUG, "begin initData");
    tx.begin();
    tx2.begin();

    BasicA ba11 = new BasicA();
    ba11.writeF1("ba11");
    BasicA ba12 = new BasicA();
    ba11.writeF1("ba12");

    getPM().makePersistent(ba11);
    getPM().makePersistent(ba12);
View Full Code Here

Examples of org.objectweb.speedo.pobjects.basic.BasicA.writeF1()

    //tx.setRetainValues(false);
    tx.setRestoreValues(false);

    tx.begin();
    BasicA ba11 = new BasicA();
    ba11.writeF1("ba11");
    getPM().makePersistent(ba11);
    tx.commit();

    tx.begin();
    Object p1Id = getPM().getObjectId(ba11);
View Full Code Here

Examples of org.objectweb.speedo.pobjects.basic.BasicA.writeF1()

  public void testRefreshAllWithNoParameters() {
    logger.log(BasicLevel.INFO, "testRefreshAllWithNoParameters");
    tx = getPM().currentTransaction();
    tx.begin();
    BasicA ba11 = new BasicA();
    ba11.writeF1("ba11");
    ba11.writeF2(200);
    getPM().makePersistent(ba11);
    tx.commit();

    tx.begin();
View Full Code Here

Examples of org.objectweb.speedo.pobjects.basic.BasicA.writeF1()

    ba11.writeF2(200);
    getPM().makePersistent(ba11);
    tx.commit();

    tx.begin();
    ba11.writeF1("xx");
    //ba11.writeF2(800);

    /*
     * Collection col1 = new java.util.HashSet(); col1.add(ba11); try { getPM().refresh(ba11); } catch (Exception
     * ex) { logger.log(BasicLevel.DEBUG, "passed in refresh(ba11)" + ex.getMessage()); }
View Full Code Here

Examples of org.objectweb.speedo.pobjects.basic.BasicA.writeF1()

      pmf == JDOHelper.getPersistenceManagerFactory(getPMFProperties()));
  }
  public void testCreateInTxAndRemoveInTx2PM() {
    logger.log(BasicLevel.DEBUG, "testCreateInTxAndRemoveInTx2PM");
    BasicA ba = new BasicA();
    ba.writeF1("testCreateInTxAndRemoveInTx2PM");
    ba.writeF2(2);
    Locale l = new Locale("en"); //Examples: "en", "de_DE", "_GB", "en_US_WIN", "de__POSIX", "fr__MAC"
    ba.setLocale(l);
    PersistenceManager pm = pmf.getPersistenceManager();
    pm.currentTransaction().begin();
View Full Code Here

Examples of org.objectweb.speedo.pobjects.basic.BasicA.writeF1()

  }

  public void testCreateAndRemoveInTx2PM() {
    logger.log(BasicLevel.DEBUG, "testCreateAndRemoveInTx2PM");
    BasicA ba = new BasicA();
    ba.writeF1("testCreateAndRemoveInTx2PM");
    ba.writeF2(2);
    Locale l = new Locale("de", "de"); //Examples: "en", "de_DE", "_GB", "en_US_WIN", "de__POSIX", "fr__MAC"
    ba.setLocale(l);
    PersistenceManager pm = pmf.getPersistenceManager();
    pm.makePersistent(ba);
View Full Code Here

Examples of org.objectweb.speedo.pobjects.basic.BasicA.writeF1()


  public void testCreateAndRemoveInTx1PM() {
    logger.log(BasicLevel.DEBUG, "testCreateAndRemoveInTx1PM");
    BasicA ba = new BasicA();
    ba.writeF1("testCreateAndRemoveInTx1PM");
    ba.writeF2(2);
    PersistenceManager pm = pmf.getPersistenceManager();
    pm.makePersistent(ba);
    pm.currentTransaction().begin();
    pm.deletePersistent(ba);
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.