Interface RecommendationBufferService
- All Known Implementing Classes:
DefaultRecommendationBufferService
public interface RecommendationBufferService
Collection of database usage for recommendation.
-
Method Summary
Modifier and TypeMethodDescriptiongetAggregatedImpressions(int batchSize) Read aListofSAPRecoImpressionAggrModel.getClickthroughs(int batchSize) ReadListofSAPRecoClickthroughModel.getGenericRecommendation(String scenarioId, String leadingItems) Get recommendations with scope GgetHashIdsForUser(String userId, String scenarioId) Get all hash ids for usergetImpressions(int batchSize) ReadListofSAPRecoImpressionModel.getOfferInteractions(int batchSize) ReadListofSAPOfferInteractionModel.getPersonalizedRecommendation(String userId, String scenarioId, String leadingItems) Get a recommendation.getRestrictedRecommendation(String scenarioId, String leadingItems) Get recommendations with scope RbooleanisRecommendationExpired(SAPRecommendationBufferModel recommendation) Check if a recommendation is expired.voidRemove expired mappings based on the expiry offset.voidRemove expired recommendations based on the expiry offset.voidRemove expired mappings based on the expiry offset.voidsaveRecommendation(String userId, String scenarioId, String hashId, String leadingItems, String recoList, String recoType, Date expiresOn) Add a new recommendation entry.
-
Method Details
-
getAggregatedImpressions
Read aListofSAPRecoImpressionAggrModel.- Parameters:
batchSize- Batch size.- Returns:
ListofSAPRecoImpressionAggrModel.
-
getClickthroughs
ReadListofSAPRecoClickthroughModel.- Parameters:
batchSize- Batch size.- Returns:
ListofSAPRecoClickthroughModel
-
getGenericRecommendation
Get recommendations with scope G- Parameters:
scenarioId- Scenario ID.leadingItems- Leading items.- Returns:
SAPRecommendationBufferModel.
-
getRestrictedRecommendation
Get recommendations with scope R- Parameters:
scenarioId- Scenario ID.leadingItems- Leading items.- Returns:
SAPRecommendationBufferModel.
-
getImpressions
ReadListofSAPRecoImpressionModel.- Parameters:
batchSize- Batch size.- Returns:
ListofSAPRecoImpressionModel
-
getOfferInteractions
ReadListofSAPOfferInteractionModel.- Parameters:
batchSize- Batch size.- Returns:
ListofSAPOfferInteractionModel.
-
getPersonalizedRecommendation
SAPRecommendationBufferModel getPersonalizedRecommendation(String userId, String scenarioId, String leadingItems) Get a recommendation.- Parameters:
userId- User ID.scenarioId- Scenario ID.leadingItems- Leading items.- Returns:
SAPRecommendationBufferModel.
-
isRecommendationExpired
Check if a recommendation is expired.- Parameters:
recommendation-SAPRecommendationBufferModel.- Returns:
- true if expired, false otherwise.
-
removeExpiredMappings
void removeExpiredMappings()Remove expired mappings based on the expiry offset. -
removeExpiredRecommendations
void removeExpiredRecommendations()Remove expired recommendations based on the expiry offset. -
removeExpiredTypeMappings
void removeExpiredTypeMappings()Remove expired mappings based on the expiry offset. -
saveRecommendation
void saveRecommendation(String userId, String scenarioId, String hashId, String leadingItems, String recoList, String recoType, Date expiresOn) Add a new recommendation entry.- Parameters:
userId- User ID.scenarioId- Scenario ID.hashId- Hash ID.leadingItems- Leading items.recoList- Recommendation List.recoType- Recommendation Type.expiresOn- Expire date.
-
getHashIdsForUser
Get all hash ids for user- Parameters:
userId- User IDscenarioId- Scenario ID- Returns:
- Comma separated list string of hash ids
-