All Packages This Package Previous Next
Class sqlj.runtime.profile.ref.ProfileWrapper
java.lang.Object
|
+----sqlj.runtime.profile.ref.ProfileWrapper
- public class ProfileWrapper
- extends Object
- implements ConnectedProfile
This class is the superclass of all classes that augment the
functionality of connected profiles. These connected profiles sit on
top of (wrap) an already existing connected profile (the underlying
connected profile), but provide additional functionality.
The class ProfileWrapper itself overrides all methods of
ConnectedProfile with versions that pass all requests to the underlying
connected profile. Subclasses of ProfileWrapper may further override
some of these methods as well as provide additional methods and fields.
-
baseProfile
- The underlying connected profile.
-
ProfileWrapper(ConnectedProfile)
- Creates an connected profile wrapper built on top of the specified
connected profile.
-
close()
- Calls the
close
method on the underlying connected
profile.
-
getConnection()
- Returns the result of calling the
getConnection
method on
the underlying connected profile.
-
getProfileData()
- Returns the result of calling the
getProfileData
method on
the underlying connected profile.
-
getStatement(int)
- Returns the result of calling the
getStatement
method on
the underlying connected profile.
-
getWrappedProfile()
- Returns the underlying connected profile to which all method
implementations are deferred.
-
setWrappedProfile(ConnectedProfile)
- Returns true if the underlying connected profile can be replaced with
the passed connected profile, false otherwise.
baseProfile
protected ConnectedProfile baseProfile
- The underlying connected profile.
ProfileWrapper
public ProfileWrapper(ConnectedProfile profile)
- Creates an connected profile wrapper built on top of the specified
connected profile.
- Parameters:
- profile - the underlying connected profile.
getWrappedProfile
public ConnectedProfile getWrappedProfile()
- Returns the underlying connected profile to which all method
implementations are deferred.
setWrappedProfile
public boolean setWrappedProfile(ConnectedProfile newProfile)
- Returns true if the underlying connected profile can be replaced with
the passed connected profile, false otherwise. If true is returned,
then the underlying connected profile will be replaced with the passed
profile. If false is returned, the underlying profile is left unchanged.
This method is useful for adding profile layering between existing
layers as opposed to strictly to the top layer.
Note: the default implementation will always replace the underlying
connected profile. Subclasses should override this method if non-default
behavior is required.
getProfileData
public ProfileData getProfileData()
- Returns the result of calling the
getProfileData
method on
the underlying connected profile.
getConnection
public Connection getConnection()
- Returns the result of calling the
getConnection
method on
the underlying connected profile.
getStatement
public RTStatement getStatement(int ndx) throws SQLException
- Returns the result of calling the
getStatement
method on
the underlying connected profile.
- Throws: SQLException
- if an error occurs in the wrapped profile
close
public void close() throws SQLException
- Calls the
close
method on the underlying connected
profile.
- Throws: SQLException
- if an error occurs in the wrapped profile
All Packages This Package Previous Next