com.odi
Class DatabaseRootEnumeration

java.lang.Object
  extended bycom.odi.DatabaseRootEnumeration
All Implemented Interfaces:
Enumeration

public abstract class DatabaseRootEnumeration
extends Object
implements Enumeration

The DatabaseRootEnumeration class defines the operations for iterating over the names of the database roots in a database. A DatabaseRootEnumeration object contains a list of the roots in a database. An application can create a DatabaseRootEnumeration object with a call to Database.getRoots(). The DatabaseRootEnumeration object that it creates is valid only until the end of the transaction.

If you create a DatabaseRootEnumeration object and then destroy or modify a database root, PSE/PSE Pro might or might not recognize the change. Consequently, you should not use a DatabaseRootEnumeration object after you make any modification to the database roots in that database.

DatabaseRootEnumeration is an abstract class. When you invoke the Database.getRoots() method, PSE/PSE Pro automatically finds the subclass of DatabaseRootEnumeration, creates an instance of the subclass, and uses it to represent your database roots enumeration.


Method Summary
abstract  boolean hasMoreElements()
          Determines whether or not there are any more roots in the iteration.
abstract  Object nextElement()
          Obtains the next database root name, typed as an Object..
abstract  String nextName()
          Obtains the next database root name, typed as a String.
 

Method Detail

hasMoreElements

public abstract boolean hasMoreElements()
Determines whether or not there are any more roots in the iteration.

Specified by:
hasMoreElements in interface Enumeration
Returns:
The true constant if there are more roots to provide. The false constant if all roots have been provided.

nextElement

public abstract Object nextElement()
Obtains the next database root name, typed as an Object..

Specified by:
nextElement in interface Enumeration
Returns:
The next root name.

Throws:
DatabaseNotOpenException - If the database whose roots are being iterated over is not open.
NoSuchElementException - If there are no more root names.
NoTransactionInProgressException - If a transaction is not in progress.
StaleEnumeratorException - If the information for this enumeration has become stale and unusable. This currently occurs at the end of the transaction in which the enumeration was created.

nextName

public abstract String nextName()
Obtains the next database root name, typed as a String.

Returns:
The next root name.

Throws:
DatabaseNotOpenException - If the database whose roots are being iterated over is not open.
NoSuchElementException - If there are no more root names.
NoTransactionInProgressException - If a transaction is not in progress.
StaleEnumeratorException - If the information for this enumeration has become stale and unusable. This currently occurs at the end of the transaction in which the enumeration was created.


Copyright 2005 Progress Software Corporation. All rights reserved.