Package org.odmg

Examples of org.odmg.Implementation.currentTransaction()


        dateCrit.addOrCriteria( cutoffDateCrit );
        crit.addAndCriteria( dateCrit );
       
        ODMGXAWrapper txw = new ODMGXAWrapper();
  Implementation odmg = ODMG.getODMGImplementation();
  Transaction tx = odmg.currentTransaction();
        Collection result = null;
  try {
      PersistenceBroker broker = ((HasBroker) tx).getBroker();
      QueryByCriteria q = new QueryByCriteria( PhotoInfo.class, crit );
      result = broker.getCollectionByQuery( q );
View Full Code Here


            assertNotNull(a);
        }

        tx = odmg.newTransaction();
        tx.begin();
        ((TransactionExt) odmg.currentTransaction()).getBroker().clearCache();

        // lookup list and check entries
        DList lookedUp = (DList) db.lookup(name);
        assertNotNull("binded DList not found", lookedUp);
View Full Code Here

        }
        tx.commit();

        tx = odmg.newTransaction();
        tx.begin();
        ((TransactionExt) odmg.currentTransaction()).getBroker().clearCache();
        lookedUp = (DList) db.lookup(name);
        iter = lookedUp.iterator();
        iter1 = list.iterator();
        assertEquals("Wrong number of DListEntry found", 8, list.size());
        while (iter.hasNext())
View Full Code Here

        }
        assertEquals(5, list.size());

        tx = odmg.newTransaction();
        tx.begin();
        ((TransactionExt) odmg.currentTransaction()).getBroker().clearCache();
        DList lookedUp = (DList) db.lookup(name);
        tx.commit();
        assertNotNull("binded DList not found", lookedUp);

        //System.out.println("sequence of items in lookedup list:");
View Full Code Here

        tx.commit();

        // delete two items
        tx = odmg.newTransaction();
        tx.begin();
        ((HasBroker) odmg.currentTransaction()).getBroker().clearCache();
        DList lookedUp = (DList) db.lookup(name);
        assertNotNull("database lookup does not find the named DList", lookedUp);
        assertEquals("Wrong number of list entries", 5, lookedUp.size());
        lookedUp.remove(2);
        lookedUp.remove(1);
View Full Code Here

        tx.commit();

        // check if deletion was successful
        tx = odmg.newTransaction();
        tx.begin();
        ((HasBroker) odmg.currentTransaction()).getBroker().clearCache();
        lookedUp = (DList) db.lookup(name);
        tx.commit();

        assertEquals(3, lookedUp.size());
    }
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.