Package javax.jdo

Examples of javax.jdo.PersistenceManager.deletePersistentAll()


        q.closeAll();
        pm.currentTransaction().commit();
       
        pm.currentTransaction().begin();
        logger.log(BasicLevel.INFO, "Delete " + as.size() + " simple addresses.");
        pm.deletePersistentAll(as);
        pm.currentTransaction().commit();
        pm.close();
        return this;
    }
   
View Full Code Here


        q = pm.newQuery(Department.class);
        c = (Collection) q.execute();
        deps.addAll(c);
        q.closeAll();
        logger.log(BasicLevel.INFO, "Delete " + deps.size() + " departments.");
        pm.deletePersistentAll(deps);
        logger.log(BasicLevel.INFO, "Delete " + emps.size() + " employees.");
        pm.deletePersistentAll(emps);
        pm.currentTransaction().commit();
        pm.close();
        return this;
View Full Code Here

        deps.addAll(c);
        q.closeAll();
        logger.log(BasicLevel.INFO, "Delete " + deps.size() + " departments.");
        pm.deletePersistentAll(deps);
        logger.log(BasicLevel.INFO, "Delete " + emps.size() + " employees.");
        pm.deletePersistentAll(emps);
        pm.currentTransaction().commit();
        pm.close();
        return this;
    }
View Full Code Here

        q = pm.newQuery(Address.class);
        c = (Collection) q.execute();
        adds.addAll(c);
        q.closeAll();
        logger.log(BasicLevel.INFO, "Delete " + persons.size() + " persons.");
        pm.deletePersistentAll(persons);
        logger.log(BasicLevel.INFO, "Delete " + adds.size() + " addresses.");
        pm.deletePersistentAll(adds);
        pm.currentTransaction().commit();
        pm.close();
        return this;
View Full Code Here

        adds.addAll(c);
        q.closeAll();
        logger.log(BasicLevel.INFO, "Delete " + persons.size() + " persons.");
        pm.deletePersistentAll(persons);
        logger.log(BasicLevel.INFO, "Delete " + adds.size() + " addresses.");
        pm.deletePersistentAll(adds);
        pm.currentTransaction().commit();
        pm.close();
        return this;
    }
View Full Code Here

        q = pm.newQuery(Department.class);
        c = (Collection) q.execute();
        deps.addAll(c);
        q.closeAll();
        logger.log(BasicLevel.INFO, "Delete " + deps.size() + " departments.");
        pm.deletePersistentAll(deps);
        logger.log(BasicLevel.INFO, "Delete " + emps.size() + " employees.");
        pm.deletePersistentAll(emps);
        pm.currentTransaction().commit();
        pm.close();
        return this;
View Full Code Here

        deps.addAll(c);
        q.closeAll();
        logger.log(BasicLevel.INFO, "Delete " + deps.size() + " departments.");
        pm.deletePersistentAll(deps);
        logger.log(BasicLevel.INFO, "Delete " + emps.size() + " employees.");
        pm.deletePersistentAll(emps);
        pm.currentTransaction().commit();
        pm.close();
        return this;
    }
View Full Code Here

        as = new ArrayList(c);
        q.closeAll();
        pm.currentTransaction().commit();
       
        pm.currentTransaction().begin();
        pm.deletePersistentAll(as);
        pm.currentTransaction().commit();
        pm.close();
       
    }
   
View Full Code Here

            Department.class
    };
    pm.currentTransaction().begin();
    for (int i = 0; i < classes.length; i++) {
      logger.log(BasicLevel.DEBUG, "Removing " + classes[i].getName() + " ...");
      pm.deletePersistentAll((Collection) pm.newQuery(classes[i]).execute());
      logger.log(BasicLevel.INFO, "All " + classes[i].getName() + " have been removed.");
        }
    pm.currentTransaction().commit();

    pm.evictAll();
View Full Code Here

        }
       
        pm = pmf.getPersistenceManager();
        pm.currentTransaction().begin();
        q = pm.newQuery(pm.getExtent(Person.class, true));
        pm.deletePersistentAll((Collection) q.execute());
        q.closeAll();
        pm.currentTransaction().commit();
        pm.close();
    }
}
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.