Package com.skava.loyalty.repository
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 TypeMethodDescriptionvoid
deleteByIdRuleSetIdAndIdCollectionId
(String ruleSetId, long collectionId) Delete the RulefindByIdAndArchive
(RuleId id, Archive archive) Retrieves rule based on reward id and archivefindByIdCollectionIdAndActionsRewardType
(long collectionId, String rewardType, org.springframework.data.domain.Pageable pageRequest) findByIdCollectionIdAndActionsRewardTypefindByIdCollectionIdAndEvent
(long collectionId, String name, org.springframework.data.domain.Pageable pageRequest) findByIdCollectionIdAndEventfindByIdCollectionIdAndIdRuleSetIdAndArchiveAndEndTimeGreaterThan
(long collectionId, String ruleSetId, Archive archive, LocalDateTime currentTime) 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 statusdefault 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
Retrieves rule based on reward id and archive- Parameters:
id
- Request the object of idarchive
- 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 idcollectionId
- Request the collection idarchive
- Request the object of archivestatus
- 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
- collectionIdname
- namepageRequest
- pageRequest- Returns:
- list of
Rule
-
findByIdCollectionIdAndActionsRewardType
List<Rule> findByIdCollectionIdAndActionsRewardType(long collectionId, String rewardType, org.springframework.data.domain.Pageable pageRequest) findByIdCollectionIdAndActionsRewardType- Parameters:
collectionId
- collectionIdrewardType
- rewardTypepageRequest
- pageRequest- Returns:
- list of
Rule
-
deleteByIdRuleSetIdAndIdCollectionId
Delete the Rule- Parameters:
ruleSetId
- Request the rule idcollectionId
- Request the collection id
-
findByIdRuleSetIdAndIdCollectionIdAndArchive
-
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)
-