/**
   * 按条件查询多条数据
   *
   * @param dbManager DB管理器
   * @param conditions 查询条件
   * @return Collection 包含lwTownProrateAppendDto的集合
   * @throws Exception
   */
  public Collection findByConditions(DBManager dbManager, String conditions) throws Exception {
    DBLwTownProrateAppend dbLwTownProrateAppend = new DBLwTownProrateAppend(dbManager);
    Collection collection = new ArrayList();

    if (conditions.trim().length() == 0) {
      conditions = "1=1";
    }

    collection = dbLwTownProrateAppend.findByConditions(conditions);
    return collection;
  }
  /**
   * 按条件查询多条数据
   *
   * @param dbManager DB管理器
   * @param conditions 查询条件
   * @param pageNo 页号
   * @param rowsPerPage 每页的行数
   * @return PageRecord 查询的一页的结果
   * @throws Exception
   */
  public PageRecord findByConditions(
      DBManager dbManager, String conditions, int pageNo, int rowsPerPage) throws Exception {
    DBLwTownProrateAppend dbLwTownProrateAppend = new DBLwTownProrateAppend(dbManager);
    Collection collection = new ArrayList();

    if (conditions.trim().length() == 0) {
      conditions = "1=1";
    }

    int count = dbLwTownProrateAppend.getCount(SqlUtils.getWherePartForGetCount(conditions));
    collection = dbLwTownProrateAppend.findByConditions(conditions, pageNo, rowsPerPage);
    PageRecord pageRecord = new PageRecord(count, pageNo, 1, rowsPerPage, collection);
    return pageRecord;
  }