# package sqlj.runtime.profile.util

## Interface Index

- Auditor
- ProfileCustomizer
- ProfileIOContext

## Class Index

- AuditedProfile
- AuditorInstaller
- AuditorInstallerBeanInfo
- CustomizerHarness
- CustomizerHarnessBeanInfo
- CustomizerPropertyInfo
- DataCustomizer
- PrintWriterAuditor
- ProfileCustomizerEditor
- ProfilePrinter
- SerProfileToClass
Interface sqlj.runtime.profile.util.Auditor

# Interface sqlj.runtime.profile.util.Auditor

public interface Auditor

An auditor is an object on which calls to functions, returned results from functions and exceptions thrown from functions can be registered. It is used to debug calls made to an "audited" class, such as an audited profile.

## Variable Index

o EMPTY_ARGS
  Constant defining an empty function argument array.
o VOID_RETURN
  Constant defining a void function return value.

## Method Index

o registerCall(Object, String, Object[])
  Called to register a call to an audited method.
o registerException(Object, String, Exception)
  Called to register an exception thrown from an audited method.
o registerReturn(Object, String, Object)
  Called to register a return from an audited method.

## Variables

o EMPTY_ARGS

     public static final Object EMPTY_ARGS[]

  Constant defining an empty function argument array.

o VOID_RETURN

     public static final Object VOID_RETURN

  Constant defining a void function return value.

## Methods

o registerCall

     public abstract void registerCall(Object obj,
                                       String methodName,
                                       Object args[])

  Called to register a call to an audited method.

  Parameters:
    obj - the object on which the method call was made.
    methodName - the name of the method being called.
    args - an array of arguments to the method being called.

o registerReturn

     public abstract void registerReturn(Object obj,
                                         String methodName,
                                         Object returnVal)

  Called to register a return from an audited method.

  Parameters:
    obj - the object on which the method is returning.
    methodName - the name of the method returning.
    returnVal - the value of the result.

o registerException

     public abstract void registerException(Object obj,
                                            String methodName,
                                            Exception e)

  Called to register an exception thrown from an audited method.

  Parameters:
    obj - the object on which the method was orignally called.
    methodName - the name of the method throwing the exception.
    e - the exception thrown.

Interface sqlj.runtime.profile.util.ProfileCustomizer

# Interface sqlj.runtime.profile.util.ProfileCustomizer

public interface ProfileCustomizer

A profile customizer is a JavaBean component that customizes a profile to allow vendor-specific features, extensions and/or behavior. A class is a profile customizer if it implements the `ProfileCustomizer` interface, provides an accessible no-arg constructor, and conforms to the JavaBeans API to expose its properties.

Most profile customizers extend the functionality of a profile by creating and registering an appropriate profile customization object with the profile. However, it is not required that all profile customizers install customization objects. Some customizers may only inspect the contents of a profile to verify conformance with a particular SQL dialect. Other customizers might install profile-specific data into a schema to be accessed at runtime without modifying the profile itself.

Profile Customizer Usage

Because profile customizers are JavaBeans components, they may be used within generic tools that operate on profiles. A profile customizer instance is typically created and used by a profile customization utility with the following steps.

- A profile customizer bean is created by name using a call to `Beans.instantiate()`.
- The customizer's properties are discovered using the JavaBeans `Introspector` class. Property values are set according to the caller's needs using the property's read and write methods.
- The customizer's `acceptsConnection` method is called to verify whether or not it can be used with a particular JDBC connection. If no connection is to be used, null is passed as an argument to this method.
- The customizer's `customize` method is called, passing the profile to customize, a JDBC connection, and an error log.
- The `customize` method returns true if the profile is changed, false is the profile is unchanged.
- Log entries added by the customizer during the `customize` call are reported as appropriate by the calling utility.
- A successfully updated profile is re-packaged with the application by the calling utility. Successfully updated profiles are those profiles for which the `customize` call returns true and there are no errors reported in the error log.

The same profile customizer may be used to customize different profiles and/or customize the same profile using different properties and/or database connections. Any properties affecting the current `customize` call will be set before the call is made. The `customize` method will only be called with connections for which `acceptsConnection` has previously returned true.

Interpreting Customize Results

A profile is typically saved whenever it has been updated. Before saving the profile, it may be customized further using other customizers or settings. A profile should only be saved or customized further if it is in an appropriate state. The following table summarizes the possible outcomes of a call to `customize` and the corresponding state of the profile. Note that warnings and informational messages logged during a call to `customize` do not affect the state of the profile.

Customize Return Value | Did Customize Log an Error? | Should the Profile be Saved? | Is it Safe to Customize Further? | Comment
--- | --- | --- | --- | ---
true | no | yes | yes | Customization successfully updated profile.
false | no | no | yes | Customization successful but did not require a profile change.
true | yes | no | no | Customization unsuccessfully updated profile. The profile contains erroneous data.
false | yes | no | yes | Customization unsuccessful but did not update profile.

Customizer Properties

A profile customizer uses the JavaBeans component model to describe the properties it contains. The beans `Introspector` class is used to discover all properties supported by a customizer. A property's read method (if available) is used to query the property's current value. A property's write method (if available) is used to set the property to a new value. No explicit processing of a property file or argument array is required on the part of the profile customizer. Because the `Introspector` class is used to discover properties, a profile customizer can publish its properties in many ways. Most profile customizers will use the JavaBeans default `getXXX()` and `setXXX()` method patterns to publish properties. A custom `BeanInfo` class could also be used if the default property mappings are insufficient. Note that profile customizers without properties do not require any special modification.

See Also:
  Customization, instantiate, Introspector, BeanInfo

## Method Index

o acceptsConnection(Connection)
  Returns true if this customizer is able to customize profiles using the passed JDBC connection, false otherwise.
o customize(Profile, Connection, ErrorLog)
  Customizes the passed profile.

## Methods

o acceptsConnection

     public abstract boolean acceptsConnection(Connection conn)

  Returns true if this customizer is able to customize profiles using the passed JDBC connection, false otherwise. A null connection indicates that customization will be performed "offline" (without a connection).

  Most customizers will customize profiles strictly offline (accepting only null connections) or strictly online (accepting only non-null connections). For those customizers that are able to operate both online and offline, this method returns true for both null and non-null connections. The definition of what constitutes an acceptable non-null connection is determined by the customizer implementation. Some will accept only connections to a particular database vendor. Others will accept only connections created by a particular JDBC driver.

  This method allows customizers to be pooled and queried dynamically as to whether or not they can perform a particular customization, in much the same way that JDBC drivers are pooled with the driver manager and report whether or not they understand a particular URL.

  Parameters:
    conn - the JDBC connection to use during customization. A null connection indicates offline customization.
  Returns:
    true if customization can be performed using the passed connection, false otherwise.

o customize

     public abstract boolean customize(Profile profile,
                                       Connection conn,
                                       ErrorLog log)

  Customizes the passed profile. If the profile was modified in the process of customization, then true is returned. Otherwise false is returned. Note that the return value does not indicate success or failure but rather indicates whether or not the profile will need to be re-serialized to save its state. Accordingly, this method will only return true if the state of the profile object itself has been modified.

  The passed profile is the instance to customize. This routine may register or deregister one or more customization objects with the profile. Note that the passed profile may have been previously customized by this customizer. Typical customization objects will only be installed once, and thus any previously registered customization objects may be removed or overwritten.

  The passed connection is used to perform any database installation required for customization. Only connections for which `acceptsConnection` has previously returned true will be passed. Note that a null connection indicates that the profile is customized offline and does not require any database access.

  The passed log is used to report information, warnings and errors that occur during the customization process. Logging an error indicates that this call was unsuccessful.

  Parameters:
    profile - the profile object to customize
    conn - a JDBC connection to be used in the customization process.
    log - a log into which error messages are written.
  Returns:
    true if profile was changed, false if unchanged.

