Package org.hoteia.qalingo.core.domain

Examples of org.hoteia.qalingo.core.domain.CustomerProductComment


  private final Logger logger = LoggerFactory.getLogger(getClass());

  public CustomerProductComment getCustomerProductCommentById(final Long customerProductCommentId, Object... params) {
        Criteria criteria = createDefaultCriteria(CustomerProductComment.class);
        criteria.add(Restrictions.eq("id", customerProductCommentId));
        CustomerProductComment customerProductComments = (CustomerProductComment) criteria.uniqueResult();
        return customerProductComments;
  }
View Full Code Here


    customerProductComment.setDateUpdate(new Date());
        if (customerProductComment.getId() != null) {
            if(em.contains(customerProductComment)){
                em.refresh(customerProductComment);
            }
            CustomerProductComment mergedCustomerProductComment = em.merge(customerProductComment);
            em.flush();
            return mergedCustomerProductComment;
        } else {
            em.persist(customerProductComment);
            return customerProductComment;
View Full Code Here

        final CustomerMarketArea customerMarketArea = customer.getCurrentCustomerMarketArea(marketArea.getId());
        if (customerMarketArea != null) {
            final Set<CustomerProductComment> customerProductComments = customerMarketArea.getProductComments();
            if (Hibernate.isInitialized(customerProductComments) && customerProductComments != null) {
                for (Iterator<CustomerProductComment> iterator = customerProductComments.iterator(); iterator.hasNext();) {
                    final CustomerProductComment customerProductComment = (CustomerProductComment) iterator.next();
                    final ProductSku reloadedProductSku = productService.getProductSkuByCode(customerProductComment.getProductSkuCode());
                    final ProductMarketing productMarketing = reloadedProductSku.getProductMarketing();
                    final CatalogCategoryVirtual catalogCategory = catalogCategoryService.getDefaultVirtualCatalogCategoryByProductSkuId(reloadedProductSku.getId());
                    customerProductCommentsViewBean.getCustomerProductCommentViewBeans().add(
                            buildViewBeanCustomerProductComment(requestData, catalogCategory, productMarketing, reloadedProductSku, customerProductComment));
                }
View Full Code Here

TOP

Related Classes of org.hoteia.qalingo.core.domain.CustomerProductComment

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.