blackboard.persist
Class RemoteDbContainer

java.lang.Object
  |
  +--blackboard.persist.RemoteDbContainer
All Implemented Interfaces:
Container

public class RemoteDbContainer
extends java.lang.Object
implements Container

The RemoteDbContainer class implements the Container interface for remote access of specific persistence operations.

Since:
Bb 6.0
Version:
$Revision: 3 $ $Date: 6/27/02 11:57a $

Field Summary
static RemoteDbContainer BB6X_CONTAINER
           
 
Constructor Summary
RemoteDbContainer(AppVersion defaultAppVersion)
          Constructor - creates a new XmlContainer object with the given AppVersion as the default AppVersion for future framework calls on this container.
 
Method Summary
 Id generateId(DataType dataType, int nKey1)
          Generates an Id instance specific to this DatabaseContainer .
 Id generateId(DataType dataType, int nKey1, int nKey2)
          Generates an Id instance specific to this XmlContainer .
 Id generateId(DataType dataType, java.lang.String strKey)
          Generates an Id instance specific to this XmlContainer .
 AppVersion getAppVersion()
          Return the AppVersion associated with this XmlContainer .
static RemoteDbContainer getDefaultInstance()
          Returns the default XmlContainer for the system.
 boolean isValidId(Id id)
          Determines if the provided Id is a "valid" id for this XmlContainer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BB6X_CONTAINER

public static final RemoteDbContainer BB6X_CONTAINER
Constructor Detail

RemoteDbContainer

public RemoteDbContainer(AppVersion defaultAppVersion)
Constructor - creates a new XmlContainer object with the given AppVersion as the default AppVersion for future framework calls on this container.

Parameters:
defaultAppVersion - the AppVersion to use in configuring this container
Method Detail

getAppVersion

public AppVersion getAppVersion()
Return the AppVersion associated with this XmlContainer . This AppVersion serves as a default AppVersion for subsequent calls into the persistence framework.

Specified by:
getAppVersion in interface Container
Returns:
the AppVersion defined for this container

getDefaultInstance

public static RemoteDbContainer getDefaultInstance()
Returns the default XmlContainer for the system. This container represents an xml container instance configured to use the default application version information.

Returns:
the default XmlContainer as defined based upon the default application version information

generateId

public Id generateId(DataType dataType,
                     java.lang.String strKey)
              throws PersistenceException
Generates an Id instance specific to this XmlContainer . The format of the provided string does not matter, but, it should be a unique value in order for the generated Id itself to be unique.

Specified by:
generateId in interface Container
Parameters:
dataType - the DataType of the object that the generated Id instance will refer to
strKey - the String value to use when generating the key value of the Id instance
Returns:
an Id implementation instance, appropriate to this XmlContainer, whose key value is generated from the given value
Throws:
PersistenceException - if an error occurs in the Id generation process
See Also:
Id.toExternalString()

generateId

public Id generateId(DataType dataType,
                     int nKey1,
                     int nKey2)
              throws PersistenceException
Generates an Id instance specific to this XmlContainer . The value of the provided integers does not matter, but, the combination of the two values should be unique in order for the generated Id itself to be unique.

Specified by:
generateId in interface Container
Parameters:
dataType - the DataType of the object that the generated Id instance will refer to
nKey1 - an integer value to use when generating the key value of the Id instance
nKey2 - another integer value to use when generating the key value of the Id instance
Returns:
an Id implementation instance, appropriate to this Container, whose key value is generated from the given integer values
Throws:
PersistenceException - if an error occurs in the Id generation process

generateId

public Id generateId(DataType dataType,
                     int nKey1)
              throws PersistenceException
Generates an Id instance specific to this DatabaseContainer . The value of the provided integers does not matter, but, the combination of the two values should be unique in order for the generated Id itself to be unique.

Specified by:
generateId in interface Container
Parameters:
dataType - the DataType of the object that the generated Id instance will refer to
nKey1 - an integer value to use when generating the key value of the Id instance
Returns:
an Id implementation instance, appropriate to this DatabaseContainer, whose key value is generated from the given integer values
Throws:
PersistenceException - if an error occurs in the Id generation process

isValidId

public boolean isValidId(Id id)
Determines if the provided Id is a "valid" id for this XmlContainer.

An Id is considered valid for this XmlContainer if it is "set" (see Id.isSet()), if it originates from this xml container, and if it is an instance of the appropriate Id subclass for this xml container.

Specified by:
isValidId in interface Container
Parameters:
id - the Id to examine for validity
Returns:
true is the provided id is a valid id for this xml container, false otherwise


Copyright © 2003 Blackboard, Inc. All Rights Reserved.