Package javax.jdo

Examples of javax.jdo.Query.deletePersistentAll()


        getPM();
        try {
            pm.currentTransaction().begin();
            Query q = pm.newQuery(PCPoint.class);
            q.setDatastoreWriteTimeoutMillis(timeout);
            q.deletePersistentAll();
            pm.currentTransaction().commit();
            if (!isDatastoreTimeoutSupported()) {
                fail(ASSERTION_FAILED, "Query.setDatastoreWriteTimeoutMillis should throw a " +
                     "JDOUnsupportedOptionException, if datastore timeout is not supported ");
            }
View Full Code Here


        try
        {
            tx.begin();

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

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

    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

        try
        {
            tx.begin();

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

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

        try
        {
            tx.begin();

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

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

        try
        {
            tx.begin();

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

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

    long t = System.currentTimeMillis();
    PersistenceManager pm = PMF.get().getPersistenceManager();
    long n;
    try {
      Query q = pm.newQuery(Participant.class);
      n = q.deletePersistentAll();
      q.closeAll();

    } finally {
      pm.close();
    }
View Full Code Here

    long t = System.currentTimeMillis();
    PersistenceManager pm = PMF.get().getPersistenceManager();
    long n;
    try {
      Query q = pm.newQuery(Opportunity.class);
      n = q.deletePersistentAll();
      q.closeAll();

    } finally {
      pm.close();
    }
View Full Code Here

    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

    log.info(message.toString());

    Query objectsToDeleteQuery = pm.newQuery(type);
    objectsToDeleteQuery.setFilter(fieldName + " == fieldValueParam");
    objectsToDeleteQuery.declareParameters("int fieldValueParam");
    objectsToDeleteQuery.deletePersistentAll(fieldValue);
  }
}
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.