Package javacommon.xsqlbuilder.XsqlBuilder

Examples of javacommon.xsqlbuilder.XsqlBuilder.XsqlFilterResult


   
    Map otherFilters = new HashMap();
    otherFilters.put("sortColumns", pageRequest.getSortColumns());
   
    //混合使用otherFilters与pageRequest.getFilters()为一个filters使用
    XsqlFilterResult queryXsqlResult = getXsqlBuilder().generateHql(query,otherFilters,pageRequest);
    String sql = queryXsqlResult.getXsql();
//    Map acceptedFilters = queryXsqlResult.getAcceptedFilters();
    int pageSize = pageRequest.getPageSize();
    int pageNumber = pageRequest.getPageNumber();
    return pageQuery(sql, cn.org.rapid_framework.beanutils.PropertyUtils.describe(pageRequest), totalCount, pageSize, pageNumber,rowMapper);
  }
View Full Code Here


    }
    return builder;
  }

  private int queryTotalCount(String countQuery,Object filtersObject) {
    XsqlFilterResult countQueryXsqlResult = getXsqlBuilder().generateHql(countQuery,filtersObject);
    String removedOrderByQuery = SqlRemoveUtils.removeOrders(countQueryXsqlResult.getXsql());
    final int totalCount = getNamedParameterJdbcTemplate().queryForInt(removedOrderByQuery,new BeanPropertySqlParameterSource(filtersObject));
    return totalCount;
  }
View Full Code Here

    otherFilters.put("sortColumns", pageRequest.getSortColumns());
   
    XsqlBuilder builder = getXsqlBuilder();
   
    //混合使用otherFilters与pageRequest为一个filters使用
    XsqlFilterResult queryXsqlResult = builder.generateHql(sql,otherFilters,pageRequest);
    XsqlFilterResult countQueryXsqlResult = builder.generateHql(countQuery,otherFilters,pageRequest);
   
    return PageQueryUtils.pageQuery(getHibernateTemplate(),pageRequest,queryXsqlResult,countQueryXsqlResult);
  }
View Full Code Here

TOP

Related Classes of javacommon.xsqlbuilder.XsqlBuilder.XsqlFilterResult

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.