Package com.jpoweredcart.common.entity.catalog

Examples of com.jpoweredcart.common.entity.catalog.CategoryToLayout


  public static class Layout implements RowMapper<CategoryToLayout>{

    @Override
    public CategoryToLayout mapRow(ResultSet rs, int rowNum)
        throws SQLException {
      CategoryToLayout catLayout = new CategoryToLayout();
      catLayout.setCategoryId(rs.getInt("category_id"));
      catLayout.setStoreId(rs.getInt("store_id"));
      catLayout.setLayoutId(rs.getInt("layout_id"));
      return catLayout;
    }
View Full Code Here


    List<CategoryDesc> descList = languageAdminModel
        .createDescriptionList(CategoryDesc.class);
    catForm.setDescs(descList);
    List<CategoryToLayout> ctlList = new ArrayList<CategoryToLayout>();
    for(Store store: storeAdminModel.getAll()){
      CategoryToLayout ctl = new CategoryToLayout();
      ctl.setStoreId(store.getId());
      ctl.setStoreName(store.getName());
      ctlList.add(ctl);
    }
    catForm.setLayouts(ctlList);
   
    return catForm;
View Full Code Here

  @Override
  public List<CategoryToLayout> getCatLayouts(Integer catId) {
    List<CategoryToLayout> ctlList = new ArrayList<CategoryToLayout>();
    for(Store store: storeAdminModel.getAll()){
      CategoryToLayout ctl = new CategoryToLayout();
      ctl.setStoreId(store.getId());
      ctl.setStoreName(store.getName());
      String sql = "SELECT layout_id FROM "+quoteTable("category_to_layout")
          +" WHERE category_id=? AND store_id=?";
      Integer layoutId = getJdbcOperations().query(sql,
          new Object[]{catId, store.getId()},
          new ScalarResultSetExtractor<Integer>());
      ctl.setLayoutId(layoutId);
      ctlList.add(ctl);
    }
    return ctlList;
  }
View Full Code Here

TOP

Related Classes of com.jpoweredcart.common.entity.catalog.CategoryToLayout

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.