Interface sqlj.runtime.profile.util.ProfileIOContext

# Interface sqlj.runtime.profile.util.ProfileIOContext

public interface ProfileIOContext

A profile IO context describes the information needed to read, load, customize, and write a serialized profile.

See Also:
  CustomizerHarness

## Variable Index

o PIO_ERROR
  Constant passed to `close` indicating that an error occured during profile customization.
o PIO_MODIFIED
  Constant passed to `close` indicating that the profile (or jar file) was modified, and therefore does not need to be updated.
o PIO_UNMODIFIED
  Constant passed to `close` indicating that the profile (or jar file) was not modified, and therefore does not need to be updated.

## Method Index

o close(int)
  Closes any resources associated with this ProfileIOContext, renaming or removing resources as appropriate.
o getErrorLog()
  Return an error log into which customization messages are added.
o getInputStream()
  Returns an input stream from which the serialized profile can be read.
o getLoader()
  Return the profile loader instance to use in instantiating the profile contained in the input stream.
o getOutputStream()
  Returns an output stream into which a customized version of the serialized profile can be written.

## Variables

o PIO_UNMODIFIED

     public static final int PIO_UNMODIFIED

  Constant passed to `close` indicating that the profile (or jar file) was not modified, and therefore does not need to be updated. Any data written to the stream returned by `getOutputStream` may be discarded.

  See Also:
    close

o PIO_MODIFIED

     public static final int PIO_MODIFIED

  Constant passed to `close` indicating that the profile (or jar file) was modified, and therefore does not need to be updated. Data written to the stream returned by `getOutputStream` should be recorded and saved.

  See Also:
    close

o PIO_ERROR

     public static final int PIO_ERROR

  Constant passed to `close` indicating that an error occured during profile customization. Any data written to the stream returned by `getOutputStream` should be disregarded.

  See Also:
    close

## Methods

o getInputStream

     public abstract InputStream getInputStream() throws IOException

  Returns an input stream from which the serialized profile can be read. Each time this method is called, a new stream containing an unread profile should be returned. The stream is closed by the caller.

  Throws: IOException
    if an error occurs creating the input stream.

o getOutputStream

     public abstract OutputStream getOutputStream() throws IOException

  Returns an output stream into which a customized version of the serialized profile can be written. Typically, this will represent the same logical stream as was read by getInputStream. Each time this method is called, a new stream should be returned. The stream is closed by the caller.

  Throws: IOException
    if an error occurs creating the output stream.

o getErrorLog

     public abstract ErrorLog getErrorLog()

  Return an error log into which customization messages are added.

o getLoader

     public abstract Loader getLoader()

  Return the profile loader instance to use in instantiating the profile contained in the input stream. Returns null if the default profile loader is to be used.

  See Also:
    instantiate

o close

     public abstract void close(int status) throws IOException

  Closes any resources associated with this ProfileIOContext, renaming or removing resources as appropriate. The passed status indicates whether or not the profile was successfully written to the output stream returned by `getOutputStream`. This method is always called after getInputStream is called, and before a subsequent call to getInputStream is made.

  Parameters:
    status - one of the PIO_* constants
  Throws: IOException
    if this IOContext cannot be closed
  See Also:
    PIO_ERROR, PIO_UNMODIFIED, PIO_MODIFIED

Class sqlj.runtime.profile.util.AuditedProfile

# Class sqlj.runtime.profile.util.AuditedProfile

    java.lang.Object
       |
       +----sqlj.runtime.profile.ref.ProfileWrapper
               |
               +----sqlj.runtime.profile.util.AuditedProfile

public class AuditedProfile
extends ProfileWrapper

An audited profile is a profile wrapper that wraps all RTStatements and RTResultSets it returns with classes that audit the calls made. This is useful in debugging the calls made to various different levels of profile wraping. Each call made to a method is registered with an auditor, the return result from each call is registered, and an exception thrown, if any is registered. An auditor is an interface that may be implemented to handle the auditing process in any number of different ways. The most common auditors will log all calls to a file or System.out.

RESTRICTIONS: currently does not support auditing of direct JDBC calls, only RT* calls.

## Constructor Index

o AuditedProfile(ConnectedProfile, Auditor)
  Creates an audited connected profile wrapper built on top of the specified connected profile.

## Method Index

o close()
  Makes an audited call to method close
o getConnection()
  Makes an audited call to method getConnection
o getProfileData()
  Makes an audited call to method getProfileData
o getStatement(int)
  Makes an audited call to method getStatement
o newProfile(ConnectedProfile, Auditor)
  Creates a new audited connected profile instance which wraps the given connected profile, and registers all calls to the given auditor.
o newProfile(DynamicProfile, Auditor)
  Creates a new audited dynamic profile instance which wraps the given dynamic profile, and registers all calls to the given auditor.

## Constructors

o AuditedProfile

     public AuditedProfile(ConnectedProfile profile,
                           Auditor auditor)

  Creates an audited connected profile wrapper built on top of the specified connected profile.

  Parameters:
    profile - the underlying connected profile.
    auditor - the auditor on which to register calls.

## Methods

o newProfile

     public static ConnectedProfile newProfile(ConnectedProfile profile,
                                               Auditor auditor)

  Creates a new audited connected profile instance which wraps the given connected profile, and registers all calls to the given auditor.

  Parameters:
    profile - the connected profile to wrap
    auditor - the auditor on which to register calls

o newProfile

     public static DynamicProfile newProfile(DynamicProfile profile,
                                             Auditor auditor)

  Creates a new audited dynamic profile instance which wraps the given dynamic profile, and registers all calls to the given auditor.

  Parameters:
    profile - the dynamic profile to wrap
    auditor - the auditor on which to register calls

o getProfileData

     public ProfileData getProfileData()

  Makes an audited call to method getProfileData

  Overrides:
    getProfileData in class ProfileWrapper

o getConnection

     public Connection getConnection()

  Makes an audited call to method getConnection

  Overrides:
    getConnection in class ProfileWrapper

o getStatement

     public RTStatement getStatement(int p0) throws SQLException

  Makes an audited call to method getStatement

  Throws: SQLException
    if audited method raises this exception
  Overrides:
    getStatement in class ProfileWrapper

o close

     public void close() throws SQLException

  Makes an audited call to method close

  Throws: SQLException
    if audited method raises this exception
  Overrides:
    close in class ProfileWrapper

Class sqlj.runtime.profile.util.AuditorInstaller

# Class sqlj.runtime.profile.util.AuditorInstaller

    java.lang.Object
       |
       +----sqlj.runtime.profile.util.AuditorInstaller

public class AuditorInstaller
extends Object
implements ProfileCustomizer

The auditor installer class is used as a command line utility to install (or uninstall) debugging class-auditors into an existing set of binary profiles. Once installed, all RTStatement and RTResultSet calls made during application runtime will be logged to a file (or standard output), which can then be inspected to verify expected behavior and trace errors. Note that only those calls made to the underlying RTStatement and RTResultSet call interface at runtime are audited. An AuditedProfile instance is invoked at application runtime to pass calls made by the runtime to the auditor instance. A PrintWriterAuditor is used as the auditor instance.

