private SocialUserWeiboComment tranlateWeiboToComment( SocialUserWeibo dbWeibo, SocialUserWeibo soruceWeibo, int weiboType) { SocialUserWeiboComment myComment = new SocialUserWeiboComment(); myComment.setCommentId(dbWeibo.getWeiboId()); int factWeiboType = -1; if (DictDef.dictInt("weibo_mentions_timeline") == weiboType) { factWeiboType = DictDef.dictInt("comment_to_me"); } if (DictDef.dictInt("weibo_user_timeline") == weiboType) { // 我的微博就是我发出的品论 factWeiboType = DictDef.dictInt("comment_by_me"); } myComment.setCommentType(factWeiboType); myComment.setCommentUid(dbWeibo.getWeiboUid()); myComment.setCreateAt(dbWeibo.getCreateAt()); myComment.setMid(dbWeibo.getMid()); myComment.setSource(dbWeibo.getSource()); myComment.setText(dbWeibo.getText()); myComment.setUserDomain(dbWeibo.getUserDomain()); myComment.setUserName(dbWeibo.getUserName()); myComment.setUserProfileImageUrl(dbWeibo.getUserProfileImageUrl()); myComment.setUserScreenName(dbWeibo.getUserScreenName()); myComment.setUserVerified(dbWeibo.getUserVerified()); if (soruceWeibo == null) { return myComment; } myComment.setStatusCreatedAt(soruceWeibo.getCreateAt()); myComment.setStatusMid(soruceWeibo.getMid()); myComment.setStatusSource(soruceWeibo.getSource()); // myComment.setStatusSourceUrl(comment.getStatus().getSource().getUrl()); myComment.setStatusText(soruceWeibo.getText()); myComment.setStatusUserDomain(soruceWeibo.getUserDomain()); myComment.setStatusUserName(soruceWeibo.getUserName()); myComment.setStatusUserScreenName(soruceWeibo.getUserScreenName()); myComment.setStatusUserVerified(soruceWeibo.getUserVerified()); myComment.setStatusWeiboId(soruceWeibo.getWeiboId()); System.out.println(soruceWeibo.getWeiboUid() + "----" + dbWeibo.getWeiboUid()); myComment.setStatusUserUid(soruceWeibo.getWeiboUid()); return myComment; }
private void initWeiboCommentByAccount( SocialUserWeiboComment socialUserWeiboComment, SocialUserAccount ac) { socialUserWeiboComment.setUserAccountId(ac.getId()); socialUserWeiboComment.setOwner(ac.getOwnUser()); socialUserWeiboComment.setType(ac.getType()); }