Generated Java Source Structure
The generated Java code follows established Java EE core patterns and groups related classes by responsibility.
Generated Java Code: Class Groups
- Implementation classes
- Contain the generated JDBC-based implementation.
- One Java class is generated for each PL/SQL function, procedure, and package.
- For standalone PL/SQL functions and procedures, the class provides a single call(..) method to invoke the program.
- For PL/SQL packages, the class provides one method per packaged function or procedure.
- The PL/SQL IN parameters define the Java method argument list.
- If the PL/SQL program has no OUT parameters, the Java return type is void.
- If the PL/SQL program has exactly one OUT parameter, the Java return type is the corresponding Java type.
- If the PL/SQL program has multiple OUT parameters, the Java method returns a transfer object.
- This is where the generated service interface is implemented.
- Implementation classes use the suffix ServiceImpl.
- Transfer object classes
- A transfer object is generated when a PL/SQL program returns more than one OUT parameter. Each OUT value becomes a field in the transfer object. The class name is the camel-case PL/SQL program name with the suffix TO.
- For each PL/SQL object type, a corresponding Java transfer object is generated using camel-case naming.
- Service interfaces
- A service interface is generated for each implementation class.
- The interface declares all methods used to call the associated PL/SQL programs.
- Service interfaces use the suffix Service.
- Remote call factory class
- One factory class is generated per Connector Builder.
- For each generated service, the factory provides a static getter method getServiceXXX().
- getServiceXXX() creates a service instance using the configured data source class.
- The default factory name is the Connector Builder name in camel case with the suffix RPCFactory.
- Data source class
- One data source class is generated per remote call factory.
- This class configures the data source connection and is not overwritten if it already exists. This allows you to keep custom configuration safely.
- Each data source class exposes a static getDataSource() method used by the factory.
- The default name is the database user name in camel case with the suffix DataSource.
- Resource files
- One resource file is generated per data source class.
- The resource file contains the JDBC connection parameters.
- The resource file is not overwritten if it already exists, so you can adjust settings without losing changes.
- The default name is the database user name in lowercase with the suffix .properties.