The auditor installer utility is invoked as follows:

    % java sqlj.runtime.profile.util.AuditorInstaller [options] profile.ser...

Auditor installer options are as follows:

-Cuninstall
  Removes the debugging class-auditors that were installed during the last invocation of the auditor installer utility. If this option is not specified, class-auditors are installed rather than removed. If the uninstall option is used, all other options are ignored.
-Clog=logFileName
  Specifies the name of the log file into which call audits will be appended at runtime. If this option is not specified, audits will be written to standard out at runtime. Note that audits are appended to the log file rather than creating a new log file for each program run. Appending allows multiple program runs to be logged in the same file, and also allows two debugging auditors to write the same log during the same program run.
-Cprefix=auditorLogPrefixString
  Specifies the prefix which will precede each audit line created by this auditor installation. If this option is not specified, no prefix is used. The prefix option is useful when multiple debugging auditors are installed that write to the same log file.
-Cdepth=debugLayeringDepth
  Specifies an integer number that identifies the profile layer number to audit at runtime. Often a particular program will use a number of different customized profile layers, each of which provides some level of additional functionality to the runtime. Some calls made to one layer will not be passed on to lower layers. By specifying a depth option, it is possible to determine exactly what calls are being made at a particular layer. If this option is not specified or the number specified exceeds the layers available at runtime, the maximum depth possible is used. A depth of -1 indicates to use maximum depth possible. Use depth 0 to audit the sequence of calls issued directly from the SQLJ runtime engine and code generation.

Note that the AuditorInstaller utility is a Customizer that uses the CustomizerHarness to map itself over a series of profiles. Accordingly, it also inherits all of the options made available by the CustomizerHarness.

Usage notes:

- Each time this utility is invoked (without the -uninstall option), it installs another debugging auditor; previously installed auditors are not removed. When a program is run for which mutliple debugging auditors are installed, all of the auditors installed will be used. This feature can be used to debug different aspects of the program at the same time. A useful application of this feature is to install a different debug auditor for each runtime layer (see the depth option above).
- Debugging auditors can only be removed by invoking this utility with the -uninstall option. Note that the -uninstall option only removes the last auditor installed. To remove all debugging auditors installed in a profile, reissue the command using the -unistall option until an "unchanged" message is reported for the profile in question.

See Also:
  Auditor, AuditedProfile, PrintWriterAuditor, CustomizerHarness

## Constructor Index

o AuditorInstaller()

## Method Index

o acceptsConnection(Connection)
o customize(Profile, Connection, ErrorLog)
  Customizes the passed profile.
o getDepth()
o getLog()
o getPrefix()
o getUninstall()
o main(String[])
  The main command-line entry point for this method.
o newCustomization(Customization)
  Returns a new audited customization object which will wrap the passed customization.
o setDepth(int)
o setLog(String)
o setPrefix(String)
o setUninstall(boolean)

## Constructors

o AuditorInstaller

     public AuditorInstaller()

## Methods

o acceptsConnection

     public boolean acceptsConnection(Connection conn)

o getUninstall

     public boolean getUninstall()

o setUninstall

     public void setUninstall(boolean uninstall)

o getLog

     public String getLog()

o setLog

     public void setLog(String logFileName)

o getPrefix

     public String getPrefix()

o setPrefix

     public void setPrefix(String auditPrefix)

o getDepth

     public int getDepth()

o setDepth

     public void setDepth(int debugDepth)

o customize

     public boolean customize(Profile p,
                              Connection conn,
                              ErrorLog log)

  Customizes the passed profile. If installing, a new audited customization wraps and replaces each customization currently registered in the profile, and a catch-all audited customization is added to the end of the list for the default case. If de-installing, each audited customization instance registered in the profile is replaced with the customization it wraps.

  Returns:
    s true if profile was customized, false otherwise.

o newCustomization

     protected AuditorInstaller. AuditedCustomization newCustomization(Customization wrappedCustomization)

  Returns a new audited customization object which will wrap the passed customization. The audited customization returned will be installed into the profile in place of the passed customization argument. Subclasses should override this method if a different audited customization instance is desired.

o main

     public static void main(String args[])

  The main command-line entry point for this method. See the class overview for a description of the command-line options and functionality.

Class sqlj.runtime.profile.util.AuditorInstallerBeanInfo

# Class sqlj.runtime.profile.util.AuditorInstallerBeanInfo

    java.lang.Object
       |
       +----java.beans.SimpleBeanInfo
               |
               +----sqlj.runtime.profile.util.CustomizerPropertyInfo
                       |
                       +----sqlj.runtime.profile.util.AuditorInstallerBeanInfo

public class AuditorInstallerBeanInfo
extends CustomizerPropertyInfo

This class describes the properties that the AuditorInstaller component supports.

## Constructor Index

o AuditorInstallerBeanInfo()

## Constructors

o AuditorInstallerBeanInfo

     public AuditorInstallerBeanInfo()

Class sqlj.runtime.profile.util.CustomizerHarness

# Class sqlj.runtime.profile.util.CustomizerHarness

    java.lang.Object
       |
       +----sqlj.runtime.profile.util.CustomizerHarness

public class CustomizerHarness
extends Object

This class is a command-line utility which maps the customize method of a customizer instance over a collection of profiles. This utility assumes that the profiles exist in file format as serialized objects. Profiles can be customized individually, on a file-by-file basis, or as a collection packaged as a JAR.

Invoke the command line utility using the "-help" options for a description of options.

All output produced by this utility is written to standard out.

## Variable Index

o URL_CONNECT
  The client should specify this string as the user option value if only the url is to be used to establish a connection.

## Constructor Index

o CustomizerHarness()

## Method Index

o customize(String, ErrorLog)
  Uses the current customizer and connection to customize the profile or profiles contained in the file with the given name.
o customizeJar(ProfileIOContext)
  Uses the current customizer and connection to customize the profiles contained in the passed JAR file.
o customizeJar(String, ErrorLog)
  Uses the current customizer and connection to customize the profiles contained in the file with the given name.
o customizeProfile(ProfileIOContext)
  Uses the current customizer and connection to customize the profile contained in the passed IOContext.
o customizeProfiles(Enumeration)
  Uses the current customizer and connection to customize the enumerated profiles.
o customizeSer(String, ErrorLog)
  Uses the current customizer and connection to customize the profile contained in the file with the given name.
o getBackup()
o getConnection(ErrorLog)
  Returns the connection specified by the url, user, password and driver options.
o getContext()
o getCustomizer()
o getDigests()
o getDriver()
o getHelp()
o getPassword()
o getUrl()
o getUser()
o hasValidContext(Profile)
  Returns true if the profile has a context name that matches one of those listed in the context option, false otherwise.
o isValidFilename(String)
  Returns true if the filename is one that the "customize" method understands, false otherwise.
o isVerbose()
o main(String[])
  The command-line based entry point for this class.
o setBackup(boolean)
o setContext(String)
o setCustomizer(ProfileCustomizer)
o setDigests(String)
  Sets the digest algorithms to use when writing manifest entry for customized profile within a jar file.
o setDriver(String)
o setHelp(boolean)
o setPassword(String)
o setUrl(String)
o setUser(String)
o setVerbose(boolean)

## Variables

o URL_CONNECT

     public static final String URL_CONNECT

  The client should specify this string as the user option value if only the url is to be used to establish a connection.

## Constructors

o CustomizerHarness

     public CustomizerHarness()

## Methods

o getCustomizer

     public ProfileCustomizer getCustomizer()

o setCustomizer

     public void setCustomizer(ProfileCustomizer customizer)

o getHelp

     public boolean getHelp()

o setHelp

     public void setHelp(boolean help)

o getBackup

     public boolean getBackup()

o setBackup

     public void setBackup(boolean backup)

o customize

     public int customize(String filename,
                          ErrorLog log)

  Uses the current customizer and connection to customize the profile or profiles contained in the file with the given name. Errors are written to the passed error log. The filename must have either a ".ser" or ".jar" extension.

o customizeJar

     public int customizeJar(String filename,
                             ErrorLog log)

  Uses the current customizer and connection to customize the profiles contained in the file with the given name. Errors are written to the passed error log. The filename must represent a JAR file.

o customizeJar

     public int customizeJar(ProfileIOContext jar)

  Uses the current customizer and connection to customize the profiles contained in the passed JAR file.

  A status if returned describing the result of the call. PIO_ERROR is returned if an error occurs during the customization of any profile. If all profiles are remain unmodified after customization, PIO_UNMODIFIED is returned. Otherwise, PIO_MODIFIED is returned, indicating least one profile was modified. The customization terminates after the first profile that fails to be customized. Subsequent profiles are not read or customized.

  Errors are written to the error log of the passed io context. The loader of the passed io context is used to load all profiles contained in the JAR.

  Each jar entry in the input is written to the JAR output sequentially as it is customized. Accordingly, both the input and the output of the passed IO context must be able to be opened concurrently.

  Parameters:
    jar - a ProfileIOContext describes the JAR file to customize.
  Returns:
    the status of the operation otherwise.

o customizeProfiles

     public int customizeProfiles(Enumeration profiles)

  Uses the current customizer and connection to customize the enumerated profiles. Each profile in the enumeration is described using a ProfileIOContext that is used to read and write the profile.

  A status if returned describing the result of the call. PIO_ERROR is returned if an error occurs during the customization of any profile. If all profiles are remain unmodified after customization, PIO_UNMODIFIED is returned. Otherwise, PIO_MODIFIED is returned, indicating that at least one profile was modified. The customization terminates after the first profile that fails to be customized. Subsequent profiles are not read or customized.

  Errors are written to the error log particular to the context containing the profile in which the error occurred. The particular profile context's Loader is used to instantiate the profile.

  Parameters:
    profiles - an enumeration of ProfileIOContexts describing a collection of profiles.

o customizeProfile

     public int customizeProfile(ProfileIOContext io)

  Uses the current customizer and connection to customize the profile contained in the passed IOContext. Errors are written to the error log of the passed context. The context's Loader is used to instantiate the profile.

o customizeSer

     public int customizeSer(String filename,
                             ErrorLog log)

  Uses the current customizer and connection to customize the profile contained in the file with the given name. Errors are written to the passed error log. The filename must represent an SER file.

o getContext

     public String getContext()

o setContext

     public void setContext(String context)

o hasValidContext

     public boolean hasValidContext(Profile profile)

  Returns true if the profile has a context name that matches one of those listed in the context option, false otherwise. If the context option was not specified, returns true.

o getDriver

     public String getDriver()

o setDriver

     public void setDriver(String driver)

o getDigests

     public String getDigests()

o setDigests

     public void setDigests(String digests)

  Sets the digest algorithms to use when writing manifest entry for customized profile within a jar file.

  Parameters:
    digests - a comma-separatd list of digest names (e.g. "SHA,MD5").

o getConnection

     public Connection getConnection(ErrorLog log) throws SQLException

  Returns the connection specified by the url, user, password and driver options.

  Throws: SQLException
    if the connection cannot be established.

o getUrl

     public String getUrl()

o setUrl

     public void setUrl(String url)

o isVerbose

     public boolean isVerbose()

o setVerbose

     public void setVerbose(boolean verbose)

o getUser

     public String getUser()

o setUser

     public void setUser(String user)

o getPassword

     public String getPassword()

o setPassword

     public void setPassword(String password)

o isValidFilename

     public static boolean isValidFilename(String filename)

  Returns true if the filename is one that the "customize" method understands, false otherwise.

o main

     public static void main(String args[])

  The command-line based entry point for this class.

Class sqlj.runtime.profile.util.CustomizerHarnessBeanInfo

# Class sqlj.runtime.profile.util.CustomizerHarnessBeanInfo

    java.lang.Object
       |
       +----java.beans.SimpleBeanInfo
               |
               +----sqlj.runtime.profile.util.CustomizerPropertyInfo
                       |
                       +----sqlj.runtime.profile.util.CustomizerHarnessBeanInfo

public class CustomizerHarnessBeanInfo
extends CustomizerPropertyInfo

This class describes the properties that the CustomizerHarness component supports.

## Constructor Index

o CustomizerHarnessBeanInfo()

## Constructors

o CustomizerHarnessBeanInfo

     public CustomizerHarnessBeanInfo()

Class sqlj.runtime.profile.util.CustomizerPropertyInfo

# Class sqlj.runtime.profile.util.CustomizerPropertyInfo

    java.lang.Object
       |
       +----java.beans.SimpleBeanInfo
               |
               +----sqlj.runtime.profile.util.CustomizerPropertyInfo

public abstract class CustomizerPropertyInfo
extends SimpleBeanInfo

This class is an abstract helper class that provides a framework for describing the properties of customizer beans. It is expected (but not required) that a customizer class called "Foo" that supports some number of properties will also include a "FooBeanInfo" class that subclasses CustomizerPropertyInfo.

## Variable Index

o m_props

## Constructor Index

o CustomizerPropertyInfo(Class, String[][])
  Creates a new customizer property info class using the passed customizer class and property array.

## Method Index

o getPropertyDescriptors()

## Variables

o m_props

     protected PropertyDescriptor m_props[]

## Constructors

o CustomizerPropertyInfo

     public CustomizerPropertyInfo(Class customizer,
                                   String props[][])

  Creates a new customizer property info class using the passed customizer class and property array. The props array passed is a two dimensional array of strings that describe the properties supported by the customizer in question.

  For each property supported, a two-element array of strings exists with the first element being the name of the property, and the second being a short description of the property. For example:

      {
        { "verbose", "displays info about the customization process" },
        { "uninstall", "removes any previous customizations" }
      }

  Note: if the creation of property descriptors causes an introspection exception, the property descriptors will default to the super class implementation.

  Parameters:
    customizer - the class of the customizer which supports the options
    props - a two dimensional array of strings describing the properties supported.

## Methods

o getPropertyDescriptors

     public PropertyDescriptor[] getPropertyDescriptors()

  Returns:
    the property descriptors for this class
  Overrides:
    getPropertyDescriptors in class SimpleBeanInfo

Class sqlj.runtime.profile.util.DataCustomizer

# Class sqlj.runtime.profile.util.DataCustomizer

    java.lang.Object
       |
       +----sqlj.runtime.profile.util.DataCustomizer

public class DataCustomizer
extends Object

A data customizer object provides a framework for customizing a profile data object. For each data member in the original profile data object, a "customizeXXX" method is called. Subclasses will override the "customizeXXX" methods that they want to provide with special behavior, and leave all other methods to the default implementation which keeps the data member as it originally appeared.

If no subclass overrides any method to customize part of the profile data object, then the original profile data object is used unchanged. This object keeps track of which data members were changed and were not changed to only create a new profile data object (or entry info or type info object) when the original has been modified. Thus, data will be shared with the original profile whenever possible.

If a new profile data, entry info or type info object is required, the reference implementation (package jsq.runtime.profile.ref) of these classes is used. Subclasses may also override the "newXXX" methods to create their own profile data, entry info or type info object instead of the reference implementations.

## Variable Index

o PARAM
  Constant used to indicate a type info object that represents an entry parameter.
o RESULT
  Constant used to indicate a type info object that represents an entry result.

## Constructor Index

o DataCustomizer()

## Method Index

o customizeData(ProfileData)
  Returns a customized version of the the passed profile data object.
o customizeDescriptor(ProfileData, EntryInfo, int)
  Returns a customized version of the descriptor component of the passed entry info object, which appears at index "entryNum" in profile data object "data".
o customizeEntry(ProfileData, EntryInfo, int)
  Returns a customized version of the passed entry info object, which appears at index "entryNum" in profile data object "data".
o customizeExecType(ProfileData, EntryInfo, int)
  Returns a customized version of the execute type component of the passed entry info object, which appears at index "entryNum" in profile data object "data".
o customizeJavaTypeName(ProfileData, EntryInfo, int, TypeInfo, int, int)
  Returns a customized version of the java type name component of the passed type info object, which appears at index "typeNum" in the entry info object "entry", which appears at index "entryNum" in profile data object "data".
o customizeLineNumber(ProfileData, EntryInfo, int)
  Returns a customized version of the source file line number component of the passed entry info object, which appears at index "entryNum" in profile data object "data".
o customizeMarkerIndex(ProfileData, EntryInfo, int, TypeInfo, int, int)
  Returns a customized version of the marker index component of the passed type info object, which appears at index "typeNum" in the entry info object "entry", which appears at index "entryNum" in profile data object "data".
o customizeMode(ProfileData, EntryInfo, int, TypeInfo, int, int)
  Returns a customized version of the mode component of the passed type info object, which appears at index "typeNum" in the entry info object "entry", which appears at index "entryNum" in profile data object "data".
o customizeName(ProfileData, EntryInfo, int, TypeInfo, int, int)
  Returns a customized version of the name component of the passed type info object, which appears at index "typeNum" in the entry info object "entry", which appears at index "entryNum" in profile data object "data".
o customizeResultSetName(ProfileData, EntryInfo, int)
  Returns a customized version of the result set name component of the passed entry info object, which appears at index "entryNum" in profile data object "data".
o customizeResultSetType(ProfileData, EntryInfo, int)
  Returns a customized version of the result set type component of the passed entry info object, which appears at index "entryNum" in profile data object "data".
o customizeRole(ProfileData, EntryInfo, int)
  Returns a customized version of the role component of the passed entry info object, which appears at index "entryNum" in profile data object "data".
o customizeSourceFile(ProfileData)
  Returns a customized version of the source file component of the passed profile data object.
o customizeSQLString(ProfileData, EntryInfo, int)
  Returns a customized version of the sql string component of the passed entry info object, which appears at index "entryNum" in profile data object "data".
o customizeSQLType(ProfileData, EntryInfo, int, TypeInfo, int, int)
  Returns a customized version of the sql type component of the passed type info object, which appears at index "typeNum" in the entry info object "entry", which appears at index "entryNum" in profile data object "data".
o customizeStatementType(ProfileData, EntryInfo, int)
  Returns a customized version of the statement type component of the passed entry info object, which appears at index "entryNum" in profile data object "data".
o customizeType(ProfileData, EntryInfo, int, TypeInfo, int, int)
  Returns a customized version of the passed type info object, which appears at index "typeNum" in the entry info object "entry", which appears at index "entryNum" in profile data object "data".
o main(String[])
  The testing entry point for a data customizer.
o newEntryInfo(ProfileData, EntryInfo, int, String, int, int, int, int, Object, TypeInfo[], TypeInfo[], int, String)
  Creates and returns a new entry info object whose data corresponds to the values passed.
o newProfileData(ProfileData, EntryInfo[], Profile, String)
  Creates and returns a new profile data object whose data corresponds to the values passed.
o newTypeInfo(ProfileData, EntryInfo, int, TypeInfo, int, int, String, int, String, int, int)
  Creates and returns a new type info object whose data corresponds to the values passed.

## Variables

o RESULT

     public static final int RESULT

  Constant used to indicate a type info object that represents an entry result.

o PARAM

     public static final int PARAM

  Constant used to indicate a type info object that represents an entry parameter.

## Constructors

o DataCustomizer

     public DataCustomizer()

## Methods

o customizeData

     public ProfileData customizeData(ProfileData data)

  Returns a customized version of the the passed profile data object. A profile data object is customized by customizing each of its components. If a component has changed, the newProfileData method is called to create a new profile data instance and populate it with the changed data. Otherwise, the original profile data object is returned.

  Parameters:
    data - the profile data object to customize.
  Returns:
    a customized profile data object.
  See Also:
    newProfileData

o customizeSourceFile

     public String customizeSourceFile(ProfileData data)

  Returns a customized version of the source file component of the passed profile data object. By default, the current source file component of the data is returned. Subclasses should override this method if nondefault behavior is desired.

  Parameters:
    data - the profile data object containing the source file to customize.
  Returns:
    a customized source file
  See Also:
    getSourceFile

o newProfileData

     public ProfileData newProfileData(ProfileData origData,
                                       EntryInfo entries[],
                                       Profile profile,
                                       String sourceFile)

  Creates and returns a new profile data object whose data corresponds to the values passed. By default, the reference implementation of the profile data class is used. Subclasses whould override if another class is to be substituted instead.

  Parameters:
    origData - the original profile data object.
    entries - the new entires for the profile data object.
    profile - the profile associated with the new profile data object.
    sourceFile - the customized name of the source file for this profile
  Returns:
    a new profile data object.
  See Also:
    ProfileDataImpl

o customizeEntry

     public EntryInfo customizeEntry(ProfileData data,
                                     EntryInfo entry,
                                     int entryNum)

  Returns a customized version of the passed entry info object, which appears at index "entryNum" in profile data object "data". An entry info object is customized by customizing each of its components. If a component has changed, the newEntryInfo method is called to create a new entry info instance and populate it with the changed data. Otherwise, the original entry info object is returned.

  Parameters:
    data - the profile data object containing the entry.
    entry - the entry info object to customize.
    entryNum - the 0-based index at which the entry occurs within the profile data.
  Returns:
    a customized entry info object.
  See Also:
    newEntryInfo

o newEntryInfo

     public EntryInfo newEntryInfo(ProfileData origData,
                                   EntryInfo origEntry,
                                   int entryNum,
                                   String sqlString,
                                   int stmtType,
                                   int execType,
                                   int role,
                                   int resultSetType,
                                   Object desc,
                                   TypeInfo params[],
                                   TypeInfo results[],
                                   int lineNumber,
                                   String resultSetName)

  Creates and returns a new entry info object whose data corresponds to the values passed. By default, the reference implementation of the entry info class is used. Subclasses whould override if another class is to be substituted instead.

  Parameters:
    origData - the original profile data object.
    origEntry - the original entry info object.
    entryNum - the index at which this entry appears in the profile data.
    sqlString - the new text of the sql operation
    stmtType - the new statement type of the entry
    execType - the new exceute type of the entry
    role - the new role of the entry
    resultSetType - the new result set type of the entry
    desc - the new descriptor of the entry
    params - the new set of parameters for the entry
    results - the new set of results for the entry
    lineNumber - the new source file line number for the entry
    resultSetName - the new result set name for the entry
  Returns:
    a new entry info object.
  See Also:
    EntryInfoImpl

o customizeSQLString

     public String customizeSQLString(ProfileData data,
                                      EntryInfo entry,
                                      int entryNum)

  Returns a customized version of the sql string component of the passed entry info object, which appears at index "entryNum" in profile data object "data". By default, the current sql string component of the entry is returned. Subclasses should override this method if nondefault behavior is desired.

  Parameters:
    data - the profile data object containing the entry.
    entry - the entry info object containing the sql string to customize.
    entryNum - the 0-based index at which the entry occurs within the profile data.
  Returns:
    a customized sql string
  See Also:
    getSQLString

o customizeResultSetName

     public String customizeResultSetName(ProfileData data,
                                          EntryInfo entry,
                                          int entryNum)

  Returns a customized version of the result set name component of the passed entry info object, which appears at index "entryNum" in profile data object "data". By default, the current result set name component of the entry is returned. Subclasses should override this method if nondefault behavior is desired.

  Parameters:
    data - the profile data object containing the entry.
    entry - the entry info object containing the result set name to customize.
    entryNum - the 0-based index at which the entry occurs within the profile data.
  Returns:
    a customized result set name
  See Also:
    getResultSetName

o customizeStatementType

     public int customizeStatementType(ProfileData data,
                                       EntryInfo entry,
                                       int entryNum)

  Returns a customized version of the statement type component of the passed entry info object, which appears at index "entryNum" in profile data object "data". By default, the current statement type component of the entry is returned. Subclasses should override this method if nondefault behavior is desired.

  Parameters:
    data - the profile data object containing the entry.
    entry - the entry info object containing the statement type to customize.
    entryNum - the 0-based index at which the entry occurs within the profile data.
  Returns:
    a customized statement type
  See Also:
    getStatementType

o customizeExecType

     public int customizeExecType(ProfileData data,
                                  EntryInfo entry,
                                  int entryNum)

  Returns a customized version of the execute type component of the passed entry info object, which appears at index "entryNum" in profile data object "data". By default, the current execute type component of the entry is returned. Subclasses should override this method if nondefault behavior is desired.

  Parameters:
    data - the profile data object containing the entry.
    entry - the entry info object containing the execute type to customize.
    entryNum - the 0-based index at which the entry occurs within the profile data.
  Returns:
    a customized execute type
  See Also:
    getExecuteType

o customizeRole

     public int customizeRole(ProfileData data,
                              EntryInfo entry,
                              int entryNum)

  Returns a customized version of the role component of the passed entry info object, which appears at index "entryNum" in profile data object "data". By default, the current role component of the entry is returned. Subclasses should override this method if nondefault behavior is desired.

  Parameters:
    data - the profile data object containing the entry.
    entry - the entry info object containing the role to customize.
    entryNum - the 0-based index at which the entry occurs within the profile data.
  Returns:
    a customized role
  See Also:
    getRole

o customizeResultSetType

     public int customizeResultSetType(ProfileData data,
                                       EntryInfo entry,
                                       int entryNum)

  Returns a customized version of the result set type component of the passed entry info object, which appears at index "entryNum" in profile data object "data". By default, the current result set type component of the entry is returned. Subclasses should override this method if nondefault behavior is desired.

  Parameters:
    data - the profile data object containing the entry.
    entry - the entry info object containing the result set type to customize.
    entryNum - the 0-based index at which the entry occurs within the profile data.
  Returns:
    a customized result set type
  See Also:
    getResultSetType

o customizeDescriptor

     public Object customizeDescriptor(ProfileData data,
                                       EntryInfo entry,
                                       int entryNum)

  Returns a customized version of the descriptor component of the passed entry info object, which appears at index "entryNum" in profile data object "data". By default, the current descriptor component of the entry is returned. Subclasses should override this method if nondefault behavior is desired.

  Parameters:
    data - the profile data object containing the entry.
    entry - the entry info object containing the descriptor to customize.
    entryNum - the 0-based index at which the entry occurs within the profile data.
  Returns:
    a customized descriptor
  See Also:
    getDescriptor

o customizeLineNumber

     public int customizeLineNumber(ProfileData data,
                                    EntryInfo entry,
                                    int entryNum)

  Returns a customized version of the source file line number component of the passed entry info object, which appears at index "entryNum" in profile data object "data". By default, the current line number of the entry is returned. Subclasses should override this method if nondefault behavior is desired.

  Parameters:
    data - the profile data object containing the entry.
    entry - the entry info object containing the line number to customize.
    entryNum - the 0-based index at which the entry occurs within the profile data.
  Returns:
    a customized line number
  See Also:
    getLineNumber

o customizeType

     public TypeInfo customizeType(ProfileData data,
                                   EntryInfo entry,
                                   int entryNum,
                                   TypeInfo type,
                                   int typeNum,
                                   int typeRole)

  Returns a customized version of the passed type info object, which appears at index "typeNum" in the entry info object "entry", which appears at index "entryNum" in profile data object "data". The "typeRole" parameter describes the way in which the type to customize appears in the original entry info (either as a parameter or result). A type info object is customized by customizing each of its components. If a component has changed, the newTypeInfo method is called to create a new type info instance and populate it with the changed data. Otherwise, the original type info object is returned.

  Parameters:
    data - the profile data object containing the entry.
    entry - the entry info object containing the type.
    entryNum - the 0-based index at which the entry occurs within the profile data.
    type - the type info object to customize.
    typeNum - the index at whic the type appears in the entry either as a result or parameter.
    typeRole - is RESULT if the type is a result, PARAM if the type is a parameter in the corresponding entry.
  Returns:
    a customized type info object.
  See Also:
    newTypeInfo, RESULT, PARAM

o newTypeInfo

     public TypeInfo newTypeInfo(ProfileData origData,
                                 EntryInfo origEntry,
                                 int entryNum,
                                 TypeInfo origType,
                                 int typeNum,
                                 int typeRole,
                                 String javaType,
                                 int sqlType,
                                 String name,
                                 int mode,
                                 int markerIndex)

  Creates and returns a new type info object whose data corresponds to the values passed. By default, the reference implementation of the type info class is used. Subclasses whould override if another class is to be substituted instead.

  Parameters:
    origData - the original profile data object.
    origEntry - the original entry info object.
    entryNum - the index at which this entry appears in the profile data.
    type - the type info object to customize.
    typeNum - the index at which the type appears in the entry either as a result or parameter.
    typeRole - is RESULT if the type is a result, PARAM if the type is a parameter in the corresponding entry.
    javaType - the name of the new java type of the type
    sqlType - the new sql type of the type
    name - the new name of the type
    mode - the new mode of the type
    markerIndex - the new marker index of the type
  Returns:
    a new type info object.
  See Also:
    TypeInfoImpl, RESULT, PARAM

o customizeSQLType

     public int customizeSQLType(ProfileData data,
                                 EntryInfo entry,
                                 int entryNum,
                                 TypeInfo type,
                                 int typeNum,
                                 int typeRole)

  Returns a customized version of the sql type component of the passed type info object, which appears at index "typeNum" in the entry info object "entry", which appears at index "entryNum" in profile data object "data". The "typeRole" parameter describes the way in which the type to customize appears in the original entry info (either as a parameter or result). By default, the current sql type component of the type is returned. Subclasses should override this method if nondefault behavior is desired.

  Parameters:
    data - the profile data object containing the entry.
    entry - the entry info object containing the type.
    entryNum - the 0-based index at which the entry occurs within the profile data.
    type - the type info object to customize.
    typeNum - the index at whic the type appears in the entry either as a result or parameter.
    typeRole - is RESULT if the type is a result, PARAM if the type is a parameter in the corresponding entry.
  Returns:
    a customized sql type
  See Also:
    getSQLType

o customizeJavaTypeName

     public String customizeJavaTypeName(ProfileData data,
                                         EntryInfo entry,
                                         int entryNum,
                                         TypeInfo type,
                                         int typeNum,
                                         int typeRole)

  Returns a customized version of the java type name component of the passed type info object, which appears at index "typeNum" in the entry info object "entry", which appears at index "entryNum" in profile data object "data". The "typeRole" parameter describes the way in which the type to customize appears in the original entry info (either as a parameter or result). By default, the current java type name component of the type is returned. Subclasses should override this method if nondefault behavior is desired.

  Parameters:
    data - the profile data object containing the entry.
    entry - the entry info object containing the type.
    entryNum - the 0-based index at which the entry occurs within the profile data.
    type - the type info object to customize.
    typeNum - the index at whic the type appears in the entry either as a result or parameter.
    typeRole - is RESULT if the type is a result, PARAM if the type is a parameter in the corresponding entry.
  Returns:
    a customized java type name
  See Also:
    getJavaTypeName

o customizeName

     public String customizeName(ProfileData data,
                                 EntryInfo entry,
                                 int entryNum,
                                 TypeInfo type,
                                 int typeNum,
                                 int typeRole)

  Returns a customized version of the name component of the passed type info object, which appears at index "typeNum" in the entry info object "entry", which appears at index "entryNum" in profile data object "data". The "typeRole" parameter describes the way in which the type to customize appears in the original entry info (either as a parameter or result). By default, the current name component of the type is returned. Subclasses should override this method if nondefault behavior is desired.

  Parameters:
    data - the profile data object containing the entry.
    entry - the entry info object containing the type.
    entryNum - the 0-based index at which the entry occurs within the profile data.
    type - the type info object to customize.
    typeNum - the index at whic the type appears in the entry either as a result or parameter.
    typeRole - is RESULT if the type is a result, PARAM if the type is a parameter in the corresponding entry.
  Returns:
    a customized name
  See Also:
    getName

o customizeMode

     public int customizeMode(ProfileData data,
                              EntryInfo entry,
                              int entryNum,
                              TypeInfo type,
                              int typeNum,
                              int typeRole)

  Returns a customized version of the mode component of the passed type info object, which appears at index "typeNum" in the entry info object "entry", which appears at index "entryNum" in profile data object "data". The "typeRole" parameter describes the way in which the type to customize appears in the original entry info (either as a parameter or result). By default, the current mode component of the type is returned. Subclasses should override this method if nondefault behavior is desired.

  Parameters:
    data - the profile data object containing the entry.
    entry - the entry info object containing the type.
    entryNum - the 0-based index at which the entry occurs within the profile data.
    type - the type info object to customize.
    typeNum - the index at whic the type appears in the entry either as a result or parameter.
    typeRole - is RESULT if the type is a result, PARAM if the type is a parameter in the corresponding entry.
  Returns:
    a customized mode
  See Also:
    getMode

o customizeMarkerIndex

     public int customizeMarkerIndex(ProfileData data,
                                     EntryInfo entry,
                                     int entryNum,
                                     TypeInfo type,
                                     int typeNum,
                                     int typeRole)

  Returns a customized version of the marker index component of the passed type info object, which appears at index "typeNum" in the entry info object "entry", which appears at index "entryNum" in profile data object "data". The "typeRole" parameter describes the way in which the type to customize appears in the original entry info (either as a parameter or result). By default, the current marker index component of the type is returned. Subclasses should override this method if nondefault behavior is desired.

  Parameters:
    data - the profile data object containing the entry.
    entry - the entry info object containing the type.
    entryNum - the 0-based index at which the entry occurs within the profile data.
    type - the type info object to customize.
    typeNum - the index at whic the type appears in the entry either as a result or parameter.
    typeRole - is RESULT if the type is a result, PARAM if the type is a parameter in the corresponding entry.
  Returns:
    a customized marker index
  See Also:
    getMarkerIndex

o main

     public static void main(String args[]) throws Exception

  The testing entry point for a data customizer. This call is used for unit testing only. It verifies that running the default customizer on a particular profile produces an unchanged profile. It outputs "failed" on failure, "success" on success. Outputs usage if no arguments passed.

  Throws: Exception
    if an error occurs.

Class sqlj.runtime.profile.util.PrintWriterAuditor

# Class sqlj.runtime.profile.util.PrintWriterAuditor

    java.lang.Object
       |
       +----sqlj.runtime.profile.util.PrintWriterAuditor

public class PrintWriterAuditor
extends Object
implements Auditor

A print writer auditor implements the auditor interface by logging all registered method calls, returns and exceptions to a particular print writer.

## Constructor Index

o PrintWriterAuditor(PrintWriter)
  Creates a new auditor which will log to the passed print writer.
o PrintWriterAuditor(PrintWriter, String)
  Creates a new auditor which will log to the passed print writer.

## Method Index

o registerCall(Object, String, Object[])
  Registers the call by logging it to the underlying print writer.
o registerException(Object, String, Exception)
  Registers the exception by logging it to the underlying print writer.
o registerReturn(Object, String, Object)
  Registers the return by logging it to the underlying print writer.

## Constructors

o PrintWriterAuditor

     public PrintWriterAuditor(PrintWriter ps)

  Creates a new auditor which will log to the passed print writer. All logs will be written with no prefix.

  Parameters:
    ps - the print writer into which registers calls will be logged.

o PrintWriterAuditor

     public PrintWriterAuditor(PrintWriter ps,
                               String prefix)

  Creates a new auditor which will log to the passed print writer. All logs will be prefixed with the given prefix string.

  Parameters:
    ps - the print writer into which registers calls will be logged.
    prefix - the prefix of each log entry for this auditor.

## Methods

o registerCall

     public void registerCall(Object obj,
                              String methodName,
                              Object args[])

  Registers the call by logging it to the underlying print writer. The object is printed followed by a dot followed by the method name followed by a comma-seperated list of arguments enclosed in parenthisis: obj.method(arg1,...).

o registerReturn

     public void registerReturn(Object obj,
                                String methodName,
                                Object returnVal)

  Registers the return by logging it to the underlying print writer. The object is printed followed by a dot followed by the method name followed by the text "returned" followed by the return value: obj.method returned result.

o registerException

     public void registerException(Object obj,
                                   String methodName,
                                   Exception e)

  Registers the exception by logging it to the underlying print writer. The object is printed followed by a dot followed by the method name followed by the text "threw exception" followed by the exception itself: obj.method threw exception e.

Class sqlj.runtime.profile.util.ProfileCustomizerEditor

# Class sqlj.runtime.profile.util.ProfileCustomizerEditor

    java.lang.Object
       |
       +----java.beans.PropertyEditorSupport
               |
               +----sqlj.runtime.profile.util.ProfileCustomizerEditor

public class ProfileCustomizerEditor
extends PropertyEditorSupport

This class provides a text-editor for creating ProfileCustomizer instances from text strings. This editor does not provide graphical editing support.

## Constructor Index

o ProfileCustomizerEditor()

## Method Index

o getAsText()
o setAsText(String)
  Set the property value by parsing a given String.
o setValue(Object)

## Constructors

o ProfileCustomizerEditor

     public ProfileCustomizerEditor()

## Methods

o getAsText

     public String getAsText()

  Returns:
    The property value as a string suitable for presentation to a human to edit.

    Returns "null" is the value can't be expressed as a string.

    If a non-null value is returned, then the PropertyEditor should be prepared to parse that string back in setAsText().

  Overrides:
    getAsText in class PropertyEditorSupport

o setAsText

     public void setAsText(String text) throws IllegalArgumentException

  Set the property value by parsing a given String. It is expected that the string contains the name of a ProfileCustomizer class name, which can be instantiated via Beans.instantiate.

  Parameters:
    text - The string to be parsed
  Throws: IllegalArgumentException
    if the customizer cannot be instantiated.
  Overrides:
    setAsText in class PropertyEditorSupport

o setValue

     public void setValue(Object value)

  Overrides:
    setValue in class PropertyEditorSupport

Class sqlj.runtime.profile.util.ProfilePrinter

# Class sqlj.runtime.profile.util.ProfilePrinter

    java.lang.Object
       |
       +----sqlj.runtime.profile.util.ProfilePrinter

public class ProfilePrinter
extends Object
implements ProfileCustomizer

A ProfilePrinter is a utility class used to pretty-print a profile. Since profiles typically exist as serialized objects, it is nice to have a way to view their contents in plain text. A profile printer may be called as a command-line tool, passing a profile name as an argument, or as a runtime API, passing a profile or parts of a profile as arguments.

Invoke the class with no arguments for a usage listing.

## Constructor Index

o ProfilePrinter()
  Creates a new profile printer with output stream System.out
o ProfilePrinter(PrintWriter)
  Creates a new profile printer whose output stream is the passed print writer.

## Method Index

o acceptsConnection(Connection)
o customize(Profile, Connection, ErrorLog)
o main(String[])
  The main entry point takes the name of a profile as an argument and attempts to load the profile using the default class loader.
o print(Profile)
  Prints a profile to the current output stream.
o print(ProfileData)
  Prints a profile data object to the current output stream.
o print(ProfileData, EntryInfo)
  Prints a profile entry to the current output stream.
o print(ProfileData, int)
  Prints a profile entry to the current output stream.
o print(ProfileData, TypeInfo, int)
  Prints a profile type info object to the current output stream.
o setOutput(PrintWriter)
  Sets the output stream onto which subsequent calls to a `print` method will write.

## Constructors

o ProfilePrinter

     public ProfilePrinter()

  Creates a new profile printer with output stream System.out

o ProfilePrinter

     public ProfilePrinter(PrintWriter out)

  Creates a new profile printer whose output stream is the passed print writer.

  Parameters:
    out - the print writer onto which to writer output.

## Methods

o main

     public static void main(String args[])

  The main entry point takes the name of a profile as an argument and attempts to load the profile using the default class loader. If a profile is able to be instantiated, the print method is invoked on the resulting profile. All output is passed to System.out.

  See Also:
    print

o acceptsConnection

     public boolean acceptsConnection(Connection conn)

o customize

     public boolean customize(Profile profile,
                              Connection conn,
                              ErrorLog log)

o setOutput

     public void setOutput(PrintWriter out)

  Sets the output stream onto which subsequent calls to a `print` method will write. System.out is the default output stream.

o print

     public void print(Profile p)

  Prints a profile to the current output stream. The profile data object is printed using the appropriate print routine.

  Parameters:
    p - the profile to print.
  See Also:
    print

o print

     public void print(ProfileData data)

  Prints a profile data object to the current output stream. Each profile entry contained in the profile data is printed using the appropriate print routine.

  Parameters:
    data - the profile data object to print.
  See Also:
    print

o print

     public void print(ProfileData p,
                       int entryNum)

  Prints a profile entry to the current output stream. Each type info object contained in the entry is printed using the appropriate print routine.

  Parameters:
    p - the profile data object in which to find entries to print.
    entryNum - the number of the profile within the profile data to print, 0 based.
  See Also:
    print

o print

     public void print(ProfileData p,
                       EntryInfo entry)

  Prints a profile entry to the current output stream. Each type info object contained in the entry is printed using the appropriate print routine.

  Parameters:
    p - the profile data object in which to find entries to print.
    entry - the profile entry info to print.
  See Also:
    print

o print

     public void print(ProfileData data,
                       TypeInfo type,
                       int typeNum)

  Prints a profile type info object to the current output stream. The profile data handle is passed to obtain a profile by which the java class of a particular type info object may be printed (both the java type name in the type info object, and the name of its class as resolved by the current profile are printed).

  Parameters:
    data - the profile data object which contains the entry that contains the type.
    type - the type info object to print
    typeNum - the index at which the type appeared in the containing entry info object

Class sqlj.runtime.profile.util.SerProfileToClass

# Class sqlj.runtime.profile.util.SerProfileToClass

    java.lang.Object
       |
       +----sqlj.runtime.profile.util.SerProfileToClass

public class SerProfileToClass
extends Object

This class converts a serialized profile instance to class bytecode format. It does so by creating a java class that contains a static string member whose contents are the bytes of the serialized profile. The created class implements the SerializedProfile interface so it can be used as a handle by which the original serialized profile may be retrieved.

This class may be used either as a command-line tool or as a java callable class.

See Also:
  SerializedProfile

## Constructor Index

o SerProfileToClass(String)
  Creates a new serialized object translator that will work with a profile that has the given name.

## Method Index

o main(String[])
  The command-line entry point to this class transforms a file representing a serialized profile into a class inplementing the serialized profile interface.
o writeProfile(PrintWriter, InputStream)
  Translates the serialized profile contains in the given intput stream into a java class written to the given print writer.

## Constructors

o SerProfileToClass

     public SerProfileToClass(String profileName)

  Creates a new serialized object translator that will work with a profile that has the given name. The name should be the full name of the profile itself without an .ser or .class extensions ("x.y.z", for example).

  Parameters:
    profileName - the fully qualified name of the profile to translate.

## Methods

o main

     public static void main(String args[])

  The command-line entry point to this class transforms a file representing a serialized profile into a class inplementing the serialized profile interface. A number of options exists that allow management of intermediate files. Invoke the class with no arguments for a usage listing.

o writeProfile

     public void writeProfile(PrintWriter out,
                              InputStream bytes) throws IOException

  Translates the serialized profile contains in the given intput stream into a java class written to the given print writer. The resultant class is created in java source form, and thus must be compiled into java bytecode before being used. The class is written out including any neccessary package name and imports.

  Parameters:
    out - the print writer on which to write the resulting serialized profile class (in java source format).
    bytes - an input stream containing a serialized profile object.