Package org.encuestame.persistence.domain.tweetpoll

Examples of org.encuestame.persistence.domain.tweetpoll.TweetPollResult


     * Vote on TweetPoll.
     * @param pollSwitch {@link TweetPollSwitch}
     * @param ip ip
     */
    public void tweetPollVote(final TweetPollSwitch pollSwitch, final String ip){
        final TweetPollResult tweetPollResult = new TweetPollResult();
        tweetPollResult.setIpVote(ip.trim());
        tweetPollResult.setTweetPollSwitch(pollSwitch);
        tweetPollResult.setTweetResponseDate(new Date());
        getTweetPollDao().saveOrUpdate(tweetPollResult);
    }
View Full Code Here


    /*
     * (non-Javadoc)
     * @see org.encuestame.core.service.imp.ITweetPollService#tweetPollVote(org.encuestame.persistence.domain.tweetpoll.TweetPollSwitch, java.lang.String, java.util.Date)
     */
    public void tweetPollVote(final TweetPollSwitch pollSwitch, final String ip, final Date voteDate) {
        final TweetPollResult pollResult = new TweetPollResult();
        pollResult.setIpVote(ip.trim());
        pollResult.setTweetPollSwitch(pollSwitch);
        pollResult.setTweetResponseDate(voteDate);
        getTweetPollDao().saveOrUpdate(pollResult);
    }
View Full Code Here

     * @param tweetPollSwitch {@link TweetPollResult}
     * @param Ip ip address
     * @return {@link TweetPollResult}.
     */
    public TweetPollResult createTweetPollResult(final TweetPollSwitch tweetPollSwitch, final String Ip){
        final TweetPollResult tweetPollResult = new TweetPollResult();
        tweetPollResult.setIpVote(Ip);
        tweetPollResult.setTweetPollSwitch(tweetPollSwitch);
        tweetPollResult.setTweetResponseDate(new Date());
        getTweetPoll().saveOrUpdate(tweetPollResult);
        return tweetPollResult;
    }
View Full Code Here

     * @param Ip
     * @param pollingDate
     * @return
     */
    public TweetPollResult createTweetPollResultWithPollingDate(final TweetPollSwitch tweetPollSwitch, final String Ip, final Date pollingDate){
        final TweetPollResult tpResults = this.createTweetPollResult(tweetPollSwitch, Ip);
        tpResults.setTweetResponseDate(pollingDate);
        getTweetPoll().saveOrUpdate(tpResults);
        return tpResults;
    }
View Full Code Here

        .createTweetPollQuestionAnswer(qAnswerBean, myTweetPoll, null);

    tweetPollService.tweetPollVote(pollSwitch, ipVote, Calendar
        .getInstance().getTime());
    // tweetPollService.tweetPollVote(pollSwitch2, ipVote);
    final TweetPollResult result = tweetPollService.validateTweetPollIP(
        ipVote, myTweetPoll);
    assertEquals("Should be equals", ipVote, result.getIpVote());
  }
View Full Code Here

                myTweetPoll);

        final Calendar pollingDate = Calendar.getInstance();
        pollingDate.add(Calendar.MONTH, -1);

        final TweetPollResult tpResultAmerica = createTweetPollResultWithPollingDate(
                pollSwitchAmerica, "192.168.0.1", pollingDate.getTime());

        pollingDate.add(Calendar.MONTH, -5);
        final TweetPollResult tpResultAmerica2 = createTweetPollResultWithPollingDate(
                pollSwitchAmerica, "192.168.0.2", pollingDate.getTime());

        final TweetPollResult tpResultEurope = createTweetPollResultWithPollingDate(
                pollSwitchEurope, "192.168.0.2", pollingDate.getTime());

        final Long totalVotes = getTweetPoll()
                .getTotalVotesByTweetPollIdAndDateRange(
                        myTweetPoll.getTweetPollId(),
View Full Code Here

TOP

Related Classes of org.encuestame.persistence.domain.tweetpoll.TweetPollResult

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.