Exemplo n.º 1
0
  /**
   * 查询满足模糊查询条件的记录数
   *
   * @param conditions conditions
   * @return 满足模糊查询条件的记录数
   * @throws Exception
   */
  public int getCount(String conditions) throws Exception {
    int rowCount = 0;
    if (conditions.trim().length() == 0) {
      conditions = "1=1";
    }

    DBManager dbManager = new DBManager();
    BLLwBookUserAction blLwBookUserAction = new BLLwBookUserAction();
    try {
      dbManager.open("pssDataSource");
      rowCount = blLwBookUserAction.getCount(dbManager, conditions);
    } catch (Exception exception) {
      throw exception;
    } finally {
      dbManager.close();
    }
    return rowCount;
  }