Package com.jpoweredcart.common.entity.setting

Examples of com.jpoweredcart.common.entity.setting.Store


public class StoreRowMapper implements RowMapper<Store>{

  @Override
  public Store mapRow(ResultSet rs, int rowNum) throws SQLException {
   
    Store store = new Store();
    store.setId(rs.getInt("store_id"));
    store.setName(rs.getString("name"));
    store.setUrl(rs.getString("url"));
    store.setSsl(rs.getBoolean("ssl"));
   
    return store;
  }
View Full Code Here


 
  @Override
  public List<Store> getAll() {
    String sql = "SELECT * FROM " +quoteTable("store")+ " ORDER BY url";
    List<Store> storeList = getJdbcOperations().query(sql, new StoreRowMapper());
    Store defaultStore = new Store();
    defaultStore.setId(0);
    String defaultStoreName = getSettingService()
        .getConfig(DefaultSettings.STORE_ID, SettingKey.CFG_STORE_NAME);
    defaultStore.setName(defaultStoreName);
    String defaultStoreUrl = getEnvironment().getProperty("app.http.catalog");
    defaultStore.setUrl(defaultStoreUrl);
    storeList.add(0, defaultStore);
    return storeList;
  }
View Full Code Here

  @Transactional
  @Override
  public void create(OrderForm orderForm) {
   
    Store store = storeAdminModel.get(orderForm.getStoreId());
    String storeName = store.getName();
    String storeUrl = store.getUrl();
   
    String invoicePrefix = null;
    Map<String, Object> settings = settingAdminModel.getSettings(SettingGroup.CONFIG, orderForm.getStoreId());
    if(settings.containsKey(SettingKey.INVOICE_PREFIX)){
      invoicePrefix = ObjectUtils.toString(settings.get(SettingKey.INVOICE_PREFIX));
View Full Code Here

TOP

Related Classes of com.jpoweredcart.common.entity.setting.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.