IBM DB2 Manual page 313

Table of Contents

Advertisement

Ctx(ConnectionContext)
Format:
public Ctx(sqlj.runtime.ConnectionContext SQLJ-connection-context-object)
throws SQLException
Parameters:
SQLJ-connection-context-object
A previously created SQLJ ConnectionContext object.
Methods
The following additional methods are generated in a concrete implementation of
the ConnectionContext interface that results from translation of the statement #sql
context Ctx;:
getDefaultContext
Format:
public static Ctx getDefaultContext()
Returns the default connection context object for the Ctx class.
getProfileKey
Format:
public static Object getProfileKey(sqlj.runtime.profile.Loader loader,
String profileName) throws SQLException
This method is used by code that is generated by the SQLJ translator. It is not
intended for direct use by application programs.
getProfile
Format:
public static sqlj.runtime.profile.Profile getProfile(Object key)
This method is used by code that is generated by the SQLJ translator. It is not
intended for direct use by application programs.
getTypeMap
Format:
public static java.util.Map getTypeMap()
Returns an instance of a class that implements java.util.Map, which is the
user-defined type map that is associated with the ConnectionContext. If there is
no associated type map, Java null is returned.
This method is used by code that is generated by the SQLJ translator for
executable clauses and iterator declaration clauses, but it can also be invoked
in an SQLJ application for direct use in JDBC statements.
SetDefaultContext
Format:
public static void Ctx setDefaultContext(Ctx default-context)
Sets the default connection context object for the Ctx class.
Recommendation: Do not use this method for multithreaded applications.
Instead, use explicit contexts.
Related concepts
"SQLJ and JDBC in the same application" on page 139
Chapter 7. JDBC and SQLJ reference information
297

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents