Package io.meeds.gamification.dao
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 Summary
FieldsFields inherited from class org.exoplatform.commons.persistence.impl.GenericDAOJPAImpl
modelClass -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongcountParticipantsBetweenDates(Date fromDate, Date toDate) intintcountRealizationsByRuleIdAndEarnerId(long earnerIdentityId, long ruleId) intcountRealizationsInPeriod(long earnerIdentityId, long ruleId, Date sinceDate) findLastRealizationByRuleIdAndEarnerIdAndReceiverAndObjectId(long ruleId, String earnerId, String receiverId, String objectId, String objectType) findRealizationsByFilter(RealizationFilter realizationFilter, int offset, int limit) Find realizations by filter with offset, limit.getLeaderboard(IdentityType earnerType, int offset, int limit) getLeaderboardByDates(Date fromDate, Date toDate, IdentityType earnerType, int offset, int limit) getLeaderboardByDatesAndProgramIds(Date fromDate, Date toDate, IdentityType earnerType, int offset, int limit, Long... programIds) getLeaderboardByProgramIds(IdentityType earnerType, int offset, int limit, Long... programIds) intgetLeaderboardRank(IdentityType earnerType, long earnerIdentityId) intgetLeaderboardRankByDates(IdentityType earnerType, long earnerIdentityId, Date fromDate, Date toDate) intgetLeaderboardRankByDatesAndProgramIds(IdentityType earnerType, long earnerIdentityId, Date fromDate, Date toDate, Long... programIds) intgetLeaderboardRankByProgramIds(IdentityType earnerType, long earnerIdentityId, Long... programIds) getLeaderboardStatsByIdentityId(String earnerId, Long spaceId) getLeaderboardStatsByIdentityIdAndDates(String earnerId, Long spaceId, Date fromDate, Date toDate) getParticipantsBetweenDates(Date fromDate, Date toDate) getRealizationsByObjectIdAndObjectType(String objectId, String objectType) longgetScoreByIdentityId(String earnerIdentityId) longgetScoreByIdentityIdAndBetweenDates(String earnerId, Date fromDate, Date toDate, Long... programIds) getScoreByIdentityIdsAndBetweenDates(List<String> earnersId, Date fromDate, Date toDate) getScorePerProgramByIdentityId(String earnerId) Compute for a given user the score earned for each domanMethods inherited from class org.exoplatform.commons.persistence.impl.GenericDAOJPAImpl
count, create, createAll, delete, deleteAll, deleteAll, find, findAll, getEntityManager, getHibernateDialect, isMSSQLDialect, isOrcaleDialect, update, updateAll
-
Field Details
-
STATUS_PARAM_NAME
- See Also:
-
STATUSES_PARAM_NAME
- See Also:
-
-
Constructor Details
-
RealizationDAO
public RealizationDAO()
-
-
Method Details
-
getLeaderboardRank
-
getLeaderboardRankByDatesAndProgramIds
public int getLeaderboardRankByDatesAndProgramIds(IdentityType earnerType, long earnerIdentityId, Date fromDate, Date toDate, Long... programIds) -
getLeaderboardRankByProgramIds
public int getLeaderboardRankByProgramIds(IdentityType earnerType, long earnerIdentityId, Long... programIds) -
getLeaderboardRankByDates
public int getLeaderboardRankByDates(IdentityType earnerType, long earnerIdentityId, Date fromDate, Date toDate) -
getLeaderboard
-
getLeaderboardByProgramIds
public List<StandardLeaderboard> getLeaderboardByProgramIds(IdentityType earnerType, int offset, int limit, Long... programIds) -
getLeaderboardByDates
public List<StandardLeaderboard> getLeaderboardByDates(Date fromDate, Date toDate, IdentityType earnerType, int offset, int limit) -
getLeaderboardByDatesAndProgramIds
public List<StandardLeaderboard> getLeaderboardByDatesAndProgramIds(Date fromDate, Date toDate, IdentityType earnerType, int offset, int limit, Long... programIds) -
getScoreByIdentityId
-
getLeaderboardStatsByIdentityIdAndDates
-
getLeaderboardStatsByIdentityId
-
getScorePerProgramByIdentityId
Compute for a given user the score earned for each doman- Parameters:
earnerId- ProfileReputation- Returns:
- a list of objects of type
-
getScoreByIdentityIdAndBetweenDates
-
getScoreByIdentityIdsAndBetweenDates
-
countRealizationsByRuleIdAndEarnerId
public int countRealizationsByRuleIdAndEarnerId(long earnerIdentityId, long ruleId) -
getParticipantsBetweenDates
-
countParticipantsBetweenDates
-
countRealizationsInPeriod
-
findLastRealizationByRuleIdAndEarnerIdAndReceiverAndObjectId
-
getRealizationsByObjectIdAndObjectType
-
findRealizationsByFilter
public List<Long> findRealizationsByFilter(RealizationFilter realizationFilter, int offset, int limit) Find realizations by filter with offset, limit.- Parameters:
realizationFilter- : data Transfert ObjectRealizationFilteroffset- : 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
-