public class ResultCachingBTGDaoDecorator extends Object implements BTGDao
| Modifier and Type | Class and Description |
|---|---|
protected static interface |
ResultCachingBTGDaoDecorator.BtgResultObjectProvider<RET extends BTGAbstractResultModel,T extends BTGItemModel>
Helper interface used to encapsulate a call to one of the overloaded BTGDao.getLastResult(...) methods.
|
| Constructor and Description |
|---|
ResultCachingBTGDaoDecorator() |
| Modifier and Type | Method and Description |
|---|---|
BTGConditionResultModel |
createConditionResult(UserModel user,
BTGExpressionModel condition,
BTGResultScope scope,
boolean result,
String jaloSessionId,
boolean forced)
Creates new condition evaluation result
|
BTGRuleResultModel |
createRuleResult(UserModel user,
BTGRuleModel rule,
BTGResultScope scope,
boolean result,
String jaloSessionId,
boolean forced)
Creates new rule evaluation result
|
BTGSegmentResultModel |
createSegmentResult(UserModel user,
BTGSegmentModel segment,
BTGResultScope scope,
boolean result,
String jaloSessionId,
boolean forced)
Creates new segment evaluation result
|
BTGDao |
getBtgDao() |
BTGConditionResultModel |
getLastResult(UserModel user,
BTGConditionModel condition,
BTGResultScope resultScope,
String jaloSessionId)
Return last result entry for condition and user
|
BTGRuleResultModel |
getLastResult(UserModel user,
BTGRuleModel rule,
BTGResultScope resultScope,
String jaloSessionId)
Return last result entry for rule and user
|
BTGSegmentResultModel |
getLastResult(UserModel user,
BTGSegmentModel segment,
BTGResultScope resultScope,
String jaloSessionId)
Return last result entry for segment and user
|
<RET extends BTGAbstractResultModel,T extends BTGItemModel> |
getLastResultInternal(BTGResultCacheKey key,
ResultCachingBTGDaoDecorator.BtgResultObjectProvider<RET,T> resultObjectProvider)
This method encapsulates an algorithm for doing lookup of BTG results using cache.
|
ModelService |
getModelService() |
protected Map<BTGResultCacheKey,PK> |
getResultMap(String jaloSessionId) |
Collection<BTGSegmentModel> |
getSegments(Collection<CMSSiteModel> websites,
BTGConditionEvaluationScope scope,
Collection<CatalogVersionModel> catalogVersions)
Return segments for specified arguments
|
SessionService |
getSessionService() |
boolean |
isConditionResultChanged(UserModel user,
BTGConditionModel condition,
BTGResultScope resultScope,
boolean newResult,
String jaloSessionId)
|
boolean |
isRuleResultChanged(UserModel user,
BTGRuleModel rule,
BTGResultScope resultScope,
boolean newResult,
String jaloSessionId)
|
boolean |
isSegmentResultChanged(UserModel user,
BTGSegmentModel segment,
BTGResultScope resultScope,
boolean newResult,
String jaloSessionId)
|
void |
moveSessionResults(UserModel src,
String sessionId,
UserModel dest,
BTGEvaluationContext destContext)
Moves the result data for segments, rules and conditions in the scope of the session with the given session ID to
a new user for the given context.
|
void |
setBtgDao(BTGDao btgDao) |
void |
setModelService(ModelService modelService) |
void |
setSessionService(SessionService sessionService) |
public ModelService getModelService()
public void setModelService(ModelService modelService)
public BTGDao getBtgDao()
public void setBtgDao(BTGDao btgDao)
public SessionService getSessionService()
public void setSessionService(SessionService sessionService)
sessionService - the sessionService to setpublic BTGSegmentResultModel getLastResult(UserModel user, BTGSegmentModel segment, BTGResultScope resultScope, String jaloSessionId)
BTGDaogetLastResult in interface BTGDaopublic BTGRuleResultModel getLastResult(UserModel user, BTGRuleModel rule, BTGResultScope resultScope, String jaloSessionId)
BTGDaogetLastResult in interface BTGDaopublic BTGConditionResultModel getLastResult(UserModel user, BTGConditionModel condition, BTGResultScope resultScope, String jaloSessionId)
BTGDaogetLastResult in interface BTGDaopublic boolean isSegmentResultChanged(UserModel user, BTGSegmentModel segment, BTGResultScope resultScope, boolean newResult, String jaloSessionId)
BTGDaoisSegmentResultChanged in interface BTGDaoresultScope - YTODOpublic boolean isRuleResultChanged(UserModel user, BTGRuleModel rule, BTGResultScope resultScope, boolean newResult, String jaloSessionId)
BTGDaoisRuleResultChanged in interface BTGDaoresultScope - YTODOpublic boolean isConditionResultChanged(UserModel user, BTGConditionModel condition, BTGResultScope resultScope, boolean newResult, String jaloSessionId)
BTGDaoisConditionResultChanged in interface BTGDaoresultScope - YTODOnewResult - new evaluation result (the most recent one)jaloSessionId - session identifierpublic Collection<BTGSegmentModel> getSegments(Collection<CMSSiteModel> websites, BTGConditionEvaluationScope scope, Collection<CatalogVersionModel> catalogVersions)
BTGDaogetSegments in interface BTGDaowebsites - CMSSiteModelscope - BTGConditionEvaluationScope - Online or OfflinecatalogVersions - Catalog versionspublic void moveSessionResults(UserModel src, String sessionId, UserModel dest, BTGEvaluationContext destContext)
BTGDaomoveSessionResults in interface BTGDaosrc - the source usersessionId - the ID of the session for which we want to move the results fordest - the destination userdestContext - the destination contextpublic BTGConditionResultModel createConditionResult(UserModel user, BTGExpressionModel condition, BTGResultScope scope, boolean result, String jaloSessionId, boolean forced)
BTGDaocreateConditionResult in interface BTGDaopublic BTGRuleResultModel createRuleResult(UserModel user, BTGRuleModel rule, BTGResultScope scope, boolean result, String jaloSessionId, boolean forced)
BTGDaocreateRuleResult in interface BTGDaopublic BTGSegmentResultModel createSegmentResult(UserModel user, BTGSegmentModel segment, BTGResultScope scope, boolean result, String jaloSessionId, boolean forced)
BTGDaocreateSegmentResult in interface BTGDaopublic <RET extends BTGAbstractResultModel,T extends BTGItemModel> RET getLastResultInternal(BTGResultCacheKey key, ResultCachingBTGDaoDecorator.BtgResultObjectProvider<RET,T> resultObjectProvider)
protected Map<BTGResultCacheKey,PK> getResultMap(String jaloSessionId)
Copyright © 2017 SAP SE. All Rights Reserved.