Exemplo n.º 1
0
  public boolean nextObjectRow(DBObject obj) throws SQLException {
    boolean success;
    success = rs.next(); // FAUT RÉGLER LE NULL POINTER EXCEPTION ICI
    if (success) {
      obj = new DBObject();
      obj.setId(rs.getInt("id"));
      obj.setState(rs.getInt("state"));
    }

    return success;
  }
Exemplo n.º 2
0
  public boolean nextObjectRow(DBObject obj, boolean onlyAddName) throws SQLException {
    boolean success;
    success = rs.next();
    if (success) {
      // obj = new DBObject();
      obj.setId(rs.getInt("id"));
      obj.setState(rs.getInt("state"));
      obj.setName(rs.getString("name"));
      if (!onlyAddName) {
        obj.setDescription(rs.getString("description"));
      }
    }

    return success;
  }