The following table summarizes how Java program entities are represented in PL/SQL.
This Java entity | is represented as this PL/SQL entity | Description |
---|---|---|
public constructor | function (called "new") | Generates a different "new" function for each public constructor. The "new" function returns an instance of the object. |
public method (with return type) example: |
function | If an instance method, the instance of the class is passed as first argument to the function to identify the object. If a static method, the instance argument is not necessary. |
Public method (with return type void) example: |
procedure | If an instance method, the instance of the class is passed as first argument to the procedure to identify the object. If a static method, the instance argument is not necessary. |
Public static constant field example: |
package variable (of appropriate type) | When PL/SQL package is first referenced, initialization code sets value of package variable. |
Public field (non-static or non-constant)
example: |
function, procedure |
If Include get/set for public fields checkbox is selected, then a public field is mapped to:
If the field is an instance field, the instance of the class is passed as first argument to the function and procedure. If the field is a static field, the instance argument is not necessary. If Include get/set for public fields checkbox is not selected, then no PL/SQL is generated. |
Understanding Java to PL/SQL Mappings.