Package com.skyline.wo.model

Examples of com.skyline.wo.model.Album


    if (user == null) {
      throw new NotLoginException("上传头像必须登录");
    }

    long ownerId = user.getId();
    Album portraitAlbum = albumService.getUserPortraitAlbum(ownerId);
    Photo portraitPhoto = albumService.getCurrentPortraitPhotoFromAlbum(portraitAlbum);

    ModelAndView view = new ModelAndView();
    view.addObject("portraitAlbum", portraitAlbum);
    view.addObject("portrait", portraitPhoto);
View Full Code Here


    return MAPPER;
  }

  @Override
  public Album mapRow(ResultSet rs, int rowNum) throws SQLException {
    Album album = new Album();
    album.setId(rs.getLong(COLUMN_ID));
    album.setOwnerId(rs.getLong(COLUMN_OWNER_ID));
    album.setOwnerNickname(rs.getString(COLUMN_OWNER_NICKNAME));
    album.setOwnerPortrait(rs.getString(COLUMN_OWNER_PORTRAIT));
    album.setAlbumName(rs.getString(COLUMN_ALBUM_NAME));
    try {
      album.setPlace(rs.getString(COLUMN_PLACE));
    } catch (SQLException e) {
      album.setPlace(null);
    }
    try {
      album.setDescription(rs.getString(COLUMN_DESCRIPTION));
    } catch (SQLException e) {
      album.setDescription(null);
    }
    album.setPhotoNum(rs.getInt(COLUMN_PHOTO_NUM));
    album.setCommentNum(rs.getInt(COLUMN_COMMENT_NUM));
    album.setVisitNum(rs.getInt(COLUMN_VISIT_NUM));
    album.setUp(rs.getInt(COLUMN_UP));
    album.setDown(rs.getInt(COLUMN_DOWN));
    album.setShareNum(rs.getInt(COLUMN_SHARE_NUM));
    album.setCover(rs.getString(COLUMN_COVER));
    album.setCoverExt(rs.getString(COLUMN_COVER_EXT));
    album.setCreateTime(rs.getTimestamp(COLUMN_CREATE_TIME));
    album.setUpdateTime(rs.getTimestamp(COLUMN_UPATE_TIME));
    album.setAuthority(rs.getInt(COLUMN_AUTHORITY));
    album.setActivity(Activity.valueOf(rs.getString(COLUMN_ACTIVITY)));
    return album;
  }
View Full Code Here

TOP

Related Classes of com.skyline.wo.model.Album

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.