Examples of DownloadRowMapper


Examples of com.jpoweredcart.common.entity.catalog.jdbc.DownloadRowMapper

    Integer languageId = getSettingService().getConfig(SettingKey.ADMIN_LANGUAGE_ID, Integer.class);
    String sql = "SELECT DISTINCT * FROM " +quoteTable("download")+ " d LEFT JOIN "+quoteTable("download_description")+
        " dd ON (d.download_id = dd.download_id) WHERE d.download_id = ? AND dd.language_id = ?";
    DownloadForm dlForm = (DownloadForm)getJdbcOperations().queryForObject(
        sql, new Object[]{dlId, languageId},
        new DownloadRowMapper().setTargetClass(DownloadForm.class));
      dlForm.setDescs(getDescriptions(dlId));
   
    dlForm.setDownloadDir(downloadFileService.getUrl(""));//leave it empty to get only baseUrl
   
    return dlForm;
View Full Code Here

Examples of com.jpoweredcart.common.entity.catalog.jdbc.DownloadRowMapper

  @Override
  public Download get(Integer dlId, Class<? extends Download> clazz) {
   
    String sql = "SELECT * FROM "+quoteTable("download")+" WHERE download_id=?";
    return getJdbcOperations().queryForObject(sql, new Object[]{dlId},
        new DownloadRowMapper().setTargetClass(clazz));
  }
View Full Code Here

Examples of com.jpoweredcart.common.entity.catalog.jdbc.DownloadRowMapper

        " dd ON (d.download_id = dd.download_id) WHERE dd.language_id =?";
    //sortedKeys={"dd.name", "d.remaining"}
    QueryBean query = createPaginationQuery(sql, pageParam);
    query.addParameters(languageId);
    return getJdbcOperations().query(query.getSql(),
        query.getParameters(), new DownloadRowMapper(){
          @Override
          public Download mapRow(ResultSet rs, int rowNum)
              throws SQLException {
            Download download = super.mapRow(rs, rowNum);
            download.setName(rs.getString("name"));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.