Class COM.odi.DatabaseRootEnumeration
java.lang.Object
|
+----COM.odi.DatabaseRootEnumeration
- public 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, ObjectStore 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, ObjectStore automatically
finds the subclass of DatabaseRootEnumeration, creates
an instance of the subclass, and uses it to represent your database
roots enumeration.
-
hasMoreElements()
- Determines whether or not there are any more roots in the iteration.
-
nextElement()
- Obtains the next database root name, typed as an Object..
-
nextName()
- Obtains the next database root name, typed as a String.
hasMoreElements
public abstract boolean hasMoreElements()
- Determines whether or not there are any more roots in the iteration.
- 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..
- Returns:
- The next root name.
- Throws: DatabaseNotOpenException
- If the database
whose roots are being iterated over is not open.
- Throws: NoSuchElementException
- If there are
no more root names.
- Throws: NoTransactionInProgressException
- If a transaction
is not in progress.
- Throws: 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.
- Throws: NoSuchElementException
- If there are
no more root names.
- Throws: NoTransactionInProgressException
- If a transaction
is not in progress.
- Throws: 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 © 1996, 1997, 1998 Object Design, Inc. All rights reserved.