Package org.odmg

Examples of org.odmg.Database.deletePersistent()


        tx.begin();

        Database db = impl.getDatabase(product);

        db.deletePersistent(product);

        tx.commit();
    }

    /**
 
View Full Code Here


            fail("Stored object not found");
        }
        tx.commit();

        tx.begin();
        db.deletePersistent(site);
        tx.commit();

        query = odmg.newOQLQuery();
        query.create("select sites from " + Site.class.getName() + " where name=$1");
        query.bind(name);
View Full Code Here

            List   result      = (List)query.execute();
            Product toBeDeleted = (Product)result.get(0);

            // 4. now mark object for deletion
            db.deletePersistent(toBeDeleted);
            // 5. commit transaction
            tx.commit();
        }
        catch (Throwable t)
        {
View Full Code Here

        tx.begin();

        Database db = impl.getDatabase(product);

        db.deletePersistent(product);

        tx.commit();
    }

    /**
 
View Full Code Here

            List   result      = (List)query.execute();
            Product toBeDeleted = (Product)result.get(0);

            // 4. now mark object for deletion
            db.deletePersistent(toBeDeleted);
            // 5. commit transaction
            tx.commit();
        }
        catch (Throwable t)
        {
View Full Code Here

            fail("Stored object not found");
        }
        tx.commit();

        tx.begin();
        db.deletePersistent(site);
        tx.commit();

        query = odmg.newOQLQuery();
        query.create("select sites from " + Site.class.getName() + " where name=$1");
        query.bind(name);
View Full Code Here

            tx.begin();
            tx.lock(art2, Transaction.WRITE);
            tx.commit();

            tx.begin();
            db.deletePersistent(art2);
            tx.commit();
            db.close();
//        log.info("End init performance test");
        }
    }
View Full Code Here

            db.open(databaseName, Database.OPEN_READ_WRITE);
            for (int i = 0; i < arr.length; i++)
            {
                Transaction tx = ojb.newTransaction();
                tx.begin();
                db.deletePersistent(arr[i]);
                tx.commit();
            }
            db.close();
            long stop = System.currentTimeMillis();
            times[3] = times[3] + (stop - start);
View Full Code Here

            db.open(databaseNameFarAway, Database.OPEN_READ_WRITE);
            for (int i = 0; i < arr.length; i++)
            {
                Transaction tx = ojb.newTransaction();
                tx.begin();
                db.deletePersistent(arrFarAway[i]);
                tx.commit();
            }
            db.close();
            long stop = System.currentTimeMillis();
            times[3] = times[3] + (stop - start);
View Full Code Here

        Transaction tx = odmg.newTransaction();
        long start = System.currentTimeMillis();
        tx.begin();
        for (int i = 0; i < articleCount; i++)
        {
            db.deletePersistent(arr[i]);
        }
        tx.commit();
        long stop = System.currentTimeMillis();
        db.close();
        logger.info("deleting " + articleCount + " Objects: " + (stop - start) + " msec");
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.