|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.odi.Placement
com.odi.Database
The Database class is an abstract class that represents a database. For each database you create or open, PSE/PSE Pro automatically finds the subclass of Database and creates an instance of that subclass. PSE/PSE Pro then associates the instance with your database. The instance represents your database and provides a handle to your database. Consequently, you can use object identity comparison operators to determine whether or not two Database instances represent the same database.
Do not create subclasses of the Database class. If you do, PSE/PSE Pro will not work.
Additional information about databases is in the user guide.
All deprecated public constants now have equivalents in the ObjectStoreConstants class.
Field Summary | |
static int |
allExecute
Deprecated. This constant has been changed to ObjectStoreConstants.ALL_EXECUTE. |
static int |
allRead
Deprecated. This constant has been changed to ObjectStoreConstants.ALL_READ. |
static int |
allWrite
Deprecated. This constant has been changed to ObjectStoreConstants.ALL_WRITE. |
static int |
groupExecute
Deprecated. This constant has been changed to ObjectStoreConstants.GROUP_EXECUTE. |
static int |
groupRead
Deprecated. This constant has been changed to ObjectStoreConstants.GROUP_READ. |
static int |
groupWrite
Deprecated. This constant has been changed to ObjectStoreConstants.GROUP_WRITE. |
static int |
openMVCC
Deprecated. This constant has been changed to ObjectStore.MVCC. |
static int |
openReadOnly
Deprecated. This constant has been changed to ObjectStore.READONLY. |
static int |
openUpdate
Deprecated. This constant has been changed to ObjectStore.UPDATE. |
static int |
otherExecute
Deprecated. This constant has been changed to ObjectStoreConstants.OTHER_EXECUTE. |
static int |
otherRead
Deprecated. This constant has been changed to ObjectStoreConstants.OTHER_READ. |
static int |
otherWrite
Deprecated. This constant has been changed to ObjectStoreConstants.OTHER_WRITE. |
static int |
ownerExecute
Deprecated. This constant has been changed to ObjectStoreConstants.OWNER_EXECUTE. |
static int |
ownerRead
Deprecated. This constant has been changed to ObjectStoreConstants.OWNER_READ. |
static int |
ownerWrite
Deprecated. This constant has been changed to ObjectStoreConstants.OWNER_WRITE. |
Fields inherited from interface com.odi.ObjectStoreConstants |
ALL_EXECUTE, ALL_READ, ALL_WRITE, DEFAULT, DISABLE_AUTO_OPEN, GROUP_EXECUTE, GROUP_READ, GROUP_WRITE, INSTALL_SCHEMA_BATCH, INSTALL_SCHEMA_INCREMENTAL, MULTI_DB_MVCC, MVCC, OBJECTSTORE, OTHER_EXECUTE, OTHER_READ, OTHER_WRITE, OWNER_EXECUTE, OWNER_READ, OWNER_WRITE, PSE, PSE_PRO, READONLY, READONLY_NON_BLOCKING, RETAIN_HOLLOW, RETAIN_READONLY, RETAIN_STALE, RETAIN_TRANSIENT, RETAIN_UPDATE, UPDATE, UPDATE_NON_BLOCKING, WAIT_FOREVER, XA_TRANSACTION |
Method Summary | |
abstract void |
acquireLock(int lockType,
int timeoutMillis)
Attempts to acquire a lock on a database |
abstract void |
affiliate(Database targetDatabase,
boolean deep)
Marks this database to permit storing in it references to the target database (not available in PSE or PSE Pro). |
abstract boolean |
check(PrintStream out)
Checks all objects in the database to ensure that any objects they refer to exist and are stored in the database (not available in PSE) |
abstract void |
close()
Closes the database. |
abstract void |
close(boolean retainAsTransient)
Closes a database and specifies what should happen to any retained objects following the close. |
static Database |
create(String name,
int fileMode)
Creates and opens a database with the specified name |
static Database |
create(String name,
int fileMode,
int schemaInstallMode)
Creates and opens a database with the specified name and sets the schema installation mode for the database (this method is not available in PSE/PSE Pro) |
static Database |
create(String name,
int fileMode,
int schemaInstallMode,
Database schemaDatabase)
Creates and opens a database with the specified name and sets the schema database for the database (this method is not available in PSE/PSE Pro) |
abstract void |
createRoot(String name,
Object object)
Creates a root with the specified name in this database. |
abstract Segment |
createSegment()
Creates a new segment in the database if you are using ObjectStore, and not PSE or PSE Pro. |
abstract void |
destroy()
Closes and destroys the database. |
abstract void |
destroyRoot(String name)
Destroys the root with the specified name. |
static void |
evolveSchema(String[] dbNames,
String workdbName,
PersistentTypeSummary summary)
Evolves the databases' schema by making it consistent with the schema defined by the classes in the summary argument (not available in PSE or PSE Pro). |
static void |
evolveSchema(String dbName,
String workdbName,
PersistentTypeSummary summary)
Evolves the database's schema by making it consistent with the schema defined by the classes in the summary argument (not available in PSE or PSE Pro). |
abstract Properties |
GC()
Collects garbage in the database by invoking Segment.GC() on each segment in the database. |
abstract Properties |
GC(Properties GCProperties)
Collects garbage in the database by invoking Segment.GC() on each segment in the database according to specified properties. |
abstract Iterator |
getAffiliatedDatabases()
Returns an iterator of the databases affiliated with this database (not available in PSE or PSE Pro). |
abstract Segment |
getDefaultSegment()
Returns the default segment for this database. |
abstract String |
getHostName()
Gets the host containing this database. |
abstract int |
getOpenMode()
Retrieves the database open mode. |
abstract String |
getPath()
Retrieves the path name of the database. |
abstract Object |
getRoot(String name)
Returns a reference to the object associated with the specified root name. |
abstract DatabaseRootEnumeration |
getRoots()
Returns an enumeration of the roots in the database. |
abstract Database |
getSchemaDatabase()
Gets the schema database for this database. |
abstract Segment |
getSegment(int segmentId)
Returns a handle to an existing segment. |
abstract DatabaseSegmentEnumeration |
getSegments()
Returns an enumeration of the segments in the database. |
abstract long |
getSizeInBytes()
Retrieves the number of bytes of storage occupied by the database |
abstract void |
installTypes(PersistentTypeSummary summary)
Installs schema for application types into the database schema in a single operation (not available in PSE/PSE Pro). |
abstract boolean |
isOpen()
Determines whether or not a database is open. |
static Database |
of(Object object)
Returns the database that contains the specified object. |
abstract Database |
open(int openMode)
Opens a database with the specified open mode. |
static Database |
open(String name,
int openMode)
Opens the database with the specified name. |
abstract void |
setDefaultSegment(Segment segment)
Sets the default segment for this database. |
abstract void |
setRoot(String name,
Object object)
Sets the object associated with the specified root name. |
abstract void |
setSchemaDatabase(Database schemaDb)
Sets the schema database for this database if the schema is stored remotely (not available in PSE Pro). |
void |
show(PrintStream out,
boolean showObj,
boolean showData)
Displays the contents of the database (not available in PSE) |
abstract void |
show(PrintStream out,
boolean showObj,
boolean showData,
Query query)
Displays the contents of the database (not available in PSE) |
void |
showDB(String dbName,
PrintStream out,
boolean showObj,
boolean showData)
Displays the contents of the database (not available in PSE) |
Methods inherited from class com.odi.Placement |
getCluster, getDatabase, getSegment, getSession |
Field Detail |
public static final int ownerRead
public static final int ownerWrite
public static final int ownerExecute
public static final int groupRead
public static final int groupWrite
public static final int groupExecute
public static final int otherRead
public static final int otherWrite
public static final int otherExecute
public static final int allRead
public static final int allWrite
public static final int allExecute
public static final int openUpdate
public static final int openReadOnly
public static final int openMVCC
Method Detail |
public static Database create(String name, int fileMode)
name
-
The name of the database being created. The name can be
an absolute or relative file name; it is interpreted in the
context of the local file system.
The name you specify or pass must
end with the .odb extension. For example, mydatabase.odb
is a valid name specification.
fileMode
- The protection setting for the
created database.
Construct this by using the or operator on the values of the
file mode constants. The specified mode must provide write permission
for the owner of the database. Some operating systems ignore this parameter.
PSE/PSE Pro checks to ensure that owner write permission is provided but otherwise ignores this parameter.
AccessViolationException
- If unable to create the database
because of a file system access violation.
DatabaseAlreadyExistsException
- If a database with the
specified name already exists.
DatabaseException
- If other miscellaneous errors occur during
database creation, such as an invalid path name or unknown host.
Thrown by PSE/PSE Pro if a database is open.
IllegalArgumentException
- If the database name is null, or if
the fileMode argument is invalid, including if the
fileMode argument does not specify owner write permission.
ObjectStoreException
- If the current thread is not
associated with a session and there is no global session.
TransactionInProgressException
- If there is a transaction in
progress.Database.open(java.lang.String, int)
public static Database create(String name, int fileMode, int schemaInstallMode)
ObjectStoreException
- If the current session is
a PSE or PSE Pro session.
Database.open(java.lang.String, int)
public static Database create(String name, int fileMode, int schemaInstallMode, Database schemaDatabase)
ObjectStoreException
- If the current session is
a PSE or PSE Pro session.
Database.open(java.lang.String, int)
public static Database open(String name, int openMode)
If the database is already open with the specified open mode, PSE/PSE Pro returns the handle to the database. The handle is the instance of Database that is associated with the database. PSE/PSE Pro creates the instance of Database the first time an application calls Database.create() or Database.open() for a given database name in the current session. The instance of Database is not created when you create the database file in the file system.
When you open a database, it does not matter whether or not a transaction is in progress and it does not matter whether or not the database has already been opened.
name
-
The name of the database being opened. The name can be
an absolute or relative path name; it is interpreted in the
context of the local file system. The name you specify or pass must
end with the .odb extension. For example, myDatabase.odb
is a valid name specification.
openMode
- One of the following constants: This specifies whether or not the contents of the database can be modified and what action to take if the database is locked by another user or session. If either ObjectStore.UPDATE or ObjectStore.READONLY is specified and the database is locked by another user, the open blocks until the database becomes available. If either of the _NON_BLOCKING options is specified and the database is locked by another user, PSE/PSE Pro throws DatabaseLockedException and the open operation does not succeed. Database locking is disabled by default. You can enable it by setting the property com.odi.useDatabaseLocking to "true".
AccessViolationException
- If PSE/PSE Pro is unable to
read the database because of a file system access violation.
DatabaseException
- If an attempt is made to open multiple
databases per Session or for miscellaneous database errors.
DatabaseFormatException
- If the database is broken or has the
wrong PSE/PSE Pro version. A database is considered broken when
it has the wrong information at the start of the file and
when it is a completely
unrelated file, as well as when the database file somehow gets corrupted.
DatabaseLockedException
- If an attempt to open the database
with either ObjectStore.UPDATE_NON_BLOCKING or
ObjectStore.UPDATE_NON_BLOCKING mode is made and the database
is locked by another user.
DatabaseUpgradeException
- If the database has not been
upgraded.
DatabaseNotFoundException
- If a database with that name does
not exist.
IllegalArgumentException
- If the database name is null or if
the openMode parameter is invalid.
IncompatibleOpenModeException
- If the specified database
is already open, but with a different specification for openMode.
ObjectStoreException
- If the current thread is not associated
with a session and there is no global session.
public abstract Database open(int openMode)
Normally, an application calls this method on a closed database. However, if the database is already open with the specified open mode, PSE/PSE Pro returns the handle to the database. The handle is the instance of Database that is associated with your database. PSE/PSE Pro creates this instance of Database the first time an application calls Database.create() or Database.open for a given database name in the current Java session. The instance of Database is not created when you create the database file in the file system.
When you open a database, it does not matter whether or not a transaction is in progress, and it does not matter whether or not the database has already been opened.
openMode
- One of the following constants: This specifies whether or not the contents of the database can be modified and what action to take if the database is locked by another user or session.
If either ObjectStore.UPDATE or ObjectStore.READONLY is specified and the database is locked by another user, the open will block until the database becomes available.
If either of the _NON_BLOCKING options are specified and the database is locked by another user, a DatabaseLockedException will be thrown and the open will not succeed. Database locking is disabled by default, but can be enabled by setting the property com.odi.useDatabaseLocking to true.
AccessViolationException
- If PSE/PSE Pro is unable to
read the database because of a file system access violation.
DatabaseException
- If an attempt is made to open multiple
databases per Session or for miscellaneous database errors.
DatabaseFormatException
- If the database is broken or has the
wrong PSE/PSE Pro version. A database is considered broken when
it has the wrong information at the start of the file and
when it is a completely
unrelated file, as well as when the database file somehow gets corrupted.
DatabaseLockedException
- If an attempt to open the database
with either ObjectStore.UPDATE_NON_BLOCKING or
ObjectStore.UPDATE_NON_BLOCKING mode is made and the database
is locked by another user.
DatabaseNotFoundException
- If a database with that name does
not exist.
DatabaseOpenException
- If the database is not closed.
DatabaseUpgradeException
- If the database has not been
upgraded.
IllegalArgumentException
- If the openMode parameter is
invalid.
IncompatibleOpenModeException
- If the database is
already open, but with a different specification for openMode.
ObjectStoreException
- If the session implied by the
database is not the same as the session associated with the
current thread.
public abstract boolean isOpen()
ObjectStoreException
- If the session implied by the
database has been terminated or if the current thread is associated
with a session other than the session implied by the database.
public abstract void close()
To close a database and retain persistent objects as transient objects, call Database.close(retainAsTransient).
DatabaseNotOpenException
- If the database is not open.
ObjectStoreException
- If the session implied by the
database has been terminated or if the current thread is associated
with a session other than the session implied by the database.
TransactionInProgressException
- If a transaction is in
progress.
public abstract void close(boolean retainAsTransient)
If the retainAsTransient argument is true, PSE/PSE Pro makes any retained objects transient. This has no effect on objects in the database. This form of close() is meaningful only if the last commit on the database specified ObjectStore.RETAIN_UPDATE or ObjectStore.RETAIN_READONLY.
If retainAsTransient is false, it is equivalent to invoking the close() method without an argument. Any retained objects become stale and access to retained objects ends.
Objects that are retained as transient objects have their own identity that is separate from the objects in the database from which they were created. Therefore, it is possible for an aplication to reopen the database, access the persistent instances, which might have changed, and look at both the transient objects and the persistent objects.
The transient objects are snapshots of the objects as they were when the transaction was committed. The persistent objects reflect the current state in the database. The transient objects and the persistent objects are separate objects in the Java VM.
DatabaseNotOpenException
- If the database is not open.
ObjectStoreException
- If the session implied by the
database has been terminated or if the current thread is associated
with a session other than the session implied by the database.
ObjectStoreException
- If retainAsTransient is true and
the most recent Transaction.commit() call
did not specify ObjectStore.RETAIN_UPDATE or
ObjectStore.RETAIN_READONLY.
TransactionInProgressException
- If a transaction is in
progress.
public abstract void destroy()
DatabaseNotOpenException
- If the database is not open.
ObjectStoreException
- If the session implied by the
database has been terminated or if the current thread is associated
with a session other than the session implied by the database.
TransactionInProgressException
- If a transaction is in
progress.
UpdateReadOnlyException
- If the database is not open for update.
public abstract String getPath()
public abstract long getSizeInBytes()
DatabaseNotOpenException
- If the database is not open.
NoTransactionInProgressException
- If no transaction is in
progress.
ObjectStoreException
- If the session implied by the
database has been terminated or if the current thread is associated
with a session other than the session implied by the database.
public abstract int getOpenMode()
DatabaseNotOpenException
- If the database is not open.
ObjectStoreException
- If the session implied by the
database has been terminated or if the current thread is associated
with a session other than the session implied by the database.
public abstract Object getRoot(String name)
In the unusual situation that you are manually annotating your code instead of using the postprocessor, an application must make certain calls after obtaining a root. After an application obtains a root, the application must call the Persistent.fetch() or Persistent.dirty() method on an object to be able to access the contents of that object.
When you run the Class File Postprocessor it puts these calls in your code for you. If you do not run the postprocessor, you must insert the calls to fetch() and dirty() yourself.
name
- The name of the root.
DatabaseNotOpenException
- If the database is not open.
DatabaseRootNotFoundException
- If there is no root with that
name in the database.
IllegalArgumentException
- If the name argument is null.
NoTransactionInProgressException
- If there is no
transaction in progress.
ObjectStoreException
- If the session implied by the
database has been terminated or if the current thread is associated
with a session other than the session implied by the database.
public abstract void setRoot(String name, Object object)
name
- The name of the root.
object
- The object to associate with the root. Must be
persistence-capable
or null. If the object is already persistent, it must either be allocated in this database or be an exported object. For PSE and PSE Pro, the object must be in the same database. If the object is not persistent, PSE/PSE Pro migrates it into the default segment of the database when the transaction is committed and then associates it with the root.
Chapter 6 in the API User Guide provides additional information about roots.
DatabaseNotOpenException
- If the database is not open.
DatabaseRootNotFoundException
- If there is no root by that
name in the database.
IllegalArgumentException
- If the name argument is null.
NoTransactionInProgressException
- If there is no transaction
in progress.
ObjectNotPersistenceCapableException
- If the object is not
persistence-capable and is not null.
ObjectStoreException
- If the session implied by the
database has been terminated or if the current thread is associated
with a session other than the session implied by the database.
UpdateReadOnlyException
- If there is a read-only
transaction in progress or if the database is open read-only.
public abstract void createRoot(String name, Object object)
name
- The name of the root.object
- The object to associate with the root. Must be
persistence-capable
or null. If the object is already persistent, it must be in the same database.
If the object is not persistent, PSE/PSE Pro migrates it into the default segment of the database when the transaction is committed and then associates it with the root.
The user guide provides additional information about roots.
DatabaseNotOpenException
- If the database is not open.
DatabaseRootAlreadyExistsException
- If a root with that
name already exists in the database.
IllegalArgumentException
- If the name argument is null.
NoTransactionInProgressException
- If there is no transaction
in progress.
ObjectNotPersistenceCapableException
- If the object is not
persistence-capable and is not null.
ObjectStoreException
- If the session implied by the
database has been terminated or if the current thread is associated
with a session other than the session implied by the database.
UpdateReadOnlyException
- If there is a read-only
transaction in progress or if the database is open read-only.
public abstract void destroyRoot(String name)
name
- The name of the root.
The user guide provides additional information about roots.
DatabaseNotOpenException
- If the database is not open.
DatabaseRootNotFoundException
- If there is no root by that
name in the database.
IllegalArgumentException
- If the name argument is null.
NoTransactionInProgressException
- If there is no transaction
in progress.
ObjectStoreException
- If the session implied by the
database has been terminated or if the current thread is associated
with a session other than the session implied by the database.
UpdateReadOnlyException
- If there is a read-only
transaction in progress or if the database is open for read-only.
public abstract DatabaseRootEnumeration getRoots()
DatabaseNotOpenException
- If the database is not open.
NoTransactionInProgressException
- If a transaction is not
in progress.
ObjectStoreException
- If the session implied by the
database has been terminated or if the current thread is associated
with a session other than the session implied by the database.
public abstract Segment createSegment()
DatabaseNotOpenException
- If the database is not open.
NoTransactionInProgressException
- If a transaction is not in
progress.
ObjectStoreException
- If the session implied by the
database has been terminated or if the current thread is associated
with a session other than the session implied by the database.
SegmentException
- If you are using PSE or PSE Pro.
PSE and PSE Pro allow only one segment for application data
per database and they create the allowed segment
when they create a database.
UpdateReadOnlyException
- If there is a read-only
transaction in progress or if the database is open for read-only.
public abstract Segment getSegment(int segmentId)
segmentId
- The segment identifier.
DatabaseNotOpenException
- If the database is not open.
NoTransactionInProgressException
- If a transaction
is not in progress.
ObjectStoreException
- If the session implied by the
database has been terminated or if the current thread is associated
with a session other than the session implied by the database.
SegmentNotFoundException
- If the segment is not found.
public abstract Segment getDefaultSegment()
DatabaseNotOpenException
- If the database is not open.
NoTransactionInProgressException
- If a transaction
is not in progress.
ObjectStoreException
- If the session implied by the
database has been terminated or if the current thread is associated
with a session other than the session implied by the database.
SegmentNotFoundException
- If the default segment is not found.
public abstract void setDefaultSegment(Segment segment)
segment
- The segment to make the default segment.
DatabaseNotOpenException
- If this database, or the
database associated with the segment argument, is not open.
IllegalArgumentException
- If the segment parameter is null or
is associated with a different database.
NoTransactionInProgressException
- If a transaction
is not in progress.
ObjectStoreException
- If the session implied by the
database has been terminated or if the current thread is associated
with a session other than the session implied by the database.
SegmentNotFoundException
- If the specified segment is not
found.
public abstract DatabaseSegmentEnumeration getSegments()
DatabaseNotOpenException
- If the database is not open.
NoTransactionInProgressException
- If a transaction is not in
progress.
ObjectStoreException
- If the session implied by the
database has been terminated or if the current thread is associated
with a session other than the session implied by the database.DatabaseSegmentEnumeration
public static Database of(Object object)
object
- The object whose database should be determined.
object must be persistent.
DatabaseNotOpenException
- If the database is not open.
IllegalArgumentException
- If the name argument is null.
NoTransactionInProgressException
- If a transaction is not in
progress.
ObjectNotFoundException
- If the object was not found,
either because the object itself, its segment, or its database were
destroyed, or because the object was local and was fetched in a
previous transaction.
ObjectNotPersistentException
- If the object is not
persistent.
ObjectStoreException
- If the session implied by the
database has been terminated or if the current thread is associated
with a session other than the session implied by the database.
public abstract void acquireLock(int lockType, int timeoutMillis)
public abstract void affiliate(Database targetDatabase, boolean deep)
Invoking this method causes the target database to become affiliated with this database and writes an entry in its pathname pool to the target database.
You must call affiliate() once for each target database that will contain objects pointed to by objects in the specified database. Calling affiliate() again has no effect if the target database is already affiliated with this database.
targetDatabase
- The target database to affiliate with this
database.
References from this database to the target database are allowed
after this call.deep
- If true, the call to affiliate()
causes all databases
affiliated with the target database, in addition to the target database
itself, to be affiliated with this database.
If false, only the target database is affiliated. Use the true value if the target database contains references to objects in other databases that you expect this database to refer to.
DatabaseException
- If this or the target database is
the transient database.
DatabaseNotOpenException
- If this database or the target
database is not open.
IllegalArgumentException
- If the targetDatabase argument is
null or if it belongs to a different session than the one
implied by this database.
ObjectStoreException
- In ObjectStore, if the session implied by
the database has been terminated or if the current thread is
associated with
a session other than the session implied by the database. PSE and PSE Pro
always throw ObjectStoreException.
UpdateReadOnlyException
- If there is a read-only transaction in
progress or if this database is open read-only.
public abstract Iterator getAffiliatedDatabases()
This iterator must be used within the transaction in which it is created or it will raise StaleIteratorException. The iterator raises UnsupportedOperationException if remove is called.
DatabaseException
- If the database is the transient database.
DatabaseNotOpenException
- If the database is not open.
NoTransactionInProgressException
- If a transaction is not in progress.
ObjectStoreException
- In ObjectStore, if the session implied by the database has been
terminated, if the current thread is associated with a session
other than the session implied by the database. PSE and PSE Pro
always throw ObjectStoreException.
public abstract boolean check(PrintStream out)
PSE/PSE Pro does not operate on any changes that have been made but not saved.
out
- The output stream on which to display errors.
DatabaseNotOpenException
- If the database is not open.
FatalApplicationException
- If the current thread is running PSE.
NoTransactionInProgressException
- If a transaction is not
in progress.
ObjectStoreException
- If the session implied by the
database has been terminated or if the current thread is associated
with a session other than the session implied by the database.
public void showDB(String dbName, PrintStream out, boolean showObj, boolean showData)
PSE Pro does not operate on any changes that have been made but not saved.
dbName
- The name of the database to be shown.out
- The output stream on which to display the contents.showObj
- true if each object in the database should be shown.showData
- true if values of strings and references should be shown.
Setting this option forces showObj to be true.
DatabaseNotOpenException
- If the database is not open.
FatalApplicationException
- If the current thread is running PSE.
NoTransactionInProgressException
- If a transaction is not
in progress.
ObjectStoreException
- If the session implied by the
database has been terminated or if the current thread is associated
with a session other than the session implied by the database.
public void show(PrintStream out, boolean showObj, boolean showData)
PSE Pro does not operate on any changes that have been made but not saved.
out
- The output stream on which to display the contents.showObj
- true if each object in the database should be shown.showData
- true if values of strings and references
should be shown.
Setting this option forces showObj to be true.
DatabaseNotOpenException
- If the database is not open.
FatalApplicationException
- If the current thread is running PSE.
NoTransactionInProgressException
- If a transaction is not
in progress.
ObjectStoreException
- If the session implied by the
database has been terminated or if the current thread is associated
with a session other than the session implied by the database.
public abstract void show(PrintStream out, boolean showObj, boolean showData, Query query)
PSE Pro does not operate on any changes that have been made but not saved.
out
- The output stream on which to display the contents.showObj
- true if each object in the database should be shown.showData
- true if values of strings and references
should be shown.query
- If non-null, only include objects that satisfy the
query (not available in PSE).
DatabaseNotOpenException
- If the database is not open.
FatalApplicationException
- If the current thread is running PSE.
NoTransactionInProgressException
- If a transaction is not
in progress.
ObjectStoreException
- If the session implied by the
database has been terminated or if the current thread is associated
with a session other than the session implied by the database.
public abstract Properties GC()
The GC opens the database for update and starts an update transaction. While the GC has a database open, all sessions are blocked from accessing that database. They must wait until the GC closes the database and releases the lock.
If the database is already open in the current session or in a concurrent session, PSE/PSE Pro throws DatabaseOpenException.
int com.odi.gc.reclaimedObjects indicates the number of objects reclaimed by the GC.
int com.odi.gc.reachableObjects indicates the number of objects found to be reachable by the GC. (PSE Pro does not support this property. If you are using PSE Pro, this property is always null.)
AccessViolationException
- If PSE/PSE Pro is
unable to open the database
because of a file system access violation.
DatabaseNotFoundException
- If the database does not exist.
DatabaseOpenException
- If this session already has the
database open.
ObjectStoreException
- If the session implied by the
database has been terminated or if the current thread is associated
with a session other than the session implied by the database.
TransactionException
- If a transaction is in progress.
public abstract Properties GC(Properties GCProperties)
public abstract void installTypes(PersistentTypeSummary summary)
ObjectStoreException
- If this method is called from PSE or
PSE/Pro.
public static void evolveSchema(String dbName, String workdbName, PersistentTypeSummary summary)
ObjectStoreException
- If the method is
called from PSE or PSE Pro.
public static void evolveSchema(String[] dbNames, String workdbName, PersistentTypeSummary summary)
ObjectStoreException
- If the method is
called from PSE or PSE Pro.
public abstract String getHostName()
NoTransactionInProgressException
- if there is no current
transaction.public abstract Database getSchemaDatabase()
public abstract void setSchemaDatabase(Database schemaDb)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |