Data type that you want to cast the return value to. By default, the return data type is an object.
You can cast the return value to an integer, double, string, or byte[] data type.
expression
String
Input
String that represents the expression to invoke.
You must use the letter "x" and number the parameters consecutively. For example, if the invoked expression requires three parameters, name the parameters x1, x2, and x3.
paramMetadataArray
Object[]
Input
Array of objects that contains the input parameters for the invoked expression.
Use the following Java code to invoke the concat() method to concatenate the strings John and Smith:
(String)invokeJExpression("concat(x1,x2)", new Object [] { "John ", "Smith" });
The code returns the following string:
John Smith
Consider the following rules and guidelines for the invokeJExpression method:
•By default, the update strategy for return values is INSERT. To use a different update strategy, you must define the update strategy in the Java code.
•If an argument, parameter, or return value is NULL, the value is treated as a null indicator.
For example, if the return value of the invoked expression is NULL and the return data type is a string, the invokeJExpression method returns a string with a value of NULL.
•If an input parameter to the invoked expression is a date/time data type, you must pass the parameter as a string and use the TO_DATE function to convert the string to a date/time data type.
For example, use the following argument to pass a date/time value to the invoked expression:
new Object [] { "TO_DATE("01/22/98", "MM/DD/YY")" }
•If the invokeJExpression method returns a date/time data type, you must cast the return value to a string.