EasyManuals Logo

IBM DB2 User Manual

IBM DB2
585 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #313 background imageLoading...
Page #313 background image
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

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the IBM DB2 and is the answer not in the manual?

IBM DB2 Specifications

General IconGeneral
DeveloperIBM
Initial Release1983
LicenseProprietary
Written inC, C++
CategoryDatabase Management System (RDBMS)
Operating SystemLinux, Windows
Programming LanguagesC, C++
Data ModelsRelational
EditionsCommunity, Standard, Advanced
Key Featureshigh availability, scalability