Class RealizationDAO

java.lang.Object
org.exoplatform.commons.persistence.impl.GenericDAOJPAImpl<RealizationEntity,Long>
io.meeds.gamification.dao.RealizationDAO
All Implemented Interfaces:
org.exoplatform.commons.api.persistence.GenericDAO<RealizationEntity,Long>

public class RealizationDAO extends org.exoplatform.commons.persistence.impl.GenericDAOJPAImpl<RealizationEntity,Long>
  • Field Details

  • Constructor Details

    • RealizationDAO

      public RealizationDAO()
  • Method Details

    • getLeaderboardRank

      public int getLeaderboardRank(IdentityType earnerType, String earnerIdentityId)
    • getLeaderboardRankByDateAndProgramId

      public int getLeaderboardRankByDateAndProgramId(IdentityType earnerType, String earnerIdentityId, Date date, long domainId)
    • getLeaderboardRankByProgramId

      public int getLeaderboardRankByProgramId(IdentityType earnerType, String earnerIdentityId, long domainId)
    • getLeaderboardRankByDate

      public int getLeaderboardRankByDate(IdentityType earnerType, String earnerIdentityId, Date fromDate)
    • getLeaderboard

      public List<StandardLeaderboard> getLeaderboard(IdentityType earnerType, int offset, int limit)
    • getLeaderboardByProgramId

      public List<StandardLeaderboard> getLeaderboardByProgramId(long domainId, IdentityType earnerType, int offset, int limit)
    • getLeaderboardByDate

      public List<StandardLeaderboard> getLeaderboardByDate(Date fromDate, IdentityType earnerType, int offset, int limit)
    • getLeaderboardByDateAndProgramId

      public List<StandardLeaderboard> getLeaderboardByDateAndProgramId(Date fromDate, IdentityType earnerType, long domainId, int offset, int limit)
    • getScoreByIdentityId

      public long getScoreByIdentityId(String earnerIdentityId)
    • getLeaderboardStatsByIdentityId

      public List<PiechartLeaderboard> getLeaderboardStatsByIdentityId(String earnerId, Date fromDate, Date toDate)
    • getScorePerProgramByIdentityId

      public List<ProfileReputation> getScorePerProgramByIdentityId(String earnerId)
      Compute for a given user the score earned for each doman
      Parameters:
      earnerId - ProfileReputation
      Returns:
      a list of objects of type
    • getScoreByIdentityIdAndBetweenDates

      public long getScoreByIdentityIdAndBetweenDates(String earnerId, Date fromDate, Date toDate)
    • getScoreByIdentityIdsAndBetweenDates

      public Map<Long,Long> getScoreByIdentityIdsAndBetweenDates(List<String> earnersId, Date fromDate, Date toDate)
    • countRealizationsByRuleIdAndEarnerId

      public int countRealizationsByRuleIdAndEarnerId(String earnerIdentityId, long ruleId)
    • countParticipantsBetweenDates

      public long countParticipantsBetweenDates(Date fromDate, Date toDate)
    • countRealizationsByRuleIdAndEarnerIdSinceDate

      public int countRealizationsByRuleIdAndEarnerIdSinceDate(String earnerIdentityId, long ruleId, Date sinceDate)
    • findLastReadlizationByRuleIdAndEarnerIdAndReceiverAndObjectId

      public RealizationEntity findLastReadlizationByRuleIdAndEarnerIdAndReceiverAndObjectId(long ruleId, String earnerId, String receiverId, String objectId, String objectType)
    • getRealizationsByObjectIdAndObjectType

      public List<RealizationEntity> getRealizationsByObjectIdAndObjectType(String objectId, String objectType)
    • findRealizationsByFilter

      public List<RealizationEntity> findRealizationsByFilter(RealizationFilter realizationFilter, int offset, int limit)
      Find realizations by filter with offset, limit.
      Parameters:
      realizationFilter - : data Transfert Object RealizationFilter
      offset - : the starting index, when supplied. Starts at 0.
      limit - : how many realizations we should load from DB
      Returns:
      a list of object of type RealizationEntity
    • countRealizationsByFilter

      public int countRealizationsByFilter(RealizationFilter filter)