コード例 #1
0
 public void close() throws SQLException {
   if (ps != null) {
     log.debug("closing iterator");
     nextResult = null;
     sess.getBatcher().closeQueryStatement(ps, rs);
     ps = null;
     rs = null;
     hasNext = false;
   }
 }
コード例 #2
0
 public void remove() {
   if (!single)
     throw new UnsupportedOperationException("Not a single column hibernate query result set");
   if (currentResult == null)
     throw new IllegalStateException("Called Iterator.remove() before next()");
   try {
     sess.delete(currentResult);
   } catch (Exception sqle) {
     log.error("could not remove", sqle);
     throw new LazyInitializationException(sqle);
   }
 }