ORA_JAVA.NEW_java_type_ARRAY
built-in functionThis function creates a new array of the specified Java type.
FUNCTION ORA_JAVA.NEW_OBJECT_ARRAY (
length IN PLS_INTEGER,
clsname IN VARCHAR2)
RETURN ORA_JAVA.JARRAY;
FUNCTION ORA_JAVA.NEW_BYTE_ARRAY (
length IN PLS_INTEGER)
RETURN ORA_JAVA.JARRAY;
FUNCTION ORA_JAVA.NEW_CHAR_ARRAY (
length IN PLS_INTEGER)
RETURN ORA_JAVA.JARRAY;
FUNCTION ORA_JAVA.NEW_SHORT_ARRAY (
length IN PLS_INTEGER)
RETURN ORA_JAVA.JARRAY;
FUNCTION ORA_JAVA.NEW_INT_ARRAY (
length IN PLS_INTEGER)
RETURN ORA_JAVA.JARRAY;
FUNCTION ORA_JAVA.NEW_LONG_ARRAY (
length IN PLS_INTEGER)
RETURN ORA_JAVA.JARRAY;
FUNCTION ORA_JAVA.NEW_FLOAT_ARRAY (
length IN PLS_INTEGER)
RETURN ORA_JAVA.JARRAY;
FUNCTION ORA_JAVA.NEW_DOUBLE_ARRAY (
length IN PLS_INTEGER)
RETURN ORA_JAVA.JARRAY;
FUNCTION ORA_JAVA.NEW_STRING_ARRAY (
length IN PLS_INTEGER)
RETURN ORA_JAVA.JARRAY;
FUNCTION ORA_JAVA.NEW_BOOLEAN_ARRAY (
length IN PLS_INTEGER)
RETURN ORA_JAVA.JARRAY;
Parameters |
Description |
|
Size of the array to be created (that is, the number of array elements). |
|
Fully qualified name of the class file. Use '.' (period) as separators in the name, for example, java.lang.String. Required only when creating an array of the Object data type. |
An object of the PL/SQL type ORA_JAVA.JARRAY
, which is a subtype
of ORA_JAVA.JOBJECT
.
ORA_JAVA.NEW_GLOBAL_REF
function to increase the persistency of the array beyond the duration of the
trigger.
See Working with Arrays for additional information.
/*
** Example of creating an array of data type object.
*/
PROCEDURE create_object_array IS
arr ORA_JAVA.JOBJECT;
BEGIN
arr := ORA_JAVA.NEW_OBJECT_ARRAY(3, 'java.lang.String');
...
END;
/*
** Example of creating an array of data type char with one element.
*/
PROCEDURE create_char_array IS
arr ORA_JAVA.JOBJECT;
BEGIN
arr := ORA_JAVA.NEW_CHAR_ARRAY(1);
...
END;
ORA_JAVA.GET_java_type_ARRAY_ELEMENT
ORA_JAVA.SET_java_type_ARRAY_ELEMENT
Copyright © 1984, 2005, Oracle. All rights reserved.