Examples of deletePersistentAll()


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

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

Examples of javax.jdo.PersistenceManager.deletePersistentAll()

    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

Examples of javax.jdo.Query.deletePersistentAll()

    };
   
    for(Class clazz: classesToDelete)
    {
      Query query = pm.newQuery(clazz);
        query.deletePersistentAll();
    }
   
 
    // Insert new data
    TestFixture.BASIC_DATA.setUp();
View Full Code Here

Examples of javax.jdo.Query.deletePersistentAll()

    Long curTime = System.currentTimeMillis();
    try {
      openTransaction();
      Query query = pm.newQuery(MPartitionEvent.class,"curTime - eventTime > expiryTime");
      query.declareParameters("java.lang.Long curTime, java.lang.Long expiryTime");
      delCnt = query.deletePersistentAll(curTime, expiryTime);
      commited = commitTransaction();
    }
    finally {
      if (!commited) {
        rollbackTransaction();
View Full Code Here

Examples of javax.jdo.Query.deletePersistentAll()

    Long curTime = System.currentTimeMillis();
    try {
      openTransaction();
      Query query = pm.newQuery(MPartitionEvent.class,"curTime - eventTime > expiryTime");
      query.declareParameters("java.lang.Long curTime, java.lang.Long expiryTime");
      delCnt = query.deletePersistentAll(curTime, expiryTime);
      commited = commitTransaction();
    }
    finally {
      if (!commited) {
        rollbackTransaction();
View Full Code Here

Examples of javax.jdo.Query.deletePersistentAll()

            tx.begin();

            final Query query = pm.newQuery(
                DefaultResourceDescriptor.class, "expiry < date");
            query.declareParameters("java.util.Date date");
            long number = query.deletePersistentAll(new Object[] {new Date()});
            if (LOGGER.isDebugEnabled()) {
                LOGGER.debug("Removed " + number +" descriptors from store");
            }

            tx.commit();
View Full Code Here

Examples of javax.jdo.Query.deletePersistentAll()

        try
        {
            tx.begin();

            Query query = pm.newQuery( aClass );
            query.deletePersistentAll();

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

Examples of javax.jdo.Query.deletePersistentAll()

    Long curTime = System.currentTimeMillis();
    try {
      openTransaction();
      Query query = pm.newQuery(MPartitionEvent.class,"curTime - eventTime > expiryTime");
      query.declareParameters("java.lang.Long curTime, java.lang.Long expiryTime");
      delCnt = query.deletePersistentAll(curTime, expiryTime);
      commited = commitTransaction();
    }
    finally {
      if (!commited) {
        rollbackTransaction();
View Full Code Here

Examples of javax.jdo.Query.deletePersistentAll()

  private void dropPartitionsNoTxn(String dbName, String tblName, List<String> partNames) {
    ObjectPair<Query, Map<String, String>> queryWithParams =
        getPartQueryWithParams(dbName, tblName, partNames);
    Query query = queryWithParams.getFirst();
    query.setClass(MPartition.class);
    long deleted = query.deletePersistentAll(queryWithParams.getSecond());
    LOG.debug("Deleted " + deleted + " partition from store");
    query.closeAll();
  }

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