Package org.encuestame.utils.web.stats

Examples of org.encuestame.utils.web.stats.ItemStatDetail


        if (period == null) {
            throw new EnMeSearchException("search params required.");
        } else {
            final List<TweetPoll> tpolls = getTweetPollsByHashTag(tagName, null, null, TypeSearchResult.HASHTAG, period);
            for (TweetPoll tweetPoll : tpolls) {
                final ItemStatDetail statDetail = new ItemStatDetail();
                tpSavedPublished = getTweetPollDao().getSocialLinksByTypeAndDateRange(tweetPoll, null, null, TypeSearchResult.TWEETPOLL);
                statDetail.setDate(tweetPoll.getCreateDate());
                statDetail.setItemId(Long.valueOf(tpSavedPublished.size()));
                //FIXME: itemId should be the id of something, now store a "total" value.
                //tpSocialSavePublishedDetail.addAll(ConvertDomainBean.convertTweetPollSavedPublishedStatusListToItemDetailBean(tpSavedPublished));
                tpSocialSavePublishedDetail.add(statDetail);
            }
            this.removeDuplicatleItemOutOfRange(tpSocialSavePublishedDetail, period.toDays());
View Full Code Here


            assertNotNull(tpSaved);
        }
    }

    public ItemStatDetail createItemStatDetail(final Long itemId, final Date creationDate, final Long miliDate){
        final ItemStatDetail isd = new ItemStatDetail();
        isd.setDate(creationDate);
        isd.setItemId(itemId);
        //isd.setMilisecondsDate(miliDate);
        return isd;
    }
View Full Code Here

        tp8.getHashTags().add(myHashTag);
        getTweetPoll().saveOrUpdate(tp8);
        assertNotNull(tp8);

        final List<ItemStatDetail> itemStatDetail = new ArrayList<ItemStatDetail>();
        final ItemStatDetail isd1 = this.createItemStatDetail(tp1.getTweetPollId(),
                tp1.getCreateDate());
        final ItemStatDetail isd2 = this.createItemStatDetail(tp2.getTweetPollId(),
                tp2.getCreateDate());
        final ItemStatDetail isd3 = this.createItemStatDetail(tp3.getTweetPollId(),
                tp3.getCreateDate());
        final ItemStatDetail isd4 = this.createItemStatDetail(tp4.getTweetPollId(),
                tp4.getCreateDate());
        final ItemStatDetail isd5 = this.createItemStatDetail(tp5.getTweetPollId(),
                tp5.getCreateDate());
        final ItemStatDetail isd6 = this.createItemStatDetail(tp6.getTweetPollId(),
                tp6.getCreateDate());
        final ItemStatDetail isd7 = this.createItemStatDetail(tp7.getTweetPollId(),
                tp7.getCreateDate());
        final ItemStatDetail isd8 = this.createItemStatDetail(tp7.getTweetPollId(),
                tp8.getCreateDate());

        itemStatDetail.add(isd1);
        itemStatDetail.add(isd2);
        itemStatDetail.add(isd3);
View Full Code Here

     * @param itemId
     * @param creationDate
     * @return
     */
    private ItemStatDetail createItemStatDetail(final Long itemId, final Date creationDate) {
        final ItemStatDetail isd = new ItemStatDetail();
        isd.setDate(creationDate);
        isd.setItemId(itemId);
        return isd;
    }
View Full Code Here

     * @param tweetPollResult
     * @return
     */
    public static final ItemStatDetail convertTweetPollResultToItemDetailBean(
            final TweetPollResult tweetPollResult) {
        final ItemStatDetail itemDetail = new ItemStatDetail();
        itemDetail
                .setItemId(tweetPollResult.getTweetPollSwitch().getSwitchId());
        itemDetail.setDate(tweetPollResult.getTweetResponseDate());
        return itemDetail;
    }
View Full Code Here

     * @param tweetPollResult
     * @return
     */
    public static final ItemStatDetail convertTweetPollSavedPublishedStatusToItemDetailBean(
            final TweetPollSavedPublishedStatus tweetPollSocial) {
        final ItemStatDetail itemDetail = new ItemStatDetail();
        itemDetail.setItemId(tweetPollSocial.getId());
        itemDetail.setDate(tweetPollSocial.getPublicationDateTweet());
        return itemDetail;
    }
View Full Code Here

     * @param tweetPoll
     * @return
     */
    public static final ItemStatDetail convertTweetPollToItemDetailBean(
            final TweetPoll tweetPoll) {
        final ItemStatDetail itemDetail = new ItemStatDetail();
        itemDetail.setItemId(tweetPoll.getTweetPollId());
        itemDetail.setDate(tweetPoll.getCreateDate());
      //  itemDetail.setMilisecondsDate(DateUtil.getDateMiliseconds(tweetPoll.getCreateDate()));
        return itemDetail;
    }
View Full Code Here

    */
   public static final List<ItemStatDetail> convertObjectTweetPollListToItemDetailBean(
           final List<Object[]> tpolls) {
       final List<ItemStatDetail> itemStatDetail = new ArrayList<ItemStatDetail>();
       for (Object[] objects : tpolls) {
           final ItemStatDetail itemDetail = new ItemStatDetail();
           final Long inte1 = (Long) objects[1];
           final Date date1 = (Date) objects[0];
           itemDetail.setDate(date1  );
           itemDetail.setItemId(inte1);
           itemStatDetail.add(itemDetail);
       }
       return itemStatDetail;
   }
View Full Code Here

     */
    public static final List<ItemStatDetail> convertObjectListToItemDetailBean(
            final List<Object[]> tpolls) {
         final List<ItemStatDetail> itemStatDetail = new ArrayList<ItemStatDetail>();
       for (Object[] objects : tpolls) {
           final ItemStatDetail itemDetail = new ItemStatDetail();
           final Long inte1 = (Long) objects[1];
           final Date date1 = (Date) objects[0];
           itemDetail.setDate(date1  );
           itemDetail.setItemId(inte1);
           itemStatDetail.add(itemDetail);
       }
        return itemStatDetail;
    }
View Full Code Here

     * @param poll
     * @return
     */
    public static final ItemStatDetail convertPollToItemDetailBean(
            final Poll poll) {
        final ItemStatDetail itemDetail = new ItemStatDetail();
        itemDetail.setItemId(poll.getPollId());
        itemDetail.setDate(poll.getCreateDate());
        return itemDetail;
    }
View Full Code Here

TOP

Related Classes of org.encuestame.utils.web.stats.ItemStatDetail

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.