/** * Close an {@link Iterator} instances obtained from {@link org.hibernate.Query#iterate()} immediately * instead of waiting until the session is closed or disconnected. * * @param iterator an Iterator created by iterate() * * @throws HibernateException Indicates a problem closing the Hibernate iterator. * @throws IllegalArgumentException If the Iterator is not a "Hibernate Iterator". * * @see Query#iterate() */ public static void close(Iterator iterator) throws HibernateException { if ( iterator instanceof HibernateIterator ) { ( (HibernateIterator) iterator ).close(); } else { throw new IllegalArgumentException( "not a Hibernate iterator" ); } }
@Override public void close() throws IOException { iterator.close(); }
/** * Close an <tt>Iterator</tt> created by <tt>iterate()</tt> immediately, * instead of waiting until the session is closed or disconnected. * * @param iterator an <tt>Iterator</tt> created by <tt>iterate()</tt> * @throws HibernateException * @see org.hibernate.classic.Session#iterate(java.lang.String) * @see Query#iterate() */ public static void close(Iterator iterator) throws HibernateException { if ( iterator instanceof HibernateIterator ) { ( ( HibernateIterator ) iterator ).close(); } else { throw new IllegalArgumentException( "not a Hibernate iterator" ); } }
/** * Close an <tt>Iterator</tt> created by <tt>iterate()</tt> immediately, * instead of waiting until the session is closed or disconnected. * * @param iterator an <tt>Iterator</tt> created by <tt>iterate()</tt> * @throws HibernateException * @see org.hibernate.Query#iterate * @see Query#iterate() */ public static void close(Iterator iterator) throws HibernateException { if ( iterator instanceof HibernateIterator ) { ( ( HibernateIterator ) iterator ).close(); } else { throw new IllegalArgumentException( "not a Hibernate iterator" ); } }
/** * Close an <tt>Iterator</tt> created by <tt>iterate()</tt> immediately, * instead of waiting until the session is closed or disconnected. * * @param iterator an <tt>Iterator</tt> created by <tt>iterate()</tt> * @throws HibernateException * @see org.hibernate.Query#iterate * @see Query#iterate() */ public static void close(Iterator iterator) throws HibernateException { if ( iterator instanceof HibernateIterator ) { ( ( HibernateIterator ) iterator ).close(); } else { throw new IllegalArgumentException( "not a Hibernate iterator" ); } }
/** * Close an <tt>Iterator</tt> created by <tt>iterate()</tt> immediately, * instead of waiting until the session is closed or disconnected. * * @param iterator an <tt>Iterator</tt> created by <tt>iterate()</tt> * @throws HibernateException * @see org.hibernate.Query#iterate * @see Query#iterate() */ public static void close(Iterator iterator) throws HibernateException { if ( iterator instanceof HibernateIterator ) { ( ( HibernateIterator ) iterator ).close(); } else { throw new IllegalArgumentException( "not a Hibernate iterator" ); } }
/** * Close an {@link Iterator} instances obtained from {@link org.hibernate.Query#iterate()} immediately * instead of waiting until the session is closed or disconnected. * * @param iterator an Iterator created by iterate() * * @throws HibernateException Indicates a problem closing the Hibernate iterator. * @throws IllegalArgumentException If the Iterator is not a "Hibernate Iterator". * * @see Query#iterate() */ public static void close(Iterator iterator) throws HibernateException { if ( iterator instanceof HibernateIterator ) { ( (HibernateIterator) iterator ).close(); } else { throw new IllegalArgumentException( "not a Hibernate iterator" ); } }