Package org.hoteia.qalingo.core.pojo.retailer

Examples of org.hoteia.qalingo.core.pojo.retailer.RetailerPojo


    @GET
    @Path("{code}")
    @Produces(MediaType.APPLICATION_JSON)
    public RetailerPojoResponse getRetailerByCode(@PathParam("code") final String code) {
        RetailerPojoResponse retailerPojoResponse = new RetailerPojoResponse();
        RetailerPojo retailerPojo = retailerService.getRetailerByCode(code);
        retailerPojoResponse.setRetailer(retailerPojo);
        return retailerPojoResponse;
    }
View Full Code Here


                                     @PathParam("localizationCode") final String localizationCode) {
        ContextPojo context = new ContextPojo();

        LocalizationPojo selectedLocalization = localizationPojoService.getLocalizationByCode(localizationCode);

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

        MarketPojo selectedMarket = marketPojoService.getMarketByCode(selectedMarketArea.getMarket().getCode());
View Full Code Here

                                         @PathParam("localizationCode") final String localizationCode) {
        ContextPojo context = new ContextPojo();

        LocalizationPojo selectedLocalization = localizationPojoService.getLocalizationByCode(localizationCode);

        RetailerPojo selectedRetailer = retailerPojoService.getRetailerByCode(retailerCode);

        MarketAreaPojo selectedMarketArea = marketPojoService.getMarketAreaByCode(marketAreaCode);

        MarketPojo selectedMarket = marketPojoService.getMarketByCode(selectedMarketArea.getMarket().getCode());
View Full Code Here

    private void buildRetailer(ContextPojo context, MarketAreaPojo selectedMarketArea, RetailerPojo selectedRetailer){
        List<RetailerPojo> retailers = new ArrayList<RetailerPojo>();
        if(selectedMarketArea != null){
            List<RetailerPojo> retailersByMarketAreaCode = retailerPojoService.findRetailersByMarketAreaCode(selectedMarketArea.getCode());
            for (Iterator<RetailerPojo> iterator = retailersByMarketAreaCode.iterator(); iterator.hasNext();) {
                RetailerPojo retailerPojo = (RetailerPojo) iterator.next();
                if(selectedRetailer != null
                        && retailerPojo.getCode().equals(selectedRetailer.getCode())){
                    retailerPojo.setSelected(true);
                }
                retailerPojo.setCustomerComments(null);
                retailerPojo.setCustomerRates(null);
                retailerPojo.setStores(null);
                retailerPojo.setAddresses(null);
                retailers.add(retailerPojo);
            }
        }
       
        context.setRetailers(retailers);
View Full Code Here

                                     @PathParam("localizationCode") final String localizationCode) {
        CmsContextPojo cmsContext = new CmsContextPojo();

        LocalizationPojo selectedLocalization = localizationPojoService.getLocalizationByCode(localizationCode);

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

        MarketPojo selectedMarket = marketPojoService.getMarketByCode(selectedMarketArea.getMarket().getCode());
View Full Code Here

                                         @PathParam("localizationCode") final String localizationCode) {
        CmsContextPojo cmsContext = new CmsContextPojo();

        LocalizationPojo selectedLocalization = localizationPojoService.getLocalizationByCode(localizationCode);

        RetailerPojo selectedRetailer = retailerPojoService.getRetailerByCode(retailerCode);

        MarketAreaPojo selectedMarketArea = marketPojoService.getMarketAreaByCode(marketAreaCode);

        MarketPojo selectedMarket = marketPojoService.getMarketByCode(selectedMarketArea.getMarket().getCode());
View Full Code Here

        cmsContext.setMarketAreas(marketAreas);
    }
   
    private void buildRetailer(CmsContextPojo cmsContext, MarketAreaPojo selectedMarketArea, RetailerPojo selectedRetailer){
        List<RetailerPojo> retailers = new ArrayList<RetailerPojo>();
        RetailerPojo retailer = new RetailerPojo();
        retailer.setCode("MASTER_RETAILER");
        retailer.setName("Master Retailer");
        if(selectedRetailer == null){
            retailer.setSelected(true);
        }
        retailers.add(retailer);
       
        if(selectedMarketArea != null){
            List<RetailerPojo> retailersByMarketAreaCode = retailerPojoService.findRetailersByMarketAreaCode(selectedMarketArea.getCode());
            for (Iterator<RetailerPojo> iterator = retailersByMarketAreaCode.iterator(); iterator.hasNext();) {
                RetailerPojo retailerPojo = (RetailerPojo) iterator.next();
                if(selectedRetailer != null
                        && retailerPojo.getCode().equals(selectedRetailer.getCode())){
                    retailerPojo.setSelected(true);
                }
                retailerPojo.setCustomerComments(null);
                retailerPojo.setCustomerRates(null);
                retailerPojo.setStores(null);
                retailerPojo.setAddresses(null);
                retailers.add(retailerPojo);
            }
        }
       
        cmsContext.setRetailers(retailers);
View Full Code Here

TOP

Related Classes of org.hoteia.qalingo.core.pojo.retailer.RetailerPojo

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.