Package org.hoteia.qalingo.core.domain

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


  @Qualifier("storeMarshalXmlHelper")
  private StoreMarshalXmlHelper storeMarshalXmlHelper;

  @Test
  public void getXMLAsString() throws Exception {
    Store store = getStoreTest();
    String xmlStream = storeMarshalXmlHelper.getXMLAsString(store);
    assertNotNull(xmlStream);
  }
View Full Code Here


    assertNotNull(xmlStream);
  }

  @Test(expected = MarshalException.class)
  public void getXMLAsStringFailed() throws Exception {
    Store store = getStoreTest();
    store.setName(null);
    storeMarshalXmlHelper.getXMLAsString(store);
  }
View Full Code Here

    store.setName(null);
    storeMarshalXmlHelper.getXMLAsString(store);
  }

  private Store getStoreTest() {
    Store store = new Store();

    store.setId(new Long(1));
    store.setVersion(1);
    store.setName("test");

    // ...
   
    store.setDateCreate(new Date());
    store.setDateUpdate(new Date());

    return store;
  }
View Full Code Here

    InputStream inputStream = new ByteArrayInputStream(xml.getBytes(("UTF-8")));
    return getStore(inputStream);
  }

  public Store getStore(InputStream inputStream) {
    Store store = null;
    store = getStoreByXml(inputStream);
    return store;
  }
View Full Code Here

   *
   * @param xsdInputStream the input stream.
   * @return the parsed object model
   */
  protected Store getStoreByXml(InputStream xsdInputStream) {
    Store store = null;
    if (xsdInputStream != null) {
      try {
        store = ((JAXBElement<Store>)unmarshaller.unmarshal(xsdInputStream)).getValue();
      } catch (javax.xml.bind.JAXBException e) {
        logger.error("something is wrong with jaxb", e);
View Full Code Here

    @Before
    public void setUp() throws Exception {
        marketArea = new MarketArea();
        marketArea.setId(new Long("1"));
       
        store = new Store();
        store.setId(Long.parseLong("1"));
        store.setName("development");
        store.setAreaCode("Area-21");
        store.setCity("pune");
        store.setCountryCode("IND");
View Full Code Here

                        urlStr = addFullPrefixUrl(requestData, urlStr) + handleParamValue(productBrand.getName()) + "/";
                    } else if (param instanceof CartItem) {
                        CartItem cartItem = (CartItem) param;
                        urlParams.put(RequestConstants.URL_PATTERN_CART_ITEM_CODE, handleParamValue(cartItem.getId().toString()));
                    else if (param instanceof Store) {
                        Store store = (Store) param;
                        urlParams.put(RequestConstants.URL_PATTERN_STORE_CODE, handleParamValue(store.getCode().toString()));
                    } else if (param instanceof Map) {
                        getParams = (Map<String, String>) param;
                    } else {
                        logger.warn("Unknowned url parameter : [{}]", param);
                    }
View Full Code Here

        logger.debug("Found {} stores", stores.size());
        return mapAll(dozerBeanMapper, stores, StorePojo.class);
    }

    public StorePojo getStoreById(final String id) {
        Store store = retailerService.getStoreById(id);
        logger.debug("Found {} store for id {}", store, id);
        return store == null ? null : dozerBeanMapper.map(store, StorePojo.class);
    }
View Full Code Here

        logger.debug("Found {} store for id {}", store, id);
        return store == null ? null : dozerBeanMapper.map(store, StorePojo.class);
    }
   
    public StorePojo getStoreByCode(final String code) {
        Store store = retailerService.getStoreByCode(code);
        logger.debug("Found {} store for code {}", store, code);
        return store == null ? null : dozerBeanMapper.map(store, StorePojo.class);
    }
View Full Code Here

        logger.debug("Found {} store for code {}", store, code);
        return store == null ? null : dozerBeanMapper.map(store, StorePojo.class);
    }

    public void saveOrUpdate(final StorePojo storeJsonBean) {
        Store store = dozerBeanMapper.map(storeJsonBean, Store.class);
        logger.info("Saving store {}", store);
        retailerService.saveOrUpdateStore(store);
    }
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.