Beispiel #1
0
  /**
   * Retrieves the next object constructed by the assembler engine.
   *
   * <p>
   *
   * <DL>
   *   <DT><B>Parameters:</B>
   *   <DD>None.
   * </DL>
   *
   * @return <CODE>Object</CODE> - The next object in the iterator.
   * @exception QMException Thrown if an error occurs while trying to retrieve the next object.
   * @include
   */
  public Object next() throws QMException {
    Object object = masmEngine.next();

    if (object == null) {
      masmEngine.close();
    }

    return object;
  }
Beispiel #2
0
  /**
   * Returns a Boolean indicator of whether the iterator contains a next object to retrieve.
   *
   * <p>
   *
   * <DL>
   *   <DT><B>Parameters:</B>
   *   <DD>None.
   * </DL>
   *
   * @return <CODE>Boolean</CODE> - An indicator of whether there is another object to retrieve.
   *     <B>True</B> indicates there is an object to retrieve; <B>false</B> indicates there is not.
   * @exception QMException Thrown if an error occurs while checking for the next object in the
   *     iterator. include
   */
  public boolean hasNext() throws QMException {
    boolean more = masmEngine.hasNext();

    if (!more) {
      masmEngine.close();
      QueryManagerImpl.decrementConnectionCounter();
    }

    return more;
  }
Beispiel #3
0
 /**
  * Closes the connection to the database.
  *
  * <p>
  *
  * <DL>
  *   <DT><B>Parameters:</B>
  *   <DD>None.
  * </DL>
  *
  * <DL>
  *   <DT><B>Returns:</B>
  *   <DD><CODE>void</CODE> - None.
  * </DL>
  *
  * @exception QMException Thrown if an error occurs while closing the connection.
  * @include
  */
 public void close() throws QMException {
   masmEngine.close();
 }