Skip Headers
Oracle® Database JPublisher User's Guide
10g Release 2 (10.2)

Part Number B14188-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Feedback

Go to next page
Next
View PDF

Contents

List of Figures

List of Tables

Title and Copyright Information

Send Us Your Comments

Preface

Intended Audience
Documentation Accessibility
Structure
Related Documents
Conventions

1 Introduction to JPublisher

1.1 Overview of JPublisher
1.2 JPublisher Initial Considerations
1.2.1 New Features in Oracle Database 10g JPublisher
1.2.1.1 New Features for Web Services
1.2.1.2 Awareness of Java Environment
1.2.1.3 Implicit SQLJ Translation
1.2.2 JPublisher Usage of the SQLJ Implementation
1.2.2.1 Overview of SQLJ Usage
1.2.2.2 Overview of SQLJ Concepts
1.2.2.3 Backward-Compatibility Modes Affecting SQLJ Source Files
1.2.3 General Requirements for JPublisher
1.2.4 Required Database Setup
1.2.4.1 Verifying or Installing the SQLJUTL and SQLJUTL2 Packages
1.2.4.2 Verifying or Loading the sqljutl.jar File
1.2.4.3 Verifying or Installing the UTL_DBWS Package
1.2.4.4 Verifying or Loading the dbwsclient.jar File
1.2.4.5 Loading JAR Files For Web Services Call-Outs in Oracle9i or Oracle8i
1.2.4.6 Setting Up Password File for Remote SYS Login
1.2.5 Situations for Reduced Requirements
1.2.6 JPublisher Limitations
1.3 What JPublisher Can Publish
1.4 JPublisher Mappings and Mapping Categories
1.4.1 JPublisher Mappings for User-Defined Types and PL/SQL Types
1.4.1.1 Representing User-Defined SQL Types Through JPublisher
1.4.1.2 Using Strongly Typed Object References for ORAData Implementations
1.4.1.3 Using PL/SQL Types Through JPublisher
1.4.2 JPublisher Mapping Categories
1.4.2.1 JDBC Mapping
1.4.2.2 Object JDBC Mapping
1.4.2.3 BigDecimal Mapping
1.4.2.4 Oracle Mapping
1.5 JPublisher Input and Output
1.5.1 Input to JPublisher
1.5.2 Output from JPublisher
1.5.2.1 Java Output for User-Defined Object Types
1.5.2.2 Java Output for User-Defined Collection Types
1.5.2.3 Java Output for OPAQUE Types
1.5.2.4 Java Output for PL/SQL Packages
1.5.2.5 Java Output for Server-Side Java Classes and Web Services Call-Outs
1.5.2.6 Java Output for SQL Queries or DML Statements
1.5.2.7 Java Output for AQs and Streams
1.5.2.8 PL/SQL Output
1.6 JPublisher Operation
1.6.1 Overview of the Publishing Process: Generation and Use of Output
1.6.2 JPublisher Command-Line Syntax
1.6.3 Sample JPublisher Translation

2 Using JPublisher

2.1 Publishing User-Defined SQL Types
2.2 Publishing PL/SQL Packages
2.3 Publishing Oracle Streams AQ
2.3.1 Publishing a Queue as a Java Class
2.3.2 Publishing a Topic as a Java Class
2.3.3 Publishing a Stream as a Java Class
2.4 Publishing Server-Side Java Classes Through Native Java Interface
2.5 Publishing Server-Side Java Classes Through PL/SQL Wrappers
2.6 Publishing Server-Side Java Classes to PL/SQL
2.7 Publishing Server-Side Java Classes to Table Functions
2.8 Publishing Web Services Client into PL/SQL

3 Data Type and Java-to-Java Type Mappings

3.1 JPublisher Data Type Mappings
3.1.1 Overview of JPublisher Data Type Mappings
3.1.2 SQL and PL/SQL Mappings to Oracle and JDBC Types
3.1.3 JPublisher User Type Map and Default Type Map
3.1.4 JPublisher Logical Progression for Data Type Mappings
3.1.5 Object Attribute Types
3.1.6 REF CURSOR Types and Result Sets Mapping
3.1.7 Connection in JDBC Mapping
3.2 Support for PL/SQL Data Types
3.2.1 Type Mapping Support for OPAQUE Types
3.2.1.1 Support for OPAQUE Types
3.2.1.2 Support for XMLTYPE
3.2.2 Type Mapping Support for Scalar Index-by Tables
3.2.3 Type Mapping Support Through PL/SQL Conversion Functions
3.2.4 Type Mapping Support for PL/SQL RECORD and Index-By Table Types
3.2.4.1 Sample Package for RECORD Type and Index-By Table Type Support
3.2.4.2 Support for RECORD Types
3.2.4.3 Support for Index-By Table Types
3.2.5 Direct Use of PL/SQL Conversion Functions Versus Use of Wrapper Functions
3.2.6 Other Alternatives for Data Types Unsupported by JDBC
3.3 JPublisher Styles and Style Files
3.3.1 Style File Specifications and Locations
3.3.2 Style File Format
3.3.2.1 Style File TRANSFORMATION Section
3.3.2.2 Style File OPTIONS Section
3.3.3 Summary of Key Java-to-Java Type Mappings in Oracle Style Files
3.3.4 Use of Multiple Style Files

4 Generated Classes and Interfaces

4.1 Treatment of Output Parameters
4.1.1 Passing Output Parameters in Arrays
4.1.2 Passing Output Parameters in JAX-RPC Holders
4.1.3 Passing Output Parameters in Function Returns
4.2 Translation of Overloaded Methods
4.3 Generation of SQLJ Classes
4.3.1 Important Notes About Generation of SQLJ Classes
4.3.2 Use of SQLJ Classes for PL/SQL Packages
4.3.3 Use of SQLJ Classes for Object Types
4.3.4 Connection Contexts and Instances in SQLJ Classes
4.3.5 The setFrom(), setValueFrom(), and setContextFrom() Methods
4.4 Generation of Non-SQLJ Classes
4.5 Generation of Java Interfaces
4.6 JPublisher Subclasses
4.6.1 Extending JPublisher-Generated Classes
4.6.1.1 Syntax for Mapping to Alternative Classes
4.6.1.2 Format of the Class that Extends the Generated Class
4.6.2 JPublisher-Generated Subclasses for Java-to-Java Type Transformations
4.7 Support for Inheritance
4.7.1 ORAData Object Types and Inheritance
4.7.1.1 Precautions when Combining Partially Generated Type Hierarchies
4.7.1.2 Mapping of Type Hierarchies in JPublisher-Generated Code
4.7.2 ORAData Reference Types and Inheritance
4.7.2.1 Casting a Reference Type Instance into Another Reference Type
4.7.2.2 Why Reference Type Inheritance Does Not Follow Object Type Inheritance
4.7.2.3 Manually Converting Between Reference Types
4.7.2.4 Example: Manually Converting Between Reference Types
4.7.3 SQLData Object Types and Inheritance
4.7.4 Effects of Using SQL FINAL, NOT FINAL, NOT INSTANTIABLE

5 Additional Features and Considerations

5.1 Summary of JPublisher Support for Web Services
5.1.1 Summary of Support for Web Services Call-Ins to the Database
5.1.2 Support for Web Services Call-Outs from the Database
5.1.3 Server-Side Java Invocation (Call-in)
5.2 Features to Filter JPublisher Output
5.2.1 Publishing a Specified Subset of Functions or Procedures
5.2.2 Publishing Functions or Procedures According to Parameter Modes or Types
5.2.3 Ensuring that Generated Methods Adhere to the JavaBeans Specification
5.3 Backward Compatibility and Migration
5.3.1 JPublisher Backward Compatibility
5.3.2 Changes in JPublisher Behavior Between Oracle Database 10g Release 1 and Release 2
5.3.3 Changes in JPublisher Behavior Between Oracle9i Database and Oracle Database 10g
5.3.4 Changes in JPublisher Behavior Between Oracle8i Database and Oracle9i Database
5.3.5 JPublisher Backward-Compatibility Modes and Settings
5.3.5.1 Explicit Generation of .sqlj Files
5.3.5.2 Oracle9i Compatibility Mode
5.3.5.3 Oracle8i Compatibility Mode
5.3.5.4 Individual Settings to Force Oracle8i JPublisher Behavior

6 Command-Line Options and Input Files

