Examples of makePersistentAll()


Examples of javax.jdo.PersistenceManager.makePersistentAll()

    assertEquals(beforeAllocate + ADDITIONAL, ((Long) s.current()).longValue());
    cow = new Cow("cowAfterAllocate", ((Long)s.next()).longValue());
    col.add(cow);
    pm.currentTransaction().begin();
    //make persistent
    pm.makePersistentAll(col);
    s.current();
    pm.currentTransaction().commit();
    Iterator it = col.iterator();
    while (it.hasNext()) {
      Cow c = (Cow) it.next();
View Full Code Here

Examples of javax.jdo.PersistenceManager.makePersistentAll()

    Collection c = new ArrayList();
    c.add(c1);
    c.add(c2);
    c.add(c3);
    //make persistent
    pm.makePersistentAll(c);
    pm.currentTransaction().commit();
    //begin a tx
    pm.currentTransaction().begin();
    Cow c4 = new Cow("cowSeqNC4", ((Long)s.next()).longValue());
    //keep the number
View Full Code Here

Examples of javax.jdo.PersistenceManager.makePersistentAll()

    Collection c = new ArrayList();
    c.add(c1);
    c.add(c2);
    c.add(c3);
    //make persistent
    pm.makePersistentAll(c);
    pm.currentTransaction().commit();
        pm.close();
  }
  /**
   * Remove all the persistence instances.
View Full Code Here

Examples of javax.jdo.PersistenceManager.makePersistentAll()

            List authors = new ArrayList(NB_AUTHORS);
            for(int i=0; i<10; i++) {
                String id = i2s(i, length(NB_AUTHORS));
                authors.add(new Author("FN_" + id, "LN_" + id, i));
            }
            pm.makePersistentAll(authors);

            //Create books
            for(int i=0; i<NB_BOOKS; i++) {
                Book book = new Book("Book_" + i2s(i, length(NB_BOOKS)), i);
                pm.makePersistent(book);
View Full Code Here

Examples of javax.jdo.PersistenceManager.makePersistentAll()

                grantorPrincipal, Sets.newHashSet(role));
          }
          group.appendRole(role);
          groups.add(group);
        }
        pm.makePersistentAll(groups);
        CommitContext commit = commitUpdateTransaction(pm);
        rollbackTransaction = false;
        return commit;
      }
    } finally {
View Full Code Here

Examples of javax.jdo.PersistenceManager.makePersistentAll()

          if (group != null) {
            group.removeRole(role);
            groups.add(group);
          }
        }
        pm.makePersistentAll(groups);
        CommitContext commit = commitUpdateTransaction(pm);
        rollbackTransaction = false;
        return commit;
      }
    } finally {
View Full Code Here

Examples of javax.jdo.PersistenceManager.makePersistentAll()

 
  @Override
  public void createComment(Feedback... strings) throws MentorException {
    PersistenceManager pm = PMF.get().getPersistenceManager();
    try{
      pm.makePersistentAll(strings);
    }catch(Exception e){
     
    }
   
  }
View Full Code Here

Examples of javax.jdo.PersistenceManager.makePersistentAll()

  @Override
  public boolean createPulse(ParticipantPulse... pulseEntry) throws MentorException {
    PersistenceManager pm = PMF.get().getPersistenceManager();
    try{
      pm.makePersistentAll(pulseEntry);
      return true;
    } catch(Exception e){
      return false;
    }
  }
View Full Code Here

Examples of javax.jdo.PersistenceManager.makePersistentAll()

    for (Participant p : participants) {
      LOG.info("Saving.. " + p);
    }
    try {
      pm.makePersistentAll(participants);
    } finally {
      isModified = true;
      pm.close();
    }
     // to reload the record in LRUCache
View Full Code Here

Examples of javax.jdo.PersistenceManager.makePersistentAll()

    long t = System.currentTimeMillis();
    System.out.println("Trying to save :: " + oppurtunities);
    PersistenceManager pm = PMF.get().getPersistenceManager();

    try {
      pm.makePersistentAll(oppurtunities);
    } finally {
      pm.close();
    }
    saveOpportunityTimeState.inc(System.currentTimeMillis() - t);
  }
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.