Examples of persist()


Examples of dao.ContactDao.persist()

                try {
                    ContactDao dao = DaoManager.getContactDao();
                    Contact c1 = new Contact();
                    c1.setFirstName("Jack");
                    c1.setLastName("Jones");
                    dao.persist(c1);

                    assertNotNull("saved contact id is null", c1.getId());
                    Contact c2 = dao.findById(c1.getId());
                    assertEquals("names are not equal", c2.getFirstName(), c1.getFirstName());
                    dao.remove(c2);
View Full Code Here

Examples of de.mhus.lib.jpa.JpaEntityManager.persist()

   
    em.begin();
   
    Book book1 = new Book();
    book1.setName("Oh wie schoen ist Panama");
    em.persist(book1);
   
    Book book2 = new Book();
    book2.setName("Sofies Welt");
    em.persist(book2);
   
View Full Code Here

Examples of edu.drexel.goodwin.cpd.domain.Researcher.persist()

    if (!result.hasErrors()) {
      uploadProfilePictureIfEntered(dto, researcher);

      researcher.setSalt(getRandomSalt());
      researcher.setPassword(getHashedPassword(dto.getPassword(), researcher.getSalt()));
      researcher.persist();
     
      String message = generateMessage(accountCreatedMessage, new Object[] {researcher.getEmail(), applicationUrl});
      messageSender.sendMessage("Community Profile Database Account Created", researcher.getEmail(), message);
    }
  }
View Full Code Here

Examples of gov.nasa.arc.mct.platform.spi.PersistenceProvider.persist()

            }
        }
       
        if (!bootstraps.isEmpty()) {
            PersistenceProvider persistence = PlatformAccess.getPlatform().getPersistenceProvider();
            persistence.persist(bootstraps);
            persistence.tagComponents("bootstrap:admin", adminBootstraps);
            persistence.tagComponents("bootstrap:creator", userBootstraps);
        }
    }
   
View Full Code Here

Examples of info.archinnov.achilles.internal.context.facade.PersistenceManagerOperations.persist()

    protected <T> AchillesFuture<T> asyncInsert(final T entity, Options options) {
        entityValidator.validateEntity(entity, entityMetaMap);
        optionsValidator.validateOptionsForUpsert(entity, entityMetaMap, options);
        proxifier.ensureNotProxy(entity);
        PersistenceManagerOperations context = initPersistenceContext(entity, options);
        return context.persist(entity);
    }

    protected <T> AchillesFuture<T> asyncUpdate(T entity, Options options) {
        proxifier.ensureProxy(entity);
        Object realObject = proxifier.getRealObject(entity);
View Full Code Here

Examples of io.druid.segment.realtime.plumber.Plumber.persist()

            );
          }
          metrics.incrementProcessed();

          if (numRows >= myRowFlushBoundary) {
            plumber.persist(firehose.commit());
          }
        } else {
          metrics.incrementThrownAway();
        }
      }
View Full Code Here

Examples of javax.persistence.EntityManager.persist()

            // get entity manager
            EntityManager entityManager = defaultLocator.locate();

            // It's managed by JACORB
            // Hence we don't deal with the TX here           
            entityManager.persist(event);

        } catch (Exception e) {
            log.error("Error persisting event", e);
        }
View Full Code Here

Examples of krati.store.AbstractDataArray.persist()

            StatsLog.logger.info(">>> read only");
            evalRead(dataArray, _numReaders, Math.min(timeAllocated, 10));
           
            StatsLog.logger.info(">>> write only");
            evalWrite(dataArray, timeAllocated);
            dataArray.persist();
           
            StatsLog.logger.info(">>> validate");
            validate(dataArray);
           
            StatsLog.logger.info(">>> read & write");
View Full Code Here

Examples of krati.store.ArrayStorePartition.persist()

            StatsLog.logger.info(">>> read only");
            evalRead(partition, _numReaders, Math.min(timeAllocated, 10));
           
            StatsLog.logger.info(">>> write only");
            evalWrite(partition, timeAllocated);
            partition.persist();
           
            StatsLog.logger.info(">>> validate");
            validate(partition);
           
            StatsLog.logger.info(">>> read & write");
View Full Code Here

Examples of me.prettyprint.hom.EntityManagerImpl.persist()

    MyTestBean o1 = new MyTestBean();
    o1.setBaseId(UUID.randomUUID());
    o1.setIntProp1(1);
    o1.setBoolProp1(Boolean.TRUE);
    o1.setLongProp1(123L);
    em.persist(o1);
    MyTestBean o2 = em.find(MyTestBean.class, o1.getBaseId());

    assertEquals(o1.getBaseId(), o2.getBaseId());
    assertEquals(o1.getIntProp1(), o2.getIntProp1());
    assertEquals(o1.isBoolProp1(), o2.isBoolProp1());
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.