    All Packages    This Package  Previous  Next

# Class sqlj.runtime.ref.ProfileGroup

    java.lang.Object
       |
       +----sqlj.runtime.ref.ProfileGroup

public class ProfileGroup
extends Object

A profile group object manages a set of profiles and connected profiles. Each profile group instance contains a collection of profiles. Additionally it contains a collection of open connections. For each open connection it contains, there exists an instance of a connected group. A connected group instance manages a set of connected profiles, one for each profile in the containing profile group instance.

This class is created to encapsulate the management of profiles that must be handled by all connection context objects. It is intended for internal use by the reference runtime implementation and reference translator generated code, and is therefore not expected to be directly referenced by SQLJ programmers.

##

ProfileGroup()

##

addConnection(Connection)
  Returns a connected group that manages the connected profiles associated with the passed connection and the current profile group's profiles.
getProfile(Object)
  Returns the profile associated with a particular key in this profile group.
getProfileKey(Loader, String)
  Returns key object for the profile of given a name.

##

ProfileGroup

     public ProfileGroup()

##

getProfileKey

     public synchronized Object getProfileKey(Loader loader,
                                              String profileName) throws SQLException

  Returns key object for the profile of given a name. If a profile with the given name has not yet been instantiated by this profile group, then a new one is instantiated using the passed name and loader; a key associated with the newly instantiated profile is created and returned. If a profile with the given name is already known to the profile group, then its associated key is returned directly.

  Throws: SQLException
    if the profile cannot be instantiated
  See Also:
    instantiate

getProfile

     public Profile getProfile(Object key)

  Returns the profile associated with a particular key in this profile group.

  Throws: IllegalArgumentException
    if the key is null or invalid

addConnection

     public synchronized ProfileGroup. ConnectedGroup addConnection(Connection conn)

  Returns a connected group that manages the connected profiles associated with the passed connection and the current profile group's profiles. Profiles registered after this call is made are automatically made known to the connected group returned.

    All Packages    This Package  Previous  Next