Examples of deletePersistent()


Examples of javax.jdo.PersistenceManager.deletePersistent()

    for (int i = 0; i < files.size(); i++) {
      GAEFile file = files.get(i);
      for (int sNo = 0; sNo < file.getSegmentCount(); sNo++) {
        GAEFileContentJDO.delete(file.getId(), sNo);
      }
      pm.deletePersistent(file);
    }
    pm.close();
  }

  public static void batchDelete(String category, Long version) {
View Full Code Here

Examples of javax.jdo.PersistenceManager.deletePersistent()

    for (int i = 0; i < files.size(); i++) {
      GAEFile file = files.get(i);
      for (int sNo = 0; sNo < file.getSegmentCount(); sNo++) {
        GAEFileContentJDO.delete(file.getId(), sNo);
      }
      pm.deletePersistent(file);
    }
  }
}
View Full Code Here

Examples of javax.jdo.PersistenceManager.deletePersistent()

    query.declareParameters("Long fId, Integer sNo");
    List<GAEFileContent> gaeContents = (List<GAEFileContent>) query.execute(fileId, segmentNo);
    GAEFileContent gaeContent = null;
    if (gaeContents.size() > 0) {
      gaeContent = gaeContents.get(0);
      pm.deletePersistent(gaeContent);
    }
    pm.close();
  }
}
View Full Code Here

Examples of javax.jdo.PersistenceManager.deletePersistent()

    query.setFilter("id == catId");
    query.declareParameters("Long catId");
    List<GAEIndexCategory> categories = (List<GAEIndexCategory>) query.execute(new Long(catId));
    for (int i = 0; i < categories.size(); i++) {
      GAEIndexCategory category = categories.get(i);
      pm.deletePersistent(category);
    }
    pm.close();
  }
}
View Full Code Here

Examples of javax.jdo.PersistenceManager.deletePersistent()

    query.setFilter("cat == category && ver == version && name == fileName");
    query.declareParameters("String category, Long version, String fileName");
    List<GAEFile> files = (List<GAEFile>) query.execute(this.category, this.version, fileName);
    for (int i = 0; i < files.size(); i++) {
      GAEFile file = files.get(i);
      pm.deletePersistent(file);
    }
  }

  @Override
  public boolean fileExists(final String fileName) throws IOException {
View Full Code Here

Examples of javax.jdo.PersistenceManager.deletePersistent()

        {
            tx.begin();

            o = pm.getObjectById( pm.getObjectId( o ) );

            pm.deletePersistent( o );

            tx.commit();
        }
        finally
        {
View Full Code Here

Examples of javax.jdo.PersistenceManager.deletePersistent()

        mgr.makePersistent(si);
        mgr.currentTransaction().commit();

        // Now delete it
        mgr.currentTransaction().begin();
        mgr.deletePersistent(si);
        mgr.currentTransaction().commit();
    }

    public void testNewOneToMany() {
        PersistenceManager mgr = factory.getPersistenceManager();
View Full Code Here

Examples of javax.jdo.PersistenceManager.deletePersistent()

    pm = pmf.getPersistenceManager();
    pm.currentTransaction().begin();
    Extent e = pm.getExtent(Concurrent.class, false);
    it = e.iterator();
    while(it.hasNext()) {
      pm.deletePersistent(it.next());
    }
    pm.currentTransaction().commit();
    pm.close();
  }
View Full Code Here

Examples of javax.jdo.PersistenceManager.deletePersistent()

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

Examples of javax.jdo.PersistenceManager.deletePersistent()

      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
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.