net.sf.nxqd
Class NxqdResults

java.lang.Object
  extended by net.sf.nxqd.NxqdConsumer
      extended by net.sf.nxqd.NxqdResults

public class NxqdResults
extends NxqdConsumer

Version:
1.0
Author:
webhiker

Method Summary
 void add(NxqdValue value)
          Adds the specified NxqdValue to the end of the results set.
 boolean hasNext()
          Returns true if there is another element in the results set.
 boolean hasPrevious()
          Returns true if there is a previous element in the results set.
 NxqdValue next()
          Retrieves the next value in the result set.
 NxqdValue peek()
          Returns the current element in the results set without moving the internal iterator.
 NxqdValue previous()
          Retrieves the previous value in the result set.
 void reset()
          If a query was processed with eager evaluation, a call to this method resets the result set iterator, so that a subsequent call to next() method will return the first value in the result set.
 int size()
          If a query was processed with eager evaluation, a call to this method returns the number of values in the result set.
 
Methods inherited from class net.sf.nxqd.NxqdConsumer
getNxqdManager, setNxqdManager
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

add

public void add(NxqdValue value)
         throws NxqdException
Adds the specified NxqdValue to the end of the results set. Note that if the XmlResults object was created as the result of a lazy evaluation, this method throws an exception.

Parameters:
value - a NxqdValue value
Throws:
NxqdException - if an error occurs

size

public int size()
         throws NxqdException
If a query was processed with eager evaluation, a call to this method returns the number of values in the result set. If the query was processed with lazy evaluation, a call to this method throws an exception.

Returns:
an int value
Throws:
NxqdException - if an error occurs

reset

public void reset()
           throws NxqdException
If a query was processed with eager evaluation, a call to this method resets the result set iterator, so that a subsequent call to next() method will return the first value in the result set. If the query was processed with lazy evaluation then a call to this method method throws an exception.

Throws:
NxqdException - if an error occurs

hasNext

public boolean hasNext()
                throws NxqdException
Returns true if there is another element in the results set.

Returns:
a boolean value
Throws:
NxqdException - if an error occurs

hasPrevious

public boolean hasPrevious()
                    throws NxqdException
Returns true if there is a previous element in the results set.

Returns:
a boolean value
Throws:
NxqdException - if an error occurs

next

public NxqdValue next()
               throws NxqdException
Retrieves the next value in the result set. When no more values remain in the result set, returns null.

Returns:
a NxqdValue value
Throws:
NxqdException - if an error occurs

previous

public NxqdValue previous()
                   throws NxqdException
Retrieves the previous value in the result set. When the first value in the results set has been reached, returns null

Returns:
a NxqdValue value
Throws:
NxqdException - if an error occurs

peek

public NxqdValue peek()
               throws NxqdException
Returns the current element in the results set without moving the internal iterator.

Returns:
a NxqdValue value
Throws:
NxqdException - if an error occurs


Copyright © 2005-2006 nxqd. All Rights Reserved.