Interface UserRecommendationService<P extends UserRecommendation>
- All Superinterfaces:
com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P>
,com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<P>
- All Known Implementing Classes:
DefaultUserRecommendationService
public interface UserRecommendationService<P extends UserRecommendation>
extends com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<P>
-
Method Summary
Modifier and TypeMethodDescriptionhydrate
(UserRecommendation userRecommendation, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Hydrates the Catalog Item relationship onto theUserRecommendationItem
.readByCustomerId
(String customerId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Read User Recommendation by the Broadleaf Customer Context IDJpaCustomerReference.getContextId()
readByCustomerUsername
(String customerUsername, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Read User Recommendation by the Broadleaf Customer UsernameJpaCustomerReference.getUsername()
readByUserId
(String userId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Read User Recommendation by the Numerical Customer Reference ID which is used by the ALS Recommendation Training ModelJpaCustomerReference.getNumericId()
Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.CrudEntityService
create, createAll, createAllAllowingPartialSuccess, delete, readAll, readAll, readAll, readAllByContextId, readByContextId, replace, replaceAll, replaceAllAllowingPartialSuccess, update, updateAll, updateAllAllowingPartialSuccess, updateSort
Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService
readAll, readAll, readAll, readAll
-
Method Details
-
readByUserId
Optional<P> readByUserId(@NonNull String userId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Read User Recommendation by the Numerical Customer Reference ID which is used by the ALS Recommendation Training ModelJpaCustomerReference.getNumericId()
- Parameters:
userId
- - the numerical customer reference identifiercontextInfo
-- Returns:
-
readByCustomerId
Optional<P> readByCustomerId(@NonNull String customerId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Read User Recommendation by the Broadleaf Customer Context IDJpaCustomerReference.getContextId()
- Parameters:
customerId
- - Broadleaf's customer identifiercontextInfo
-- Returns:
-
readByCustomerUsername
Optional<P> readByCustomerUsername(@NonNull String customerUsername, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Read User Recommendation by the Broadleaf Customer UsernameJpaCustomerReference.getUsername()
- Parameters:
customerUsername
- - Broadleaf's customer usernamecontextInfo
-- Returns:
-
hydrate
UserRecommendation hydrate(UserRecommendation userRecommendation, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Hydrates the Catalog Item relationship onto theUserRecommendationItem
. that are in the {@link {@link UserRecommendation#getItems()}- Parameters:
userRecommendation
- The recommendation to hydratecontextInfo
-- Returns:
- The hydrated
userRecommendation
.
-