Search in sources :

Example 1 with PersistableCustomerReviewPopulator

use of com.salesmanager.shop.populator.customer.PersistableCustomerReviewPopulator in project shopizer by shopizer-ecommerce.

the class CustomerFacadeImpl method convertPersistableCustomerReviewToCustomerReview.

private CustomerReview convertPersistableCustomerReviewToCustomerReview(PersistableCustomerReview review, MerchantStore store, Language language) {
    PersistableCustomerReviewPopulator populator = new PersistableCustomerReviewPopulator();
    populator.setCustomerService(customerService);
    populator.setLanguageService(languageService);
    try {
        return populator.populate(review, new CustomerReview(), store, language);
    } catch (ConversionException e) {
        throw new ConversionRuntimeException(e);
    }
}
Also used : ConversionException(com.salesmanager.core.business.exception.ConversionException) PersistableCustomerReviewPopulator(com.salesmanager.shop.populator.customer.PersistableCustomerReviewPopulator) ReadableCustomerReview(com.salesmanager.shop.model.customer.ReadableCustomerReview) CustomerReview(com.salesmanager.core.model.customer.review.CustomerReview) PersistableCustomerReview(com.salesmanager.shop.model.customer.PersistableCustomerReview) ConversionRuntimeException(com.salesmanager.shop.store.api.exception.ConversionRuntimeException)

Aggregations

ConversionException (com.salesmanager.core.business.exception.ConversionException)1 CustomerReview (com.salesmanager.core.model.customer.review.CustomerReview)1 PersistableCustomerReview (com.salesmanager.shop.model.customer.PersistableCustomerReview)1 ReadableCustomerReview (com.salesmanager.shop.model.customer.ReadableCustomerReview)1 PersistableCustomerReviewPopulator (com.salesmanager.shop.populator.customer.PersistableCustomerReviewPopulator)1 ConversionRuntimeException (com.salesmanager.shop.store.api.exception.ConversionRuntimeException)1