6.1 JPublisher Options
6.1.1 JPublisher Option Summary
6.1.2 JPublisher Option Tips
6.1.3 Notational Conventions
6.1.4 Options for Input Files and Items to Publish
6.1.4.1 File Containing Names of Objects and Packages to Translate
6.1.4.2 Declaration of Server-Side Java Classes to Publish
6.1.4.3 Declaration of Server-Side Java Classes to Publish
6.1.4.4 Declaration of Server-Side Java Classes to Publish
6.1.4.5 Settings for Java and PL/SQL Wrapper Generation
6.1.4.6 Input Properties File
6.1.4.7 Declaration of Object Types and Packages to Translate
6.1.4.8 Declaration of SQL Statements to Translate
6.1.4.9 Declaration of Object Types to Translate
6.1.5 Connection Options
6.1.5.1 SQLJ Connection Context Classes
6.1.5.2 The Default datasource Option
6.1.5.3 JDBC Driver Class for Database Connection
6.1.5.4 Connection URL for Target Database
6.1.5.5 User Name and Password for Database Connection
6.1.6 Options for Data Type Mappings
6.1.6.1 Mappings for Built-In Types
6.1.6.2 Mappings for LOB Types
6.1.6.3 Mappings for Numeric Types
6.1.6.4 Mappings for User-Defined Types
6.1.6.5 Mappings for All Types
6.1.6.6 Style File for Java-to-Java Type Mappings
6.1.7 Type Map Options
6.1.7.1 Adding an Entry to the Default Type Map
6.1.7.2 Additional Entry to the User Type Map
6.1.7.3 Default Type Map for JPublisher
6.1.7.4 Replacement of the JPublisher Type Map
6.1.8 Java Code-Generation Options
6.1.8.1 Method Access
6.1.8.2 Case of Java Identifiers
6.1.8.3 Method Filtering According to Parameter Modes
6.1.8.4 Method Filtering According to Parameter Types
6.1.8.5 Code Generation Adherence to the JavaBeans Specification
6.1.8.6 Class and Interface Naming Pattern
6.1.8.7 Generation of User Subclasses
6.1.8.8 Generation of Package Classes and Wrapper Methods
6.1.8.9 Omission of Schema Name from Name References
6.1.8.10 Holder Types for Output Arguments
6.1.8.11 Name for Generated Java Package
6.1.8.12 Serializability of Generated Object Wrapper Classes
6.1.8.13 Generation of toString() Method on Object Wrapper Classes
6.1.8.14 Rename main Method
6.1.9 PL/SQL Code Generation Options
6.1.9.1 Generation of SQL types
6.1.9.2 File Names for PL/SQL Scripts
6.1.9.3 Generation of PL/SQL Wrapper Functions
6.1.9.4 Package for Generated PL/SQL Code
6.1.9.5 Package for PL/SQL Index-By Tables
6.1.10 Input/Output Options
6.1.10.1 No Compilation or Translation
6.1.10.2 Output Directories for Generated Source and Class Files
6.1.10.3 Java Character Encoding
6.1.11 Options to Facilitate Web Services Call-Outs
6.1.11.1 WSDL Document for Java and PL/SQL Wrapper Generation
6.1.11.2 Web Services Endpoint
6.1.11.3 Proxy URL for WSDL
6.1.11.4 Superuser for Permissions to Run Client Proxies
6.1.12 Option to Access SQLJ Functionality
6.1.12.1 Settings for the SQLJ Translator
6.1.13 Backward Compatibility Option
6.1.13.1 Backward-Compatible Oracle Mapping for User-Defined Types
6.1.14 Java Environment Options
6.1.14.1 Classpath for Translation and Compilation
6.1.14.2 Java Compiler
6.1.14.3 Java Version
6.1.15 SQLJ Migration Options
6.2 JPublisher Input Files
6.2.1 Properties File Structure and Syntax
6.2.2 INPUT File Structure and Syntax
6.2.2.1 Understanding the Translation Statement
6.2.2.2 Sample Translation Statement
6.2.3 INPUT File Precautions
6.2.3.1 Requesting the Same Java Class Name for Different Object Types
6.2.3.2 Requesting the Same Attribute Name for Different Object Attributes
6.2.3.3 Specifying Nonexistent Attributes
6.2.3.4 JPublisher Reserved Terms

A Generated Code Examples

A.1 Generated Code: User Subclass for Java-to-Java Transformations
A.1.1 Interface Code
A.1.2 Base Class Code
A.1.3 User Subclass Code
A.2 Generated Code: SQL Statement
A.3 Generated Code: Server-Side Java Call-in
A.3.1 The Source Files
A.3.2 Publishing Server-Side Java Class
A.3.3 The Generated Files
A.3.4 Testing the Published Files

B Troubleshooting

B.1 Error While Publishing Web Services Client

Index