Interface RuleRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<Rule,RuleId>, org.springframework.data.repository.ListCrudRepository<Rule,RuleId>, org.springframework.data.repository.ListPagingAndSortingRepository<Rule,RuleId>, org.springframework.data.mongodb.repository.MongoRepository<Rule,RuleId>, org.springframework.data.repository.PagingAndSortingRepository<Rule,RuleId>, org.springframework.data.repository.query.QueryByExampleExecutor<Rule>, org.springframework.data.querydsl.QuerydslPredicateExecutor<Rule>, org.springframework.data.repository.Repository<Rule,RuleId>

public interface RuleRepository extends org.springframework.data.mongodb.repository.MongoRepository<Rule,RuleId>, org.springframework.data.querydsl.QuerydslPredicateExecutor<Rule>
This interface contains the functionality to perform operations on a rule
Since:
8.5.0
Version:
8.5.0
Author:
Infosys Equinox
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    deleteByIdRuleSetIdAndIdCollectionId(String ruleSetId, long collectionId)
    Delete the Rule
    Retrieves rule based on reward id and archive
    findByIdCollectionIdAndActionsRewardType(long collectionId, String rewardType, org.springframework.data.domain.Pageable pageRequest)
    findByIdCollectionIdAndActionsRewardType
    findByIdCollectionIdAndEvent(long collectionId, String name, org.springframework.data.domain.Pageable pageRequest)
    findByIdCollectionIdAndEvent
     
    findByIdRuleSetIdAndIdCollectionIdAndArchive(String ruleSetId, long collectionId, Archive archive)
     
    findByIdRuleSetIdAndIdCollectionIdAndArchiveAndStatus(String ruleSetId, long collectionId, Archive archive, com.skava.core.rules.admin.model.Status status)
    Retrieves rule based on reward id, collection id, archive and status
    default int
    save(List<org.springframework.data.util.Pair<org.springframework.data.mongodb.core.query.Query,org.springframework.data.mongodb.core.query.Update>> updates, org.springframework.data.mongodb.core.MongoTemplate mongo)
     

    Methods inherited from interface org.springframework.data.repository.CrudRepository

    count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save

    Methods inherited from interface org.springframework.data.repository.ListCrudRepository

    findAll, findAllById, saveAll

    Methods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository

    findAll

    Methods inherited from interface org.springframework.data.mongodb.repository.MongoRepository

    findAll, findAll, insert, insert

    Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository

    findAll

    Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor

    count, exists, findAll, findBy, findOne

    Methods inherited from interface org.springframework.data.querydsl.QuerydslPredicateExecutor

    count, exists, findAll, findAll, findAll, findAll, findAll, findBy, findOne
  • Method Details

    • findByIdAndArchive

      Optional<Rule> findByIdAndArchive(RuleId id, Archive archive)
      Retrieves rule based on reward id and archive
      Parameters:
      id - Request the object of id
      archive - Request the object of archive
      Returns:
      It returns the instance of Rule
    • findByIdRuleSetIdAndIdCollectionIdAndArchiveAndStatus

      List<Rule> findByIdRuleSetIdAndIdCollectionIdAndArchiveAndStatus(String ruleSetId, long collectionId, Archive archive, com.skava.core.rules.admin.model.Status status)
      Retrieves rule based on reward id, collection id, archive and status
      Parameters:
      ruleSetId - Request the rule id
      collectionId - Request the collection id
      archive - Request the object of archive
      status - Request the status
      Returns:
      It returns the instance of Rule
    • findByIdCollectionIdAndEvent

      List<Rule> findByIdCollectionIdAndEvent(long collectionId, String name, org.springframework.data.domain.Pageable pageRequest)
      findByIdCollectionIdAndEvent
      Parameters:
      collectionId - collectionId
      name - name
      pageRequest - pageRequest
      Returns:
      list of Rule
    • findByIdCollectionIdAndActionsRewardType

      List<Rule> findByIdCollectionIdAndActionsRewardType(long collectionId, String rewardType, org.springframework.data.domain.Pageable pageRequest)
      findByIdCollectionIdAndActionsRewardType
      Parameters:
      collectionId - collectionId
      rewardType - rewardType
      pageRequest - pageRequest
      Returns:
      list of Rule
    • deleteByIdRuleSetIdAndIdCollectionId

      void deleteByIdRuleSetIdAndIdCollectionId(String ruleSetId, long collectionId)
      Delete the Rule
      Parameters:
      ruleSetId - Request the rule id
      collectionId - Request the collection id
    • findByIdRuleSetIdAndIdCollectionIdAndArchive

      List<Rule> findByIdRuleSetIdAndIdCollectionIdAndArchive(String ruleSetId, long collectionId, Archive archive)
    • save

      default int save(List<org.springframework.data.util.Pair<org.springframework.data.mongodb.core.query.Query,org.springframework.data.mongodb.core.query.Update>> updates, org.springframework.data.mongodb.core.MongoTemplate mongo)
    • findByIdCollectionIdAndIdRuleSetIdAndArchiveAndEndTimeGreaterThan

      List<Rule> findByIdCollectionIdAndIdRuleSetIdAndArchiveAndEndTimeGreaterThan(long collectionId, String ruleSetId, Archive archive, LocalDateTime currentTime)