java.lang.Object
org.exoplatform.commons.persistence.impl.GenericDAOJPAImpl<RuleEntity,Long>
org.exoplatform.addons.gamification.storage.dao.RuleDAO
All Implemented Interfaces:
org.exoplatform.commons.api.persistence.GenericDAO<RuleEntity,Long>

public class RuleDAO extends org.exoplatform.commons.persistence.impl.GenericDAOJPAImpl<RuleEntity,Long> implements org.exoplatform.commons.api.persistence.GenericDAO<RuleEntity,Long>
  • Constructor Details

    • RuleDAO

      public RuleDAO()
  • Method Details

    • findEnableRuleByTitle

      public RuleEntity findEnableRuleByTitle(String ruleTitle) throws javax.persistence.PersistenceException
      Throws:
      javax.persistence.PersistenceException
    • findHighestBudgetDomainIds

      public List<Long> findHighestBudgetDomainIds(int offset, int limit)
    • findHighestBudgetDomainIdsBySpacesIds

      public List<Long> findHighestBudgetDomainIdsBySpacesIds(List<Long> spacesIds, int offset, int limit)
    • findEnabledRulesByEvent

      public List<RuleEntity> findEnabledRulesByEvent(String event) throws javax.persistence.PersistenceException
      Throws:
      javax.persistence.PersistenceException
    • findRuleByTitle

      public RuleEntity findRuleByTitle(String ruleTitle) throws javax.persistence.PersistenceException
      Throws:
      javax.persistence.PersistenceException
    • findRuleByEventAndDomain

      public RuleEntity findRuleByEventAndDomain(String event, long domainId) throws javax.persistence.PersistenceException
      Throws:
      javax.persistence.PersistenceException
    • getAllRules

      public List<RuleEntity> getAllRules() throws javax.persistence.PersistenceException
      Throws:
      javax.persistence.PersistenceException
    • getActiveRules

      public List<RuleEntity> getActiveRules()
    • getAllRulesByDomain

      public List<RuleEntity> getAllRulesByDomain(long domainId) throws javax.persistence.PersistenceException
      Throws:
      javax.persistence.PersistenceException
    • getAllRulesWithNullDomain

      public List<RuleEntity> getAllRulesWithNullDomain() throws javax.persistence.PersistenceException
      Throws:
      javax.persistence.PersistenceException
    • getRulesTotalScoreByDomain

      public long getRulesTotalScoreByDomain(long domainId) throws javax.persistence.PersistenceException
      Throws:
      javax.persistence.PersistenceException
    • getAllEvents

      public List<String> getAllEvents() throws javax.persistence.PersistenceException
      Throws:
      javax.persistence.PersistenceException
    • getRuleEventsByType

      public List<String> getRuleEventsByType(EntityType ruleType)
    • getRuleIdsByType

      public List<Long> getRuleIdsByType(EntityType ruleType)
    • findRulesIdsByFilter

      public List<Long> findRulesIdsByFilter(RuleFilter filter, int offset, int limit)
    • countRulesByFilter

      public int countRulesByFilter(RuleFilter filter)