The following diagram details the external-name portion of the CREATE ROUTINE (or FUNCTION or PROCEDURE) statement for a UDR written in Java code.
>>-EXTERNAL NAME--| Java External Name |----------------------->< Java External Name: |--'--+-THISJAR---------------------------------+--:------------> '-+---------------------------+--jar_name-' '-+-------------+--owner--.-' '-database--.-' >--+-----------------+--class_name.method-----------------------> '-package_name--.-' .-,-----------------. V | >--(----+---------------+-+--)--'-------------------------------| '-java_datatype-'
| Element | Purpose | Restrictions |
|---|---|---|
| class_name | Class to which the UDR belongs | Must be an existing class. |
| database | Database where the jar exists If omitted, defaults to the current database. | Must be an existing database. |
| jar_name | Jar identifier as specified in the install_jar() statement | Must be an existing JAR name. |
| java_datatype | Name of a Java data type The second column of the following table shows data types and class names that you can use for this variable. | Must be a Java data type. |
| method | Name of the static method of the UDR | Must be an existing method. |
| owner | Owner of the jarIf omitted, defaults to the current user. | Must be an existing user name. |
| package_name | Name of a package | Required if the UDR classes are in a package. |
When used within a deployment descriptor, the THISJAR keyword automatically expands to the SQLJ-defined three-part JAR path.
The following table shows mapping between SQL data values and Java types. Use the values in the second column for the java_datatype variable.