Package org.hoteia.qalingo.core.domain

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


        Set<Store> stores = retailer.getStores();
        if (Hibernate.isInitialized(stores) &&
                stores != null) {
            for (Iterator<Store> iterator = stores.iterator(); iterator.hasNext();) {
                Store store = (Store) iterator.next();
                StoreViewBean storeViewBean = buildViewBeanStore(requestData, store);
                retailerViewBean.getStores().add(storeViewBean);
            }
        }
View Full Code Here


     *
     */
    public List<StoreViewBean> buildListViewBeanStore(final RequestData requestData, final List<Store> stores) throws Exception {
        List<StoreViewBean> storeViewBeans = new ArrayList<StoreViewBean>();
        for (Iterator<Store> iterator = stores.iterator(); iterator.hasNext();) {
            final Store store = (Store) iterator.next();
            storeViewBeans.add(buildViewBeanStore(requestData, store));
        }
        return storeViewBeans;
    }
View Full Code Here

        List<Retailer> retailers = retailerService.findAllRetailers();;
       
        for (Retailer retailer : retailers) {
            List<Store> stores = retailerService.findStoresByRetailerId(retailer.getId());
            for (Iterator<Store> iterator = stores.iterator(); iterator.hasNext();) {
                Store store = (Store) iterator.next();
                storeSolrService.addOrUpdateStore(store, marketArea);
            }
        }

        return new ModelAndView(new RedirectView(urlService.generateUrl(FoUrls.STORE_SEARCH, requestUtil.getRequestData(request))));
View Full Code Here

     *
     */
    public SearchStoreItemViewBean buildViewBeanSearchStoreItem(final RequestData requestData, final StoreSolr storeSolr) throws Exception {

        final String storeCode = storeSolr.getCode();
        final Store store = retailerService.getStoreByCode(storeCode);
       
        final SearchStoreItemViewBean searchItemViewBean = new SearchStoreItemViewBean();
        searchItemViewBean.setName(storeSolr.getName());
        searchItemViewBean.setCode(storeCode);

        searchItemViewBean.setDetailsUrl(urlService.generateUrl(FoUrls.STORE_DETAILS, requestData, store));

        final Asset defaultBackgroundImage = store.getDefaultBackgroundImage();
        if (defaultBackgroundImage != null) {
            final String backgroundImage = engineSettingService.getRetailerOrStoreImageWebPath(defaultBackgroundImage);
            searchItemViewBean.setBackgroundImage(backgroundImage);
        } else {
            searchItemViewBean.setBackgroundImage("");
        }
       
        final Asset defaultIconImage = store.getDefaultThumbnailImage();
        if (defaultIconImage != null) {
            final String iconImage = engineSettingService.getRetailerOrStoreImageWebPath(defaultIconImage);
            searchItemViewBean.setIconImage(iconImage);
        } else {
            searchItemViewBean.setIconImage("");
        }
       
        final Asset carouselImage = store.getDefaultPackshotImage(ImageSize.SMALL.name());
        if (carouselImage != null) {
            final String iconImage = engineSettingService.getRetailerOrStoreImageWebPath(carouselImage);
            searchItemViewBean.setCarouselImage(iconImage);
        } else {
            searchItemViewBean.setIconImage("");
View Full Code Here

        return engineSettingService.saveOrUpdateEngineSettingValue(engineSettingValue);
    }
   
    public Store createOrUpdateStore(Retailer retailer, Store store, StoreForm storeForm) throws Exception {
      if (store == null) {
        store = new Store();
      }
        if (StringUtils.isNotEmpty(storeForm.getCode())) {
            store.setCode(storeForm.getCode());
        }
        if (StringUtils.isNotEmpty(storeForm.getName())) {
View Full Code Here

        criteria.add(Restrictions.eq("id", storeId));

        criteria.addOrder(Order.asc("code"));
       
        Store store = (Store) criteria.uniqueResult();
        if(store != null){
            store.setFetchPlan(fetchPlan);
        }
        return store;
  }
View Full Code Here

        criteria.add(Restrictions.eq("code", handleCodeValue(storeCode)));

        criteria.addOrder(Order.asc("code"));
       
        Store store = (Store) criteria.uniqueResult();
        if(store != null){
            store.setFetchPlan(fetchPlan);
        }
    return store;
  }
View Full Code Here

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

    ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), FoUrls.STORE_DETAILS.getVelocityPage());
        final RequestData requestData = requestUtil.getRequestData(request);
        final Locale locale = requestData.getLocale();
       
    if(StringUtils.isNotEmpty(storeCode)){
          Store store = retailerService.getStoreByCode(storeCode);
          final List<Store> stores = retailerService.findStores();
          final List<StoreViewBean> otherStoreViewBeans = frontofficeViewBeanFactory.buildListViewBeanStore(requestUtil.getRequestData(request), stores);
          StoreViewBean storeViewBean = frontofficeViewBeanFactory.buildViewBeanStore(requestUtil.getRequestData(request), store);
          StoreBusinessHourViewBean storeBusinessHourViewBean = frontofficeViewBeanFactory.buildViewBeanStoreBusinessHour(store);
          otherStoreViewBeans.remove(storeViewBean);
View Full Code Here

                    } else if (param instanceof Retailer){
                      Retailer retailer = (Retailer) param;
                      getParams.put(RequestConstants.REQUEST_PARAMETER_RETAILER_CODE, handleParamValue(retailer.getCode()));
                      break;
                    } else if (param instanceof Store){
                        Store store = (Store) param;
                        getParams.put(RequestConstants.REQUEST_PARAMETER_STORE_CODE, handleParamValue(store.getCode()));
                        break;
                    } else if (param instanceof Map) {
                        getParams = (Map<String, String>) param;
                        break;
                    } else {
View Full Code Here

TOP

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

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.