Examples of deletePersistent()


Examples of javax.jdo.PersistenceManager.deletePersistent()

                    //
                    if (myDaoCommunityAccount2.getData() != null && myDaoCommunityAccount2.getData().getStats() != null) {
                      pm.deletePersistent(myDaoCommunityAccount2.getData().getStats());
                      pm.deletePersistent(myDaoCommunityAccount2.getData());
                    }
                    pm.deletePersistent(myDaoCommunityAccount2);
                    pm.currentTransaction().commit();
                  }
             }
            }
          catch(Exception e){
View Full Code Here

Examples of javax.jdo.PersistenceManager.deletePersistent()

                  for (DaoDataCommunityAccountStatsVehicules myDao : resultsVeh) {
                    pm.currentTransaction().begin();
                    //
                    //log.warning(myDao.getName());
                    //
                    pm.deletePersistent(myDao);
                    pm.currentTransaction().commit();
                  }
             }
            }
          catch(Exception e){
View Full Code Here

Examples of javax.jdo.PersistenceManager.deletePersistent()

    try {
      Query query = pm.newQuery("SELECT FROM " + Player.class.getName());
      List<Player> attached = (List<Player>)query.execute();
      if (attached != null) {
        for (Player player : attached) {
          if (player.getUserId().equals(userId)) pm.deletePersistent(player);
        }
      }
    }
    catch (JDOObjectNotFoundException e) {
    }
View Full Code Here

Examples of javax.jdo.PersistenceManager.deletePersistent()

                    profile.setEnvironmentVariables( newEnvironmentVariables );
                    pm.makePersistent( profile );
                }
            }

            pm.deletePersistent( installation );

            tx.commit();

        }
        finally
View Full Code Here

Examples of javax.jdo.PersistenceManager.deletePersistent()

  public void delete(String userId, Credential credential) {
    PersistenceManager persistenceManager = persistenceManagerFactory.getPersistenceManager();
    try {
      JdoPersistedCredential persistedCredential = new JdoPersistedCredential(userId, credential);
      persistenceManager.deletePersistent(persistedCredential);
    } finally {
      persistenceManager.close();
    }
  }
View Full Code Here

Examples of javax.jdo.PersistenceManager.deletePersistent()

    try {
      Credential cred = oauthFlow.loadCredential(pm);

      if (cred != null && cred.isInvalid()) {
        pm.deletePersistent(cred);
        cred = null;
      }

      if (cred != null) {
        req.setAttribute(AUTH_CREDENTIAL, cred);
View Full Code Here

Examples of javax.jdo.PersistenceManager.deletePersistent()

          // Invoke the user code
          super.service(req, resp);
        } catch (HttpResponseException e) {
          // Determine if we failed due to auth, or just failed
          if (cred.isInvalid()) {
            pm.deletePersistent(cred);
            startAuthFlow(resp, pm, oauthFlow);
          } else {
            throw e;
          }
        }
View Full Code Here

Examples of javax.jdo.PersistenceManager.deletePersistent()

      flow.setJsonFactory(getJsonFactory());

      // Complete the flow object with the token we got in our query parameters
      Credential c = flow.complete(completionCode);
      manager.makePersistent(c);
      manager.deletePersistent(flow);
      resp.sendRedirect(redirectUrl);
    } finally {
      manager.close();
    }
  }
View Full Code Here

Examples of javax.jdo.PersistenceManager.deletePersistent()

                // delete pm2 instances
                if (pm2.currentTransaction().isActive()) {
                    pm2.currentTransaction().rollback();
                }
                pm2.currentTransaction().begin();
                pm2.deletePersistent(rect2);
                pm2.deletePersistent(p21);
                pm2.deletePersistent(p22);
                pm2.currentTransaction().commit();
            } finally {
                cleanupPM(pm2);
View Full Code Here

Examples of javax.jdo.PersistenceManager.deletePersistent()

                if (pm2.currentTransaction().isActive()) {
                    pm2.currentTransaction().rollback();
                }
                pm2.currentTransaction().begin();
                pm2.deletePersistent(rect2);
                pm2.deletePersistent(p21);
                pm2.deletePersistent(p22);
                pm2.currentTransaction().commit();
            } finally {
                cleanupPM(pm2);
                pm2 = null;
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.