Package org.encuestame.persistence.domain

Examples of org.encuestame.persistence.domain.HashTagRanking


          
          List<HashTagRanking> hashTagRankingList = getHashTagDao()
                  .getHashTagRankStats(currentDate);
       
          for (HashTag hashTag : tags) {
            final HashTagRanking tagRanking;
              log.debug("Calculate for: "+hashTag.getHashTag()+" size after calculate: "+hashTag.getSize());
 
              long tagFrecuency = getHashTagFrecuency(hashTag.getHashTag(), this.INIT_RESULTS, this.MAX_RESULTS);
              log.debug("-------- tag frecuency: " + tagFrecuency);
              long relevance = (tagFrecuency + (hashTag.getHits() == null ? 0 : hashTag.getHits()));
View Full Code Here


     * @param tag
     * @param rankingDate
     * @return
     */
    private HashTagRanking createHashTagRanking(final double average, final HashTag tag, final Date rankingDate){
      final HashTagRanking tagRank = new HashTagRanking();
      tagRank.setAverage(average);
      tagRank.setHashTag(tag);
      tagRank.setRankingDate(rankingDate);
      return tagRank;
    }
View Full Code Here

     * @param rankingDate
     * @param average
     * @return
     */
    public HashTagRanking createHashTagRank(final HashTag tag, final Date rankingDate, final Double average){
        final HashTagRanking tagRank = new HashTagRanking();
        tagRank.setHashTag(tag);
        tagRank.setAverage(average);
        tagRank.setRankingDate(rankingDate);
        getHashTagDao().saveOrUpdate(tagRank);
        return tagRank;
    }
View Full Code Here

    /**
     *  Test {@link HashTagRanking} Domain.
     */
    @Test
    public void testHashTagRanking(){
        final HashTagRanking tagRanking = new HashTagRanking();
        final HashTag tag = createHashTag("health");
        tagRanking.setHashTag(tag);
        tagRanking.setAverage(25D);
        tagRanking.setRankingDate(new Date());
        getHashTagDao().saveOrUpdate(tagRanking);
    }
View Full Code Here

TOP

Related Classes of org.encuestame.persistence.domain.HashTagRanking

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.