Package org.hoteia.qalingo.core.web.mvc.viewbean

Examples of org.hoteia.qalingo.core.web.mvc.viewbean.StoreBusinessHourViewBean


    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);
          model.addAttribute(ModelConstants.STORE_VIEW_BEAN, storeViewBean);
         
          model.addAttribute("otherStores", otherStoreViewBeans);
          model.addAttribute("businessHours", storeBusinessHourViewBean);
View Full Code Here


    /**
     *
     */
    public StoreBusinessHourViewBean buildViewBeanStoreBusinessHour(final Store store) {
        List<StoreBusinessHour> storeBusinessHours = store.getStoreBusinessHours();
        StoreBusinessHourViewBean storeBusinessHourViewBean = null;
        if (storeBusinessHours != null && storeBusinessHours.size() > 0) {
            storeBusinessHourViewBean = new StoreBusinessHourViewBean();
            for (StoreBusinessHour storeBusinessHour : storeBusinessHours) {
                OperationHourViewBean operationHourViewBean = new OperationHourViewBean();
                operationHourViewBean.setEndHour(storeBusinessHour.getEndHour());
                operationHourViewBean.setStartHour(storeBusinessHour.getStartHour());
                if (storeBusinessHour.isMonday()) {
                    storeBusinessHourViewBean.setMonday(operationHourViewBean);
                }
                if (storeBusinessHour.isTuesday()) {
                    storeBusinessHourViewBean.setTuesday(operationHourViewBean);
                }
                if (storeBusinessHour.isWednesday()) {
                    storeBusinessHourViewBean.setWednesday(operationHourViewBean);
                }
                if (storeBusinessHour.isThursday()) {
                    storeBusinessHourViewBean.setThursday(operationHourViewBean);
                }
                if (storeBusinessHour.isFriday()) {
                    storeBusinessHourViewBean.setFriday(operationHourViewBean);
                }
                if (storeBusinessHour.isSaturday()) {
                    storeBusinessHourViewBean.setSaturday(operationHourViewBean);
                }
                if (storeBusinessHour.isSunday()) {
                    storeBusinessHourViewBean.setSunday(operationHourViewBean);
                }
            }
        }
        return storeBusinessHourViewBean;
    }
View Full Code Here

TOP

Related Classes of org.hoteia.qalingo.core.web.mvc.viewbean.StoreBusinessHourViewBean

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.