import_jar
Creates SQL wrapper types of selected Java classes
void import_jar
(in files any,
in classes any,
[in security_mode integer]);
Description
This function calls the jvm_ref_import() function
to produce the XML, then transforms it to a set of CREATE TYPE statements
and executes them. The SQL names of the types are generated by retrieving
the fully qualified name of the Java class and substituting the . with _
(e.g.: java.lang.System becomes java_lang_System). The names of the static
members observer functions are composed by prepending the name of the
static member with 'get' so the static Java member stat_m is mapped to a
SQL static method getstat_m(). As a result it creates SQL type wrappers
for the specified Java classes.
Parameters
files –
Null, string or vector of strings. This can contain one or many
Java .class files, .zip or .jar files to pick classes from. Null means
only the classes specified in the classes argument regardless of their
physical location.
classes –
Wildcard string or a vector of strings specifying which classes to
describe in the resulting XML.
security_mode –
This optional parameter defines the access mode as follows:
-
0 - restricted (default if unspecified)
-
1 - unrestricted
Examples
SQL> import_jar (null, vector ('java.lang.System'));
SQL> select java_lang_System::getProperty('java.vm.name');
callret
NVARCHAR
_______________________________________________________________________________
Java HotSpot(TM) Client VM