Package com.jpoweredcart.common

Examples of com.jpoweredcart.common.QueryBean


  public List<Voucher> getList(PageParam pageParam) {
    String sql = "SELECT *, (SELECT vtd.name FROM "
        +quoteTable("voucher_theme_description")+ " vtd WHERE vtd.voucher_theme_id = v.voucher_theme_id AND vtd.language_id = ?) AS theme, v.amount, v.status, v.date_added FROM " +quoteTable("voucher")+ " v";
    Integer languageId = getSettingService().getConfig(SettingKey.ADMIN_LANGUAGE_ID, Integer.class);
    //sortedKeys={"v.code", "v.from_name", "v.from_email", "v.to_name", "v.to_email","v.theme", "v.amount", "v.status", "v.date_added"}
    QueryBean query = createPaginationQuery(sql, pageParam);
    query.addParameters(languageId);
    List<Voucher> vouchers = getJdbcOperations().query(query.getSql(),
        query.getParameters(), new VoucherRowMapper(){
          @Override
          public Voucher mapRow(ResultSet rs, Voucher object)
              throws SQLException {
            super.mapRow(rs, object);
            object.setTheme(rs.getString("theme"));
View Full Code Here

TOP

Related Classes of com.jpoweredcart.common.QueryBean

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.