Package org.hoteia.qalingo.core.domain

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


        String fullPrefixUrl = getSeoPrefixUrl(requestData) + "/";
        return fullPrefixUrl;
    }

    protected String getSeoPrefixUrl(final RequestData requestData) throws Exception {
        final MarketPlace marketPlace = requestData.getMarketPlace();
        final Market market = requestData.getMarket();
        final MarketArea marketArea = requestData.getMarketArea();
        final Localization localization = requestData.getMarketAreaLocalization();
        final Retailer retailer = requestData.getMarketAreaRetailer();
        final Locale locale = localization.getLocale();
View Full Code Here


       
        FetchPlan fetchPlan = handleSpecificFetchModeMarketPlace(criteria, params);
       
        criteria.add(Restrictions.eq("isDefault", true));
       
        MarketPlace marketPlace = (MarketPlace) criteria.uniqueResult();
        if(marketPlace != null){
            marketPlace.setFetchPlan(fetchPlan);
        }
        return marketPlace;
    }
View Full Code Here

       
        FetchPlan fetchPlan = handleSpecificFetchModeMarketPlace(criteria, params);

        criteria.add(Restrictions.eq("id", marketPlaceId));
       
        MarketPlace marketPlace = (MarketPlace) criteria.uniqueResult();
        if(marketPlace != null){
            marketPlace.setFetchPlan(fetchPlan);
        }
        return marketPlace;
    }
View Full Code Here

       
        FetchPlan fetchPlan = handleSpecificFetchModeMarketPlace(criteria, params);

        criteria.add(Restrictions.eq("code", handleCodeValue(code)));
       
        MarketPlace marketPlace = (MarketPlace) criteria.uniqueResult();
        if(marketPlace != null){
            marketPlace.setFetchPlan(fetchPlan);
        }
        return marketPlace;
    }
View Full Code Here

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

    @Autowired
    protected Mapper dozerBeanMapper;
   
    public MarketPlacePojo getMarketPlaceByCode(final String marketPlaceCode) {
        final MarketPlace marketPlace = marketService.getMarketPlaceByCode(marketPlaceCode);
        logger.debug("Found {} marketPlace:", marketPlace.getName());
        return dozerBeanMapper.map(marketPlace, MarketPlacePojo.class);
    }
View Full Code Here

     *
     */
    public CommonViewBean buildViewBeanCommon(final RequestData requestData) throws Exception {
        final CommonViewBean commonViewBean = new CommonViewBean();

        final MarketPlace marketPlace = requestData.getMarketPlace();
        final Market market = requestData.getMarket();
        final MarketArea marketArea = requestData.getMarketArea();
        final Localization localization = requestData.getMarketAreaLocalization();
        final Retailer retailer = requestData.getMarketAreaRetailer();
        final CurrencyReferential currency = requestData.getMarketAreaCurrency();
View Full Code Here

     */
    public List<MarketPlaceViewBean> buildListViewBeanMarketPlace(final RequestData requestData) throws Exception {
        List<MarketPlaceViewBean> marketPlaceViewBeans = new ArrayList<MarketPlaceViewBean>();
        final List<MarketPlace> marketPlaceList = marketService.findMarketPlaces();
        for (Iterator<MarketPlace> iteratorMarketPlace = marketPlaceList.iterator(); iteratorMarketPlace.hasNext();) {
            final MarketPlace marketPlaceNavigation = (MarketPlace) iteratorMarketPlace.next();
           
            // TODO : why : SET A RELOAD OBJECT MARKET -> event
            // LazyInitializationException: could not initialize proxy - no Session
            final Market reloadedMarket = marketService.getMarketById(marketPlaceNavigation.getDefaultMarket().getId().toString());
            final MarketArea defaultMarketArea = marketService.getMarketAreaByCode(reloadedMarket.getDefaultMarketArea().getCode());
            final Localization defaultLocalization = defaultMarketArea.getDefaultLocalization();
            final Retailer defaultRetailer = defaultMarketArea.getDefaultRetailer();
           
            RequestData requestDataForThisMarketPlace = new RequestData();
View Full Code Here

                final MarketArea marketArea = (MarketArea) iteratorMarketArea.next();
               
                // RELOAD THE MARKET TO KEEP AN ENTITY WITH RIGHT FETCHS
                final Market reloadedMarket = marketService.getMarketByCode(marketArea.getMarket().getCode());
                // RELOAD THE MARKETPLACE TO KEEP AN ENTITY WITH RIGHT FETCHS
                final MarketPlace reloadedMarketPlace = marketService.getMarketPlaceByCode(reloadedMarket.getMarketPlace().getCode());
               
                final MarketArea reloadedMarketArea = marketService.getMarketAreaByCode(marketArea.getCode());
                final Localization defaultLocalization = reloadedMarketArea.getDefaultLocalization();
                final Retailer defaultRetailer = reloadedMarketArea.getDefaultRetailer();
                final CurrencyReferential defaultCurrency = reloadedMarketArea.getDefaultCurrency();
View Full Code Here

       
        try {
            final RequestData requestData = requestUtil.getRequestData(request);
            modelAndView.getModelMap().put(ModelConstants.COMMON_VIEW_BEAN, backofficeViewBeanFactory.buildViewBeanCommon(requestData));
           
            final MarketPlace currentMarketPlace = requestData.getMarketPlace();
            final Market currentMarket = requestData.getMarket();
            final MarketArea currentMarketArea = requestData.getMarketArea();
            final Localization currentLocalization = requestData.getMarketAreaLocalization();
            final User user = requestData.getUser();
            final Company company = requestData.getCompany();
           
            if(user != null){
                modelAndView.getModelMap().put(ModelConstants.AUTHENTICATED_USER_VIEW_BEAN, backofficeViewBeanFactory.buildViewBeanUser(requestData, user));
            }
           
            modelAndView.getModelMap().put(ModelConstants.LEGAl_TERMS_VIEW_BEAN, backofficeViewBeanFactory.buildViewBeanLegalTerms(requestData));
           
            modelAndView.getModelMap().put(ModelConstants.HEADER_CART, backofficeViewBeanFactory.buildViewBeanHeaderCart(requestData));
           
            // ALL MARKETPLACES
            modelAndView.getModelMap().put(ModelConstants.MARKET_PLACES_VIEW_BEAN, backofficeViewBeanFactory.buildListViewBeanMarketPlace(requestData));

            // MARKETS FOR THE CURRENT MARKETPLACE
            Set<Market> marketList = currentMarketPlace.getMarkets();
            modelAndView.getModelMap().put(ModelConstants.MARKETS_VIEW_BEAN, backofficeViewBeanFactory.buildListViewBeanMarket(requestData, currentMarketPlace, new ArrayList<Market>(marketList)));

            // MARKET AREAS FOR THE CURRENT MARKET
            Set<MarketArea> marketAreaList = currentMarket.getMarketAreas();
            modelAndView.getModelMap().put(ModelConstants.MARKET_AREAS_VIEW_BEAN, backofficeViewBeanFactory.buildListViewBeanMarketArea(requestData, currentMarket, new ArrayList<MarketArea>(marketAreaList)));
View Full Code Here

TOP

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

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.