Package io.meeds.gamification.storage
Class RealizationStorage
java.lang.Object
io.meeds.gamification.storage.RealizationStorage
- Direct Known Subclasses:
RealizationCachedStorage
-
Constructor Summary
ConstructorsConstructorDescriptionRealizationStorage(ProgramStorage programStorage, RuleStorage ruleStorage, RealizationDAO gamificationHistoryDAO) -
Method Summary
Modifier and TypeMethodDescriptionlongcountParticipantsBetweenDates(Date fromDate, Date toDate) intcountRealizationsByFilter(RealizationFilter realizationFilter) intcountRealizationsByRuleIdAndEarnerId(String earnerIdentityId, long ruleId) intcountRealizationsInPeriod(String earnerIdentityId, long ruleId, Date sinceDate) createRealization(RealizationDTO realization) findLastRealizationByRuleIdAndEarnerIdAndReceiverAndObjectId(long ruleId, String earnerId, String receiverId, String objectId, String objectType) findRealizationsByObjectIdAndObjectType(String objectId, String objectType) getLeaderboard(IdentityType identityType, int offset, int limit) getLeaderboardByDates(Date fromDate, Date toDate, IdentityType identityType, int offset, int limit) getLeaderboardByDatesByProgramIds(Date fromDate, Date toDate, IdentityType identityType, int offset, int limit, Long... programIds) getLeaderboardByProgramIds(IdentityType identityType, int offset, int limit, Long... programIds) intgetLeaderboardRank(IdentityType identityType, String earnerIdentityId) intgetLeaderboardRankByDates(IdentityType identityType, String earnerIdentityId, Date fromDate, Date toDate) intgetLeaderboardRankByDatesAndProgramIds(IdentityType identityType, String earnerIdentityId, Date fromDate, Date toDate, Long... programIds) intgetLeaderboardRankByProgramIds(IdentityType identityType, String earnerIdentityId, Long... programIds) getLeaderboardStatsByIdentityId(String earnerIdentityId, Long spaceId) getLeaderboardStatsByIdentityIdAndDates(String earnerIdentityId, Long spaceId, Date startDate, Date endDate) getParticipantsBetweenDates(Date fromDate, Date toDate) getRealizationById(long id) getRealizationsByFilter(RealizationFilter realizationFilter, int offset, int limit) longgetScoreByIdentityId(String earnerIdentityId) longgetScoreByIdentityIdAndBetweenDates(String earnerIdentityId, Date fromDate, Date toDate, Long... programIds) getScorePerProgramByIdentityId(String earnerIdentityId) getScoresByIdentityIdsAndBetweenDates(List<String> earnersId, Date fromDate, Date toDate) booleanhasPendingRealization(long ruleId, String earnerIdentityId) updateRealization(RealizationDTO realization)
-
Constructor Details
-
RealizationStorage
public RealizationStorage(ProgramStorage programStorage, RuleStorage ruleStorage, RealizationDAO gamificationHistoryDAO)
-
-
Method Details
-
getRealizationsByFilter
public List<RealizationDTO> getRealizationsByFilter(RealizationFilter realizationFilter, int offset, int limit) -
countRealizationsByFilter
-
getRealizationById
-
updateRealization
-
createRealization
-
findRealizationsByObjectIdAndObjectType
public List<RealizationDTO> findRealizationsByObjectIdAndObjectType(String objectId, String objectType) -
hasPendingRealization
-
getLeaderboardRankByDates
public int getLeaderboardRankByDates(IdentityType identityType, String earnerIdentityId, Date fromDate, Date toDate) -
getLeaderboardRankByDatesAndProgramIds
public int getLeaderboardRankByDatesAndProgramIds(IdentityType identityType, String earnerIdentityId, Date fromDate, Date toDate, Long... programIds) -
getLeaderboardRank
-
getLeaderboardRankByProgramIds
public int getLeaderboardRankByProgramIds(IdentityType identityType, String earnerIdentityId, Long... programIds) -
getLeaderboardByDates
public List<StandardLeaderboard> getLeaderboardByDates(Date fromDate, Date toDate, IdentityType identityType, int offset, int limit) -
getLeaderboard
-
getLeaderboardByDatesByProgramIds
public List<StandardLeaderboard> getLeaderboardByDatesByProgramIds(Date fromDate, Date toDate, IdentityType identityType, int offset, int limit, Long... programIds) -
getLeaderboardByProgramIds
public List<StandardLeaderboard> getLeaderboardByProgramIds(IdentityType identityType, int offset, int limit, Long... programIds) -
getScorePerProgramByIdentityId
-
getLeaderboardStatsByIdentityIdAndDates
-
getLeaderboardStatsByIdentityId
public List<PiechartLeaderboard> getLeaderboardStatsByIdentityId(String earnerIdentityId, Long spaceId) -
getScoreByIdentityIdAndBetweenDates
-
getScoreByIdentityId
-
getScoresByIdentityIdsAndBetweenDates
-
findLastRealizationByRuleIdAndEarnerIdAndReceiverAndObjectId
public RealizationDTO findLastRealizationByRuleIdAndEarnerIdAndReceiverAndObjectId(long ruleId, String earnerId, String receiverId, String objectId, String objectType) -
countRealizationsByRuleIdAndEarnerId
-
countRealizationsInPeriod
-
getParticipantsBetweenDates
-
countParticipantsBetweenDates
-