Package javax.jdo

Examples of javax.jdo.PersistenceManager.deletePersistentAll()


            a = (Article) it.next();
            cat = a.getCatalogue();
            if (cat != null) {
                pm.deletePersistent(cat);
            }
            pm.deletePersistentAll(a.getMarches());
            pm.deletePersistent(a);
        }
        pm.currentTransaction().commit();
        pm.close();
    }   
View Full Code Here


    System.out.println("CataloguePersistantImpl.supprimer");
    PersistenceManager pm = JDOHelper.getPersistenceManager(this);
   
        System.out.println("pm.deletePersistentAll(articles)");
    // remove articles-catalogue relations
        pm.deletePersistentAll(articles);
       
        // remove catalogue-articles relations
        articles.clear();

        System.out.println("pm.deletePersistent(this)");
View Full Code Here

                error++;
            }
        }
        pm.currentTransaction().commit();
        pm.currentTransaction().begin();
        pm.deletePersistentAll(pm.getObjectsById(oids));
        pm.currentTransaction().commit();
        pm.close();
        if (error > 0) {
            fail(error + " error(s) occur.");
        }
View Full Code Here

  public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
    try {
      PersistenceManager pm = pmf.getPersistenceManager();
      Query query = pm.newQuery(BlipEntry.class);
      List<BlipEntry> list = (List<BlipEntry>) query.execute();
      pm.deletePersistentAll(list);
    } catch (Exception e) {
      e.printStackTrace();
      log.warning(e.getMessage());
      resp.sendError(HttpServletResponse.SC_BAD_REQUEST, e.getMessage());
    }
View Full Code Here

    try {
      // for some reason doesn't work with transaction
     
      items = (List<PersonalNotesAppsData>) qry.execute(request.getCurrentUserId());
     
      pm.deletePersistentAll(items);
     
    } catch (Exception e) {
      log.warning(e.getMessage());
   
    } finally {
View Full Code Here

    try {
      // for some reason doesn't work with transaction
     
      items = (List<PersonalNotesData>) qry.execute(request.getCurrentUserId());
     
      pm.deletePersistentAll(items);
     
    } catch (Exception e) {
      log.warning(e.getMessage());
   
    } finally {
View Full Code Here

 
  @Override
  public <T> void delete(Collection<T> objects) throws Exception {
    PersistenceManager pm = PMF.get().getPersistenceManager();
    try {
      pm.deletePersistentAll(objects);
    } catch(Exception e) {
        throw e;
      } finally {
        pm.close();
      }
View Full Code Here

  }
 
  public <T extends BaseEntity> void delete(Collection<T> objs, Locale locale) throws Exception {
    PersistenceManager pm = PMF.get().getPersistenceManager();
    try {
      pm.deletePersistentAll(objs);
    } catch(Exception e) {
        throw e;
      } finally {
        pm.flush();
        pm.close();
View Full Code Here

    try {
      pm = PMF.get().getPersistenceManager();
      String query = "select from " + Contact.class.getName();
      @SuppressWarnings("unchecked")
      List<Contact> contactList = (List<Contact>) pm.newQuery(query).execute();
      pm.deletePersistentAll(contactList);
    } finally {
      if (pm != null) {
        pm.close();
        pm = null;
      }
View Full Code Here

    query.declareParameters("java.lang.Long livingStoryIdParam");
   
    try {
      @SuppressWarnings("unchecked")
      List<BaseContentEntity> entities = (List<BaseContentEntity>) query.execute(livingStoryId);
      pm.deletePersistentAll(entities);
    } finally {
      query.closeAll();
      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.