com.odi
Class Placement

java.lang.Object
  extended bycom.odi.Placement
Direct Known Subclasses:
Cluster, Database, Segment

public abstract class Placement
extends Object

The Placement class is the abstract superclass of classes that specify where an object should be migrated or allocated. Placement is a superclass for the Cluster and Segment and Database classes.


Method Summary
abstract  Cluster getCluster()
          Returns the cluster specified by this Placement.
abstract  Database getDatabase()
          Returns the database specified by this Placement.
abstract  Segment getSegment()
          Returns the segment specified by this Placement.
abstract  Session getSession()
          Returns the session associated with this Placement.
 

Method Detail

getDatabase

public abstract Database getDatabase()
Returns the database specified by this Placement. If the Placement is a database, this method returns the database. If the Placement is a segment or a cluster, this method returns the database containing that segment or cluster.

Throws:
DatabaseNotOpenException - If this Placement is a database, and 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.

getSegment

public abstract Segment getSegment()
Returns the segment specified by this Placement. If the Placement is a segment, this method returns the segment. If the Placement is a database, this method returns the default segment of the database.

Throws:
DatabaseNotOpenException - If this Placement is a database, and 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.

getCluster

public abstract Cluster getCluster()
Returns the cluster specified by this Placement. If the Placement is a cluster, this method returns the cluster. If the Placement is a segment, this method returns the default cluster of the segment. If the Placement is a database, this method returns the default cluster of the default segment of the database.

Throws:
DatabaseNotOpenException - If this Placement is a database, and 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.

getSession

public abstract Session getSession()
Returns the session associated with this Placement. Returns null if the session has been terminated.

Returns:
The session or null.



Copyright 2005 Progress Software Corporation. All rights reserved.