Package org.apache.ojb.otm

Examples of org.apache.ojb.otm.Person


        if (!this.pm.isClosed()) this.pm.close();
    }

    public void testEmptyFilter()
    {
        Person p = new Person("George", "Harrison");
        pm.currentTransaction().begin();
        pm.makePersistent(p);
        pm.currentTransaction().commit();

        pm.evictAll();
View Full Code Here


        pm.currentTransaction().commit();
    }

    public void testEmptyFilterSettingExtent()
    {
        Person p = new Person("George", "Harrison");
        pm.currentTransaction().begin();
        pm.makePersistent(p);
        pm.currentTransaction().commit();

        pm.evictAll();
View Full Code Here

        pm.currentTransaction().commit();
    }

    public void testClonedQuery()
    {
        Person p = new Person("George", "Harrison");
        pm.currentTransaction().begin();
        pm.makePersistent(p);
        pm.currentTransaction().commit();

        pm.evictAll();
View Full Code Here

    /** Cheat and use our impl directly */
    private PersistenceManagerFactoryImpl factory = new PersistenceManagerFactoryImpl();

    public void testLoadExtent() throws Exception
    {
        Person article = new Person();
        PersistenceManager pm = factory.getPersistenceManager();
        Transaction tx = pm.currentTransaction();
        tx.begin();
        pm.makePersistent(article);
        tx.commit();
View Full Code Here

        pm.close();
    }

    public void testIteratorClosedWhenOutsideTx() throws Exception
    {
        Person article = new Person();
        PersistenceManager pm = factory.getPersistenceManager();
        Transaction tx = pm.currentTransaction();
        tx.begin();
        pm.makePersistent(article);
        tx.commit();
View Full Code Here

        pm.close();
    }

    public void testIteratorClosedWhenOutsideTx() throws Exception
    {
        Person article = new Person();
        PersistenceManager pm = factory.getPersistenceManager();
        Transaction tx = pm.currentTransaction();
        tx.begin();
        pm.makePersistent(article);
        tx.commit();
View Full Code Here

    private PersistenceManagerFactoryImpl factory = new PersistenceManagerFactoryImpl();


    public void testReBeginTx() throws Exception
    {
        Person person = new Person();
        person.setFirstname("Brian");
        person.setLastname("McCallister");
        PersistenceManager pm = factory.getPersistenceManager();
        Transaction tx = pm.currentTransaction();
        tx.begin();
        pm.makePersistent(person);
        tx.commit();
View Full Code Here

        if (!this.pm.isClosed()) this.pm.close();
    }

    public void testEmptyFilter()
    {
        Person p = new Person("George", "Harrison");
        pm.currentTransaction().begin();
        pm.makePersistent(p);
        pm.currentTransaction().commit();

        pm.evictAll();
View Full Code Here

        pm.currentTransaction().commit();
    }

    public void testEmptyFilterSettingExtent()
    {
        Person p = new Person("George", "Harrison");
        pm.currentTransaction().begin();
        pm.makePersistent(p);
        pm.currentTransaction().commit();

        pm.evictAll();
View Full Code Here

        pm.currentTransaction().commit();
    }

    public void testClonedQuery()
    {
        Person p = new Person("George", "Harrison");
        pm.currentTransaction().begin();
        pm.makePersistent(p);
        pm.currentTransaction().commit();

        pm.evictAll();
View Full Code Here

TOP

Related Classes of org.apache.ojb.otm.Person

Copyright © 2018 www.massapicom. 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.