XmlContainer.rename
|
|
import com.sleepycat.dbxml.*;
public void rename(DbTxn txn, String newName, int flags)
throws XmlException;
Description: XmlContainer.rename
The XmlContainer.rename method renames the container's underlying
file. Note that the name of the container object in memory is not
changed - for that, use XmlContainer.setName.
The container must be closed; the system throws an exception if the
container is open.
The container must have been opened at least once; the system throws
an exception if the underlying file has not yet been created.
Parameters
- txn
-
If the operation is to be transaction-protected, the
txn parameter is a transaction handle returned from
DbEnv.txnBegin, otherwise, NULL.
- newName
-
The new container name.
- flags
-
must be set to zero, or a value created by bitwise inclusively OR'ing one or
more of the following values:
- Db.DB_AUTO_COMMIT
- Automatically wrap the operation in a transaction.
Throws
The XmlContainer.rename method
may fail and throw
XmlException,
encapsulating one of the following non-zero errors:
- CONTAINER_OPEN
- The container is open.
- DATABASE_ERROR
- An error occurred in an underlying Berkeley DB database. The
XmlException.getDbError method will return the error code for the
error.
Class
XmlContainer,
XmlDocument,
XmlException,
XmlIndexSpecification,
XmlQueryContext,
XmlQueryExpression,
XmlResults,
XmlUpdateContext,
XmlValue
Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.