Ejemplo n.º 1
0
 public void close() {
   if (resultSet != null) {
     try {
       resultSet.close();
     } catch (SQLException e) {
       LOGGER.error("error closing inner resultset in iterator: " + e.getMessage());
     }
   }
   finished = true;
 }
Ejemplo n.º 2
0
 private void getNextItem() {
   try {
     if (resultSet.next()) {
       nextValue = resultSet.getString(KEY_COLUMN);
     } else {
       close();
     }
   } catch (SQLException e) {
     finished = true;
     LOGGER.warn("unexpected error during result set iteration: " + e.getMessage());
   }
   updateStats(true, false);
 }