Examples of update()


Examples of org.milyn.scribe.invoker.AnnotatedDaoInvoker.update()

    Object expectedResult = new Object();

    when(fullDao.updateIt(toUpdate)).thenReturn(expectedResult);

    Object result = invoker.update(toUpdate);

    verify(fullDao).updateIt(same(toUpdate));

    assertSame(expectedResult, result);
View Full Code Here

Examples of org.milyn.scribe.invoker.DaoInvoker.update()

        throw new IllegalStateException("The DAO register returned null while getting the DAO '" + daoName + "'");
      }

      final DaoInvoker daoInvoker = DaoInvokerFactory.getInstance().create(dao, objectStore);

      Object result = name == null ? daoInvoker.update(bean) : daoInvoker.update(name, bean) ;

      if(updatedBeanId != null) {
        if(result == null) {
          result = bean;
        }
View Full Code Here

Examples of org.milyn.scribe.invoker.InterfaceDaoInvoker.update()

    DaoInvoker invoker = new InterfaceDaoInvoker(fullDao);

    Object toMerge = new Object();

    invoker.update(toMerge);

    verify(fullDao).update(same(toMerge));

  }
View Full Code Here

Examples of org.modeshape.jcr.ModeShapeEngine.update()

                                                                      validationResults.toString());
            throw new StartException(msg);
        }
        // Update the deployed repository's configuration with these changes
        try {
            engine.update(this.repositoryName, changes);
        } catch (ConfigurationException e) {
            throw new StartException(e);
        } catch (NoSuchRepositoryException e) {
            throw new StartException(e);
        } catch (RepositoryException e) {
View Full Code Here

Examples of org.molgenis.framework.db.Database.update()

      }
      else if (action.equals("UPDATE"))
      {
        if (req.get(INPUT_DATA) != null)
        {
          nRowsChanged = db.update(entityClass, csvReader);
          out.print("Updated " + formatter.format(nRowsChanged) + " rows of "
              + entityClass.getCanonicalName() + "\n");
        }
        else if (req.get(INPUT_FILE) != null)
        {
View Full Code Here

Examples of org.mongodb.morphia.mapping.MappedClass.update()

    public void testExternalMapping() throws Exception {
        final Mapper mapper = getMorphia().getMapper();
        final CloneMapper helper = new CloneMapper(mapper);
        helper.map(Skeleton.class, EntityWithNoAnnotations.class);
        final MappedClass mc = mapper.getMappedClass(EntityWithNoAnnotations.class);
        mc.update();
        assertNotNull(mc.getIdField());
        assertNotNull(mc.getEntityAnnotation());
        assertEquals("special", mc.getEntityAnnotation().value());

        EntityWithNoAnnotations ent = new EntityWithNoAnnotations();
View Full Code Here

Examples of org.mongodb.morphia.testdaos.HotelDAO.update()

        assertTrue(hotelDAO.exists("type", Hotel.Type.BUSINESS));
        assertNotNull(hotelDAO.findOne("type", Hotel.Type.LEISURE));

        // try updating
        final UpdateOperations<Hotel> mods = hotelDAO.createUpdateOperations().inc("stars", 1);
        hotelDAO.update(hotelDAO.createQuery().filter("stars", 4), mods);
        assertEquals(2, hotelDAO.count(hotelDAO.createQuery().filter("stars", 5)));

        hotelDAO.deleteById(borg.getId());
        assertEquals(1, hotelDAO.count());
View Full Code Here

Examples of org.mortbay.io.View.update()

        View valUC = new View(buf);
        View valLC = new View(buf);
        headUC.update(0,10);
        headLC.update(10,20);
        valUC.update(20,25);
        valLC.update(25,30);

        fields.add("header","value");
        fields.add(headUC,valLC);
        fields.add("other","data");
        s=enum2set(fields.getFieldNames());
View Full Code Here

Examples of org.myphotodiary.model.SessionConfiguration.update()

      try {
        TypedQuery<SessionConfiguration> query = em.createQuery(
            "select config from SessionConfiguration config where config.user = ?1 and config.pwd = ?2", SessionConfiguration.class)
            .setParameter(1, newConfig.getUser()).setParameter(2, newConfig.getPwd());
        oldConfig = query.getSingleResult();
        oldConfig.update(newConfig);
        em.merge(oldConfig);
      } catch (NoResultException ex) {
        getServletContext().log("No directory data for: " + newConfig.getUser(), ex);
        em.persist(newConfig);
      }
View Full Code Here

Examples of org.myphotodiary.model.UserConfiguration.update()

      tx.begin();
     
      user = em.find(User.class, user.getUserName());
      UserConfiguration oldConfig = user.getConfiguration();
      if (oldConfig != null) {
        oldConfig.update(newConfig);
        em.merge(oldConfig);
      }
      else {
        em.persist(newConfig);
      }
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.