SQL/MX 2.x Reference Manual (H06.10+, J06.03+)
SQL/MX Statements
HP NonStop SQL/MX Reference Manual—544517-008
2-64
CREATE PROCEDURE Statement
For more information, see Data Types on page 6-17.
EXTERNAL NAME 'java-method-name [java-signature]'
java-method-name
specifies the case-sensitive name of the SPJ method of the form:
[package-name.]class-name.method-name
The Java method must exist in a Java class file, class-name.class, in the
OSS directory, or the JAR file path specified by the EXTERNAL PATH clause.
The Java method must be defined as public and static and have a return
type of void. For guidelines on how to write an SPJ method, see the SQL/MX
Guide to Stored Procedures in Java.
If the class file that contains the SPJ method is part of a package, you must
also specify the package name. If you do not specify the package name, the
CREATE PROCEDURE statement fails to register the SPJ.
java-signature
specifies the signature of the SPJ method and consists of:
([java-datatype[{, java-datatype}...]])
The Java signature is necessary only if you want to specify a Java wrapper
class (for example, java.lang.Integer) instead of a Java primitive data
type (for example, int). An SQL/MX data type maps to a Java primitive data
type by default.
The Java signature is case-sensitive and must be placed within parentheses,
such as (java.lang.Integer, java.lang.Integer). The signature
must specify each of the parameter data types in the order they appear in the
FLOAT double (or java.lang.Double
if specified)***
REAL float (or java.lang.Float if
specified)***
DOUBLE PRECISION double (or java.lang.Double
if specified)***
This icon indicates an SQL data type that is an SQL/MX extension to
the ANSI standard. All other SQL data types in this table conform to
the ANSI standard.
SQL/MX Data Type Maps to Java Data Type...
* The character set for character string data types can be ISO88591 or UCS2.
** Numeric data types can be only SIGNED, which is the default in NonStop SQL/MX.
*** By default, the SQL/MX data type maps to a Java primitive data type. The SQL/MX
data type maps to a Java wrapper class only if you specify the wrapper class in the
Java signature of the EXTERNAL NAME clause.
Ext










