Package com.jpoweredcart.common.jdbc

Examples of com.jpoweredcart.common.jdbc.MapResultSetExtractor


    Integer languageId = getSettingService().getConfig(SettingKey.ADMIN_LANGUAGE_ID, Integer.class);
    String sql = "SELECT name, parent_id FROM " +quoteTable("category")+ " c LEFT JOIN " +quoteTable("category_description")
        + " cd ON (c.category_id = cd.category_id) WHERE c.category_id = ? AND cd.language_id = ? ORDER BY c.sort_order, cd.name ASC";
//    System.out.println(sql+"("+catId+","+languageId+")");
    Map<String, Object> resultMap = getJdbcOperations().query(sql,
        new Object[]{catId, languageId}, new MapResultSetExtractor());
    Integer parentId = (Integer)resultMap.get("parent_id");
    String name = (String)resultMap.get("name");
    if(parentId!=0){
      return getPath(parentId, separator)+separator+name;
    }else{
View Full Code Here

TOP

Related Classes of com.jpoweredcart.common.jdbc.MapResultSetExtractor

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.