Examples of makePersistentAll()


Examples of javax.jdo.PersistenceManager.makePersistentAll()

      // Every 50 added prices, persist, update contract, and flush...

      if (i % 50 == 0) {
        pm = PMF.get().getPersistenceManager();
        pm.makePersistentAll(prices);
        Contract con = pm.getObjectById(Contract.class, Contract.generateKeyFromID(contractid));
        con.setLastLineInsertedCSV(i);
        pm.close();
        prices = new ArrayList<ContractClosingPriceCSV>();
View Full Code Here

Examples of javax.jdo.PersistenceManager.makePersistentAll()

      }

    }

    pm = PMF.get().getPersistenceManager();
    pm.makePersistentAll(prices);
    Contract con = pm.getObjectById(Contract.class, Contract.generateKeyFromID(contractid));
    con.setLastLineInsertedCSV(entries.length - 1);
    pm.close();

    return true;
View Full Code Here

Examples of javax.jdo.PersistenceManager.makePersistentAll()

      events.add(event1);
       Event event2 = new Event("Other event", null, null, true, RegisteredPricingStrategy.COCAMP);
      events.add(event2);   
     
      events.add(new Event("Closed event", null, null, false, RegisteredPricingStrategy.COCAMP))
      pm.makePersistentAll(events);
     
      // Villages
      List<Village> villages = new ArrayList<Village>();
      Village village1 = new Village(TestConstants.VILLAGE1_NAME, event1);
      villages.add(village1);
View Full Code Here

Examples of javax.jdo.PersistenceManager.makePersistentAll()

      Village village1 = new Village(TestConstants.VILLAGE1_NAME, event1);
      villages.add(village1);
      villages.add(new Village("Village 2", event1));
      villages.add(new Village("Empty village", event1));
      villages.add(new Village("Village on other event", events.get(1)));
      pm.makePersistentAll(villages);
     
      // Organisations
      List<Organisation> organisations = new ArrayList<Organisation>();
      Organisation orgWcf = new Organisation(TestConstants.ORG1_NAME, true);
      organisations.add(orgWcf);
View Full Code Here

Examples of javax.jdo.PersistenceManager.makePersistentAll()

      Organisation orgWcf = new Organisation(TestConstants.ORG1_NAME, true);
      organisations.add(orgWcf);
     
      Organisation otherOrg = new Organisation("Unapproved organisation", false);
      organisations.add(otherOrg);
      pm.makePersistentAll(organisations);
     
      // Units
      List<Unit> units = new ArrayList<Unit>();
      Unit unit1 = new Unit(TestConstants.UNIT1_NAME, organisations.get(0), true);
      unit1.setVillageKey(village1.getKeyCheckNotNull());
View Full Code Here

Examples of javax.jdo.PersistenceManager.makePersistentAll()

      units.add(unapprovedWcfUnit);
      Unit otherOrgUnit = new Unit("Unapproved unit", organisations.get(1), false);
      units.add(otherOrgUnit);
      Unit otherOrgUnit2 = new Unit("Approved unit in other org", organisations.get(1), true);
      units.add(otherOrgUnit2);
      pm.makePersistentAll(units);
     
      // Bookings
      List<Booking> bookings = getBookings(event1, event2, unit1, unit2, unapprovedWcfUnit, otherOrgUnit2);
      pm.makePersistentAll(bookings);
     
View Full Code Here

Examples of javax.jdo.PersistenceManager.makePersistentAll()

      units.add(otherOrgUnit2);
      pm.makePersistentAll(units);
     
      // Bookings
      List<Booking> bookings = getBookings(event1, event2, unit1, unit2, unapprovedWcfUnit, otherOrgUnit2);
      pm.makePersistentAll(bookings);
     
     
      // Transactions
      List<Transaction> transactions = new ArrayList<Transaction>();
      transactions.add(new Transaction(unit1.getKeyCheckNotNull(), event1.getKeyCheckNotNull(), testClock.getTime(), TransactionType.Payment, "Payment 1", "Comment 1", 23.32d));
View Full Code Here

Examples of javax.jdo.PersistenceManager.makePersistentAll()

      transactions.add(new Transaction(unit2.getKeyCheckNotNull(), event1.getKeyCheckNotNull(), testClock.getTime(), TransactionType.Payment, "Unit 2 payment", "", 70.00d));
     
      // after earlybird deadline
      transactions.add(new Transaction(unit1.getKeyCheckNotNull(), event1.getKeyCheckNotNull(), afterEarlyBird.getTime(), TransactionType.Payment, "Payment after earlybird", "", 10.00d));
      transactions.add(new Transaction(unit1.getKeyCheckNotNull(), event1.getKeyCheckNotNull(), afterEarlyBird.getTime(), TransactionType.Discount, "Discount for early payment", "", 5.00d));
      pm.makePersistentAll(transactions);
     
      // Users
      User user1 = new User(TestConstants.USER_ADMIN_EMAIL, "Global Admin 1", "password", Accesslevel.GLOBAL_ADMIN);
      user1.setOrganisationKey(orgWcf.getKeyCheckNotNull());
      user1.setUnitKey(unit1.getKeyCheckNotNull());
View Full Code Here

Examples of javax.jdo.PersistenceManager.makePersistentAll()

     
      User user5 = new User("otherorg@example.com", "Other Org 1", "password", Accesslevel.ORG_ADMIN);
      user5.setOrganisationKey(otherOrg.getKeyCheckNotNull());
      user5.setUnitKey(otherOrgUnit2.getKeyCheckNotNull());
     
      pm.makePersistentAll(user1, user2, user3, user4, user5);
   
     
      // Application settings
      AppSetting defaultEventSetting = new AppSetting(AppSetting.DEFAULT_EVENT, event1.getWebKey());
      pm.makePersistent(defaultEventSetting);
View Full Code Here

Examples of javax.jdo.PersistenceManager.makePersistentAll()

      try{
        for(Result r: resultList){
          tx.begin();
          log.info("[ResultsCronService#execute()] " +
              "insert result list (pre): " + r);
          pm.makePersistentAll(r);
          log.info("[ResultsCronService#execute()] " +
              "insert result (post): " + resultList.size());
          tx.commit();
         
          log.info("[ResultsCronService#execute()] commited");
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.