Package org.hoteia.qalingo.core.pojo.market

Examples of org.hoteia.qalingo.core.pojo.market.MarketPojo


    @Path("market/set/{marketCode}")
    @Produces(MediaType.APPLICATION_JSON)
    public ContextPojo selectMarket(@PathParam("marketCode") final String marketCode) {
        ContextPojo context = new ContextPojo();

        MarketPojo selectedMarket = marketPojoService.getMarketByCode(marketCode);

        MarketPlacePojo selectedMarketPlace = marketPojoService.getMarketPlaceByCode(selectedMarket.getMarketPlace().getCode());

        // MARKET PLACE LIST
        buildMarketPlace(context, selectedMarketPlace);
       
        // MARKET LIST
View Full Code Here


    public ContextPojo selectMarketArea(@PathParam("marketAreaCode") final String marketAreaCode) {
        ContextPojo context = new ContextPojo();

        MarketAreaPojo selectedMarketArea = marketPojoService.getMarketAreaByCode(marketAreaCode);

        MarketPojo selectedMarket = marketPojoService.getMarketByCode(selectedMarketArea.getMarket().getCode());

        MarketPlacePojo selectedMarketPlace = marketPojoService.getMarketPlaceByCode(selectedMarket.getMarketPlace().getCode());

        // MARKET PLACE LIST
        buildMarketPlace(context, selectedMarketPlace);
       
        // MARKET LIST
View Full Code Here

        RetailerPojo selectedRetailer = retailerPojoService.getRetailerByCode(retailerCode);
       
        MarketAreaPojo selectedMarketArea = marketPojoService.getMarketAreaByCode(marketAreaCode);

        MarketPojo selectedMarket = marketPojoService.getMarketByCode(selectedMarketArea.getMarket().getCode());

        MarketPlacePojo selectedMarketPlace = marketPojoService.getMarketPlaceByCode(selectedMarket.getMarketPlace().getCode());

        // MARKET PLACE LIST
        buildMarketPlace(context, selectedMarketPlace);
       
        // MARKET LIST
View Full Code Here

        RetailerPojo selectedRetailer = retailerPojoService.getRetailerByCode(retailerCode);

        MarketAreaPojo selectedMarketArea = marketPojoService.getMarketAreaByCode(marketAreaCode);

        MarketPojo selectedMarket = marketPojoService.getMarketByCode(selectedMarketArea.getMarket().getCode());

        MarketPlacePojo selectedMarketPlace = marketPojoService.getMarketPlaceByCode(selectedMarket.getMarketPlace().getCode());

        // MARKET PLACE LIST
        buildMarketPlace(context, selectedMarketPlace);
       
        // MARKET LIST
View Full Code Here

    private void buildMarket(ContextPojo context, MarketPlacePojo selectedMarketPlace, MarketPojo selectedMarket){
        List<MarketPojo> markets = new ArrayList<MarketPojo>();
       
        if(selectedMarketPlace != null){
            for (Iterator<MarketPojo> iterator = selectedMarketPlace.getMarkets().iterator(); iterator.hasNext();) {
                MarketPojo marketPojo = (MarketPojo) iterator.next();
                MarketPojo market = marketPojoService.getMarketByCode(marketPojo.getCode());
                if(selectedMarket != null
                        && market.getCode().equals(selectedMarket.getCode())){
                    market.setSelected(true);
                }
                market.setMarketPlace(null);
                market.setMarketAreas(null);
                markets.add(market);
            }
        }
       
        context.setMarkets(markets);
View Full Code Here

    @Path("market/set/{marketCode}")
    @Produces(MediaType.APPLICATION_JSON)
    public CmsContextPojo selectMarket(@PathParam("marketCode") final String marketCode) {
        CmsContextPojo cmsContext = new CmsContextPojo();

        MarketPojo selectedMarket = marketPojoService.getMarketByCode(marketCode);

        MarketPlacePojo selectedMarketPlace = marketPojoService.getMarketPlaceByCode(selectedMarket.getMarketPlace().getCode());

        // MARKET PLACE LIST
        buildMarketPlace(cmsContext, selectedMarketPlace);
       
        // MARKET LIST
View Full Code Here

    public CmsContextPojo selectMarketArea(@PathParam("marketAreaCode") final String marketAreaCode) {
        CmsContextPojo cmsContext = new CmsContextPojo();

        MarketAreaPojo selectedMarketArea = marketPojoService.getMarketAreaByCode(marketAreaCode);

        MarketPojo selectedMarket = marketPojoService.getMarketByCode(selectedMarketArea.getMarket().getCode());

        MarketPlacePojo selectedMarketPlace = marketPojoService.getMarketPlaceByCode(selectedMarket.getMarketPlace().getCode());

        // MARKET PLACE LIST
        buildMarketPlace(cmsContext, selectedMarketPlace);
       
        // MARKET LIST
View Full Code Here

        RetailerPojo selectedRetailer = retailerPojoService.getRetailerByCode(retailerCode);
       
        MarketAreaPojo selectedMarketArea = marketPojoService.getMarketAreaByCode(marketAreaCode);

        MarketPojo selectedMarket = marketPojoService.getMarketByCode(selectedMarketArea.getMarket().getCode());

        MarketPlacePojo selectedMarketPlace = marketPojoService.getMarketPlaceByCode(selectedMarket.getMarketPlace().getCode());

        // MARKET PLACE LIST
        buildMarketPlace(cmsContext, selectedMarketPlace);
       
        // MARKET LIST
View Full Code Here

        RetailerPojo selectedRetailer = retailerPojoService.getRetailerByCode(retailerCode);

        MarketAreaPojo selectedMarketArea = marketPojoService.getMarketAreaByCode(marketAreaCode);

        MarketPojo selectedMarket = marketPojoService.getMarketByCode(selectedMarketArea.getMarket().getCode());

        MarketPlacePojo selectedMarketPlace = marketPojoService.getMarketPlaceByCode(selectedMarket.getMarketPlace().getCode());

        // MARKET PLACE LIST
        buildMarketPlace(cmsContext, selectedMarketPlace);
       
        // MARKET LIST
View Full Code Here

        cmsContext.setMarketPlaces(marketPlaces);
    }

    private void buildMarket(CmsContextPojo cmsContext, MarketPlacePojo selectedMarketPlace, MarketPojo selectedMarket){
        List<MarketPojo> markets = new ArrayList<MarketPojo>();
        MarketPojo masterMarket = new MarketPojo();
        masterMarket.setCode("MASTER_MARKET");
        masterMarket.setName("Master Market");
        if(selectedMarket == null){
            masterMarket.setSelected(true);
        }
        markets.add(masterMarket);
       
        if(selectedMarketPlace != null){
            for (Iterator<MarketPojo> iterator = selectedMarketPlace.getMarkets().iterator(); iterator.hasNext();) {
                MarketPojo marketPojo = (MarketPojo) iterator.next();
                MarketPojo market = marketPojoService.getMarketByCode(marketPojo.getCode());
                if(selectedMarket != null
                        && market.getCode().equals(selectedMarket.getCode())){
                    market.setSelected(true);
                }
                market.setMarketPlace(null);
                market.setMarketAreas(null);
                markets.add(market);
            }
        }
       
        cmsContext.setMarkets(markets);
View Full Code Here

TOP

Related Classes of org.hoteia.qalingo.core.pojo.market.MarketPojo

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.