コード例 #1
0
 /** Insert a vote in the user who voted field */
 private void insert_user_vote() {
   ListVotesByCommentConnector comment_connector =
       ListVotesByCommentConnector.getInstance(user_pass.getUsername(), comment_uuid);
   comment_connector.insert_vote("1");
 }
コード例 #2
0
 /** @return true if the user has voted */
 private boolean user_has_voted() {
   ListVotesByCommentConnector comment_connector =
       ListVotesByCommentConnector.getInstance(user_pass.getUsername(), comment_uuid);
   return comment_connector.has_voted();
   // check if user has already voted for this.
 }