Oracle Application Server Wireless Java API Reference
B10400-01

oracle.panama.lbevent
Interface LBCriteriaEnumeration

All Superinterfaces:
java.util.Enumeration

public interface LBCriteriaEnumeration
extends java.util.Enumeration

This is a "cursor" based Enumeration. Users of the enumeration should close the enumeration after using it .


Method Summary
 LBCriteria absolute(int element)
          Moves the cursor to the given element number in the result set.
 void close()
          Releases this ResultSetEnumeration object's database and JDBC resources immediately instead of waiting for this to happen when it is automatically closed.
 LBCriteria first()
          Returns the first object
 boolean hasNextElement()
          Tests if this enumeration contains next element.
 boolean hasPreviousElement()
          Tests if this enumeration contains previous element.
 boolean isClosed()
          Tests to see if this ResultSetEnumeration is closed.
 boolean isFirst()
          Indicates whether the cursor is on the first row of the result set.
 boolean isLast()
          Indicates whether the cursor is on the last row of the result set.
 LBCriteria last()
          Returns the last object
 LBCriteria next()
          Returns the next element of this enumeration if this enumeration object has at least one more element to provide.
 LBCriteria[] next(int n)
          Returns the next n elements of this enumeration if this enumeration object has at least one more element to provide.
 LBCriteria previous()
          Returns the previous element of this enumeration if this enumeration object has at least one more element to provide.
 LBCriteria[] previous(int n)
          Returns the previous n elements of this enumeration if this enumeration object has at least one more element to provide.
 LBCriteria relative(int elements)
          Moves the cursor a relative number of elements, either positive or negative.

 

Methods inherited from interface java.util.Enumeration
hasMoreElements, nextElement

 

Method Detail

absolute

public LBCriteria absolute(int element)
                    throws java.util.NoSuchElementException
Moves the cursor to the given element number in the result set. If the element number is positive, the cursor moves to the given element number with respect to the beginning of the result set. If the given element number is negative, the cursor moves to an absolute element position with respect to the end of the result set. An attempt to position the cursor beyond the first/last row in the result set leaves the cursor before/after the first/last row, respectively. Note: Calling absolute(1) is the same as calling first(). Calling absolute(-1) is the same as calling last().
Parameters:
element - the requested element number
Returns:
the relative element of this enumeration.
Throws:
java.util.NoSuchElementException - if no more elements exist.

relative

public LBCriteria relative(int elements)
                    throws java.util.NoSuchElementException
Moves the cursor a relative number of elements, either positive or negative. Attempting to move beyond the first/last element in the result set positions the cursor before/after the first/last row. Calling relative(0) is valid, but does not change the cursor position. Note: Calling relative(1) is different from calling next() because is makes sense to call next() when there is no current row, for example, when the cursor is positioned before the first row or after the last row of the result set.
Parameters:
elements - the requested elements
Returns:
the relative element of this enumeration.
Throws:
java.util.NoSuchElementException - if no more elements exist.

hasNextElement

public boolean hasNextElement()
Tests if this enumeration contains next element.
Returns:
true if and only if this enumeration object contains at least one more next element to provide; false otherwise.

next

public LBCriteria next()
                throws java.util.NoSuchElementException
Returns the next element of this enumeration if this enumeration object has at least one more element to provide.
Returns:
the next element of this enumeration.
Throws:
java.util.NoSuchElementException - if no more elements exist.

next

public LBCriteria[] next(int n)
                  throws java.util.NoSuchElementException
Returns the next n elements of this enumeration if this enumeration object has at least one more element to provide.
Parameters:
n - is the number of the requested next elements of this enumeration.
Returns:
the array with the next element of this enumeration. The length of the array indicates the actual number of elements
Throws:
java.util.NoSuchElementException - if no more elements exist.

hasPreviousElement

public boolean hasPreviousElement()
Tests if this enumeration contains previous element.
Returns:
true if and only if this enumeration object contains at least one more previous element to provide; false otherwise.

previous

public LBCriteria previous()
                    throws java.util.NoSuchElementException
Returns the previous element of this enumeration if this enumeration object has at least one more element to provide.
Returns:
the previous element of this enumeration.
Throws:
java.util.NoSuchElementException - if no more elements exist.

previous

public LBCriteria[] previous(int n)
                      throws java.util.NoSuchElementException
Returns the previous n elements of this enumeration if this enumeration object has at least one more element to provide.
Parameters:
n - is the number of the requested next elements of this enumeration.
Returns:
the array with the previous element of this enumeration. The length of the array indicates the actual number of elements
Throws:
java.util.NoSuchElementException - if no more elements exist.

first

public LBCriteria first()
                 throws java.util.NoSuchElementException
Returns the first object
Returns:
LBCriteria the first criteria
Throws:
java.util.NoSuchElementException - if no more elements exist.

isFirst

public boolean isFirst()
Indicates whether the cursor is on the first row of the result set.
Returns:
true if the cursor is on the first row, false otherwise.

last

public LBCriteria last()
                throws java.util.NoSuchElementException
Returns the last object
Returns:
LBCriteria the last criteria
Throws:
java.util.NoSuchElementException - if no more elements exist.

isLast

public boolean isLast()
Indicates whether the cursor is on the last row of the result set.
Returns:
true if the cursor is on the last row, false otherwise.

close

public void close()
Releases this ResultSetEnumeration object's database and JDBC resources immediately instead of waiting for this to happen when it is automatically closed.

isClosed

public boolean isClosed()
Tests to see if this ResultSetEnumeration is closed.
Returns:
true if the it is closed; false if it's still open

Oracle Application Server Wireless Java API Reference
B10400-01

Copyright © 2003 Oracle Corporation. All Rights Reserved.