Examples of toDTO()


Examples of com.metadot.book.connectr.server.domain.Friend.toDTO()

  public FriendDTO updateFriend(FriendDTO friendDTO) {

    PersistenceManager pm = PMF.getTxnPm();
    if (friendDTO.getId() == null) { // create new Friend
      Friend newFriend = addFriend(friendDTO);
      return newFriend.toDTO();
    }

    // otherwise, do an update of an existing Friend.
    // do this operation under transactional control
    Friend friend = null;
View Full Code Here

Examples of com.metadot.book.connectr.server.domain.Friend.toDTO()

      detached = getFriendViaCache(id, pm);
    } finally {
      pm.close();
    }
    logger.fine("in getFriend- urls are: " + detached.getUrls());
    return detached.toDTO();
  }

  private Friend getFriendViaCache(String id, PersistenceManager pm) {
    Friend dsFriend = null, detached = null;
View Full Code Here

Examples of com.metadot.book.connectr.server.domain.StreamItem.toDTO()

      pm.close();
    }
    // can't just use the detached StreamItem as a DTO,
    // as it has an App Engine Text field
    // that needs to be converted to a String.
    return streamItem.toDTO();
  }

  // start a task to update the feeds for the current user.
  public Boolean initiateUserFeedUpdate() {
View Full Code Here

Examples of org.company.recordshop.service.dto.translators.AgedPersonTranslator.toDto()

    @Test
    public void testGetAge() {
        AgedPersonTranslator translator = new AgedPersonTranslator();
        Person person = new Person("Bob", "the Builder", new DateTime().minusYears(10));
        Assert.assertEquals(10, person.getAge().intValue());
        AgedPerson agedPerson = translator.toDto(person);
        Assert.assertEquals(10, agedPerson.getAge().intValue());
    }

}
View Full Code Here

Examples of org.g4studio.core.metatype.BaseDomain.toDto()

    for (int j = 0; j < fieldList.size(); j++) {
      Dto dataDto = new BaseDto();
      Object object = fieldList.get(j);
      if (object instanceof BaseDomain) {
        BaseDomain domain = (BaseDomain) object;
        dataDto.putAll(domain.toDto());
      } else if (object instanceof BaseVo) {
        BaseVo vo = (BaseVo) object;
        dataDto.putAll(vo.toDto());
      } else if (object instanceof BaseDto) {
        Dto dto = (BaseDto) object;
View Full Code Here

Examples of org.g4studio.core.metatype.BaseVo.toDto()

      if (object instanceof BaseDomain) {
        BaseDomain domain = (BaseDomain) object;
        dataDto.putAll(domain.toDto());
      } else if (object instanceof BaseVo) {
        BaseVo vo = (BaseVo) object;
        dataDto.putAll(vo.toDto());
      } else if (object instanceof BaseDto) {
        Dto dto = (BaseDto) object;
        dataDto.putAll(dto);
      } else {
        log.error(G4Constants.Exception_Head + "不支持的数据类型!");
View Full Code Here

Examples of org.geomajas.gwt.client.map.feature.FeatureTransaction.toDto()

      MapModelWorkflowContext mmc = (MapModelWorkflowContext) context;
      final MapModel mapModel = mmc.getMapModel();
      final FeatureTransaction ft = mmc.getFeatureTransaction();

      PersistTransactionRequest request = new PersistTransactionRequest();
      request.setFeatureTransaction(ft.toDto());
      request.setCrs(mapModel.getCrs());

      GwtCommand command = new GwtCommand(PersistTransactionRequest.COMMAND);
      command.setCommandRequest(request);
View Full Code Here

Examples of org.vfny.geoserver.config.validation.ValidationConfig.toDTO()

        ServletContext context = this.getServlet().getServletContext();
        ValidationConfig validationConfig = (ValidationConfig) context.getAttribute(ValidationConfig.CONFIG_KEY);
        TestSuiteConfig suiteConfig = (TestSuiteConfig) request.getSession().getAttribute(TestSuiteConfig.CURRENTLY_SELECTED_KEY);
        Map plugins = new HashMap();
        Map testSuites = new HashMap();
        validationConfig.toDTO(plugins,testSuites); // return by ref.
        TestValidationResults results = new TestValidationResults();
        try {
          ValidationRunnable testThread = new ValidationRunnable(request);
          testThread.setup(results, getDataConfig().toRepository(context), plugins, testSuites);
         
View Full Code Here

Examples of org.vfny.geoserver.global.WFS.toDTO()

                    "GeoServerPlugIn Failed. Thus ConfigPlugIn cannot run.");
            }
        }

        sc.setAttribute(WMSConfig.CONFIG_KEY, new WMSConfig((WMSDTO)wms.toDTO()));
        sc.setAttribute(WFSConfig.CONFIG_KEY, new WFSConfig((WFSDTO)wfs.toDTO()));
        sc.setAttribute(GlobalConfig.CONFIG_KEY,
            new GlobalConfig((GeoServerDTO)wfs.getGeoServer().toDTO()));
        sc.setAttribute(DataConfig.CONFIG_KEY, new DataConfig((DataDTO)wfs.getData().toDTO()));
       
        ValidationConfig vc = null;
View Full Code Here

Examples of org.vfny.geoserver.global.WMS.toDTO()

                throw new ServletException(
                    "GeoServerPlugIn Failed. Thus ConfigPlugIn cannot run.");
            }
        }

        sc.setAttribute(WMSConfig.CONFIG_KEY, new WMSConfig((WMSDTO)wms.toDTO()));
        sc.setAttribute(WFSConfig.CONFIG_KEY, new WFSConfig((WFSDTO)wfs.toDTO()));
        sc.setAttribute(GlobalConfig.CONFIG_KEY,
            new GlobalConfig((GeoServerDTO)wfs.getGeoServer().toDTO()));
        sc.setAttribute(DataConfig.CONFIG_KEY, new DataConfig((DataDTO)wfs.getData().toDTO()));
       
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.