Examples of persist()


Examples of com.oltpbenchmark.benchmarks.jpab.tests.BasicTest.persist()

        test.setBatchSize(10);
        test.setEntityCount(objectCount);
        test.buildInventory(objectCount);
        while (test.getActionCount() < objectCount) {
            System.out.println(test.getActionCount()+ " % "+objectCount);
            test.persist(em);
        }
        test.clearInventory();
    }

}
View Full Code Here

Examples of com.oltpbenchmark.benchmarks.jpab.tests.Test.persist()

        test.setBatchSize(10);
        test.setEntityCount(objectCount);
        test.buildInventory(objectCount);
        while (test.getActionCount() < objectCount) {
            System.out.println(test.getActionCount()+ " % "+objectCount);
            test.persist(em);
        }
        test.clearInventory();
    }

}
View Full Code Here

Examples of com.peusoft.ptcollect.server.persistance.dao.GenericDao.persist()

        if (LOGGER.isDebugEnabled()) {
            LOGGER.debug("creating objects... ");
        }
        for (AbstractDomainObject object : objects) {
            GenericDao dao = daoFactory.getDao(object.getClass());
            dao.persist(object);
            if (LOGGER.isDebugEnabled()) {
                LOGGER.debug("create object " + object);
            }
        }
    }
View Full Code Here

Examples of com.springone.myrestaurants.domain.Restaurant.persist()

  @Transactional
  public Restaurant findRestaurant(Long id) {
    if (id == null) return null;
    final Restaurant rest = entityManager.find(Restaurant.class, id);
    if (rest != null) {
      rest.persist();
    }
    return rest;
    }

  @SuppressWarnings("unchecked")
View Full Code Here

Examples of com.springone.myrestaurants.domain.UserAccount.persist()

      newUser.setLastName("Doe");
      newUser.setBirthDate(new Date());
      newUser.setNickname("Bubba");
      newUser.setUserName("jdoe");
      em.persist(newUser);
        newUser.persist();
      Assert.assertEquals("Should have zero friends", 0, newUser.getFriends().size());     
      newUser.getFriends().add(user);
      Assert.assertEquals("Should have a list of friends", 1, newUser.getFriends().size());
    }
   
View Full Code Here

Examples of com.sun.enterprise.security.auth.realm.Realm.persist()

       
        try
        {
            final Realm realm = getRealm(realmName);
            realm.addUser(user, password.toCharArray(), groupList);
            realm.persist();
        }
        catch( final Exception e )
        {
            throw new RuntimeException(e);
        }
View Full Code Here

Examples of com.sun.enterprise.security.auth.realm.file.FileRealm.persist()

                            if(se != null && se.isDas()) {
                                throw new BadRealmException(br);
                            }
                        }
                        fr.persist();
                        report.setActionExitCode(ActionReport.ExitCode.SUCCESS);
                    } catch (Exception e) {
                        String localalizedErrorMsg = (e.getLocalizedMessage() == null)?"":e.getLocalizedMessage();
                        report.setMessage(
                                localStrings.getLocalString("create.file.user.useraddfailed",
View Full Code Here

Examples of com.tll.dao.IEntityDao.persist()

      final AccountAddress aa = getEntityBeanFactory().getEntityCopy(AccountAddress.class);
      final Address a = getEntityBeanFactory().getEntityCopy(Address.class);
      aa.setAddress(a);
      account.addAccountAddress(aa);

      final Currency c = dao.persist(getEntityBeanFactory().getEntityCopy(Currency.class));
      account.setCurrency(c);

      pi = dao.persist(getEntityBeanFactory().getEntityCopy(PaymentInfo.class));
      account.setPaymentInfo(pi);
View Full Code Here

Examples of com.tll.service.entity.account.IAccountService.persist()

    Account account = null;
    try {
      account = stubValidAccount(false);

      final IAccountService accountService = getEntityServiceFactory().instance(IAccountService.class);
      account = accountService.persist(account);

      getDbTrans().startTrans();
      final Criteria<AccountHistory> criteria = new Criteria<AccountHistory>(AccountHistory.class);
      criteria.getPrimaryGroup().addCriterion("account", Account.class, account.getId());
      final List<SearchResult> list = AbstractDbAwareTest.getEntitiesFromDb(getDao(), criteria);
View Full Code Here

Examples of cybervillains.ca.KeyStoreManager.persist()


            KeyStoreManager mgr = new KeyStoreManager(root);
            mgr.getCertificateByHostname(host);
            mgr.getKeyStore().deleteEntry(KeyStoreManager._caPrivKeyAlias);
            mgr.persist();

            listener.setKeystore(new File(root, "cybervillainsCA.jks").getAbsolutePath());
            listener.setNukeDirOrFile(root);
        } catch (Exception e) {
            throw new RuntimeException(e);
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.