18.2 SQLJ Translator

SQLJ Translator analyzes an SQLJ source program and generates a Java source file and a profile.

SQL statements are replaced with Java instructions, including the invocation of the JDBC API, and are output as a Java source file.

SQL character strings, number of parameters, types and modes of individual parameters, and the description of the columns to be output to a profile. The profile is referenced from the SQLJ Runtime Library. The entity of a profile is an instance of the java.sql.runtime.Profile class.

Table 18-1 lists the files that are generated and referenced by the SQLJ Translator.

Table 18-1 Files that are generated and referenced by the SQLJ Translator

File classificationFile name formatExplanationType
SQLJ source filefile-name.sqljIndicates an SQLJ source file.Referenced
Java source filefile-name.javaIndicates a Java source file.Generated
Profilefile-name_SJProfile profile-number.serStores the information of each SQL statement extracted from an SQLJ source file. A profile number is assigned to each context. The cardinal number is 0 for all.Generated

The prefixes of the classes and variables internally generated by SQLJ Translator are as follows:

_sJT_: Names of the variables internally generated

_SJ: Names of the classes and profiles internally generated