Package com.skyline.spot.model

Examples of com.skyline.spot.model.SpotRefrence


  public static SpotRefrenceMapper getMapper() {
    return MAPPER;
  }

  public SpotRefrence mapRow(ResultSet rs, int rowNum) throws SQLException {
    SpotRefrence sr = new SpotRefrence();
    try {
      sr.setId(rs.getLong(COLUMN_ID));
      sr.setSpotId(rs.getLong(COLUMN_SPOTID));
      sr.setSpotName(rs.getString(COLUMN_SPOTNAME));
      sr.setSpotPortrait(rs.getString(COLUMN_SPOTPORTRAIT));
    } catch (Exception e) {

    }
    try {
      sr.setRefrenceId(rs.getLong(COLUMN_REFRENCEID));
      sr.setRefrenceportrait(rs.getString(COLUMN_REFRENCEPORTRAIT));
      sr.setRefrenceTitle(rs.getString(COLUMN_REFRENCETITLE));
      sr.setRefrenceDigest(rs.getString(COLUMN_REFRENCEDIGEST));
      sr.setRefrenceType(SpotRefrenceType.valueOf(rs
          .getString(COLUMN_REFRENCETYPE)));
    } catch (Exception e) {

    }
    try {
      sr.setProviderId(rs.getLong(COLUMN_REFRENCEPROVIDERID));
      sr.setProviderNikename(rs
          .getString(COLUMN_REFRENCEPROVIDERNICKNAME));
      sr.setProviderPortrait(rs
          .getString(COLUMN_REFRENCEPROVIDERPORTRAIT));
      sr.setProviderEmail(rs
          .getString(COLUMN_REFRENCEPROVIDEREMAIL));
    } catch (Exception e) {

    }
   
    try{
    sr.setCreateTime(rs.getDate(COLUMN_CREATETIME));
    sr.setUpdateTime(rs.getDate(COLUMN_UPDATETIME));
    sr.setActivity(Activity.valueOf((rs.getString(COLUMN_ACTIVITY))));
    }catch(Exception e){
     
    }
    return sr;
  }
View Full Code Here


   */
  @RequestMapping(value = "/{spotId}/{id}", method = RequestMethod.GET)
  public ModelAndView querySpotRefrenceDetail(@PathVariable("id") Long id,
  @PathVariable("spotId") Long spotId) {
    ModelAndView mav = new ModelAndView();
    SpotRefrence ref = spotRefrenceService.getRefrenceById(id);
    if(ref==null)
    {
      mav.setViewName(ViewPaths.SPOT_NOTFOUND);
      return mav;
    }
    if (ref.getRefrenceType() == SpotRefrenceType.ALBUM) {
      Page page = new Page();
      page.setSize(listRefrencePageSize);
      List<Photo> photoList = albumService.listPhotosOfAlbum(
          ref.getRefrenceId(), 0, Authority.PUBLIC, page, true);
      mav.addObject("refInfo", ref);
      mav.addObject("photoList", photoList);
      mav.setViewName(ViewPaths.SPOTREFRENCE_PHOTOVIEW);
      return mav;

    } else if (ref.getRefrenceType() == SpotRefrenceType.TRAVELNOTE) {

    } else {
      Article article = articleService.getArticleById(id);
      ModelAndView v = new ModelAndView(ViewPaths.SPOTREFRENCE_DETAIL);
      v.addObject("article", article);
View Full Code Here

      @PathVariable("spotId") Long spotId) {
    ModelAndView mav = new ModelAndView();
    if (refrenceType == SpotRefrenceType.ALBUM) {
      Page page = new Page();
      page.setSize(1);
      SpotRefrence spotRef = spotRefrenceService
          .getRefrencesBySpotIdAndType(spotId,
              SpotRefrenceType.ALBUM, page).get(0);
      Album album = albumService.getAlbumById(spotRef.getRefrenceId());
      List<Photo> photosList = albumService.listPhotosOfAlbum(
          album.getId(), 0, Authority.PUBLIC, page, true);
      mav.addObject("photoList", photosList);
      mav.addObject("albumInfo", album);
      mav.addObject("refInfo", spotRef);
View Full Code Here

TOP

Related Classes of com.skyline.spot.model.SpotRefrence

Copyright © 2018 www.massapicom. 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.