示例#1
0
  int getCount() {
    int count = 0;

    ResultSet rs = null;

    PreparedStatementWrapper pstatForMo = null;
    PreparedStatement pstatementForMo = null;
    try {
      pstatForMo = agentName.rlAPI.fetchPreparedStatement(psSelectCount);
      pstatementForMo = pstatForMo.getPreparedStatement();
      rs = agentName.rlAPI.executeQuery(pstatementForMo);
      rs.next();
      count = rs.getInt(1);
      return count;

    } catch (Exception e) {
      return -1;
    } finally {
      try {
        rs.close();
      } catch (Exception e) {
      }
      agentName.rlAPI.returnPreparedStatement(pstatForMo);
    }
  }