Skip Headers


Oracle® Database JP ublisher User's Guide
10g Release 1 (10.1)

Part Number B10983-01
< td align="center" valign="top">Go to Book List
Book List
Go to Documentation Home
Home
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Feedback
Go to next page
Next
< /td>
View PDF

Contents

Title and Copyright Information

Send Us Your Comments

Preface

Intended Audience
Documentation Accessibility
Structure
Related Documents
Conventions

1 Introduction to JPublisher

Overview of JPublisher
JPublisher Initial Considerations
New JPublisher Features in Oracle Database 10g
New Features for Web Services
Awareness of Java Environment Classpath
New Features for Usage of SQLJ
JPublisher Usage of t he Oracle SQLJ Implementation
Overview of SQLJ Usage
Overview of SQLJ Concepts
Backward Compatibility Modes Affecting SQLJ Source Files
JPublisher General Requirements
R equired Packages and JAR Files in the Database
Verifying or Installing the UTL_DB WS Package
Verifying or Installing the SQLJUTL and SQLJUTL2 Packages
Verifying or Loading the utl_dbws_jserver.jar File
Loading JAR Files Fo r Web Services Call-outs in Oracle9i or Oracle8i
Verifying or Loading the sqljutl.jar File
Situations for Reduced Requirements
JPublisher Limitations
What JPublisher Can Publish
< dl>
Publishing SQL User-Defined Types
Publishing PL/SQL Pa ckages
Use of Object Types Instead of Java Primitive Numbers
Wrapper Class for Procedures at the SQL Top Level
Publishin g Server-Side Java Classes
Publishing SQL Queries or DML Statements
Publishing Proxy Classes and Wrappers for Web Services Call-Outs
JPublisher Mappings and Mapping Categories
JPublisher Mappings for User-Define d Types and PL/SQL Types
Representing User-Defined SQL Types Through JPublisher
Using Strongly Typed Object References for ORAData Implementations
Using PL/SQL Types Through JPublisher
JPublisher Mapping Categor ies
JDBC Mapping
Object JDBC Mapping
BigDecimal Mapping
Oracle Mapping
JPublisher Input and Output
Inpu t to JPublisher
Output from JPublisher
Java Output for User-Defined Object Types
Java Output for User-Defined Collection Types< /a>
Java Output for OPAQUE Types
Java Output for PL /SQL Packages
Java Output for Server-Side Java Classes and Web Services Call-Outs
Java Output for SQL Queries or DML Statements
PL/SQL Ou tput
JPublisher Operation
Summary of the Publishing Process: Generation and Use of Output
JPublisher Comman d-Line Syntax
Sample JPublisher Translation

2 Datatype and Java-to-Java Type Mappings

JPublisher Datatype Mappings
Overview of JPublisher Datatype Mappings
SQL and PL/SQL Mappings to Oracle and JDBC Type s
JPublisher User Type Map and Default Type Map
JPublisher Logical Progression for Datatype Mappings
Allowed Object Attribute Types
Mapping of REF CURSOR Types and Result Sets
Data Link Support and Mapping
Support for PL/SQL Datatypes
Type Mapping Support for OPAQUE Types
Ge neral Support for OPAQUE Types
Support for XMLTYPE
Type Mapping Support for Scalar Indexed-by Tables Using JDBC OCI
Type Mapping Support Through PL/SQL Conversion Functions
Type Mapping Support for PL/SQL RECO RD and Indexed-by Table Types
Sample Package for RECORD Type and Indexed-by Ta ble Type Support
Support for RECORD Types
S upport for Indexed-by Table Types
Direct Use of PL/SQL Conversion Functions Ve rsus Use of Wrapper Functions
Other Alternatives for Datatypes Unsupported by JDBC
JPublisher Styles and Style Files
Style File Specification and Locations
Style File Formats
< a href="datamap.htm#sthref204">Style File TRANSFORMATION Section
Style File OPTIONS Sect ion
Summary of Key Java-to-Java Type Mappings in Oracle Style Files
< dd>Use of Multiple Style Files

3 Generated Classes and Interfaces

JPublisher Treatment of Output Parameters
Passing Output Parameters in Arrays
Passing Output Parameters in JAX-RPC Holders
Passing Output Parameters in Function Returns
Transl ation of Overloaded Methods
JPublisher Generation of SQLJ Classes
Important Notes About Generation of SQLJ Classes
Use of SQLJ Classes That JPublisher Generates for PL/SQL Packages
Use of SQLJ Classes That JPublisher Generates for Object Types
More About Connection Contexts and Instances in SQLJ Classes
The setFrom(), setValueFrom(), and setContextFrom() Methods
< /dd>
JPublisher Generation of Non-SQLJ Classes
JPu blisher Generation of Java Interfaces
JPublisher Subclasses
Extending JPublisher-Generated Classes
Syntax fo r Mapping to Alternative Classes
Format of the Class that Extends the Generated Class
JPublisher-Generated Subclasses for Java-to-Java Type Transformations
JPublisher Support for Inheritance
ORAData Object Types and Inheritance
Precautions when Combining Partial ly Generated Type Hierarchies
Mapping of Type Hierarchies in JPublisher-Generated Code< /a>
ORAData Reference Types and Inheritance
Casting a Reference Type Instance into Another Reference Type
Why Re ference Type Inheritance Does Not Follow Object Type Inheritance
Manually Converting Be tween Reference Types
Example: Manually Converting Between Reference Types
SQLData Object Types and Inheritance
Effect s of Using SQL FINAL, NOT FINAL, NOT INSTANTIABLE

4 Additional Features and Considerations

Summary of JPublisher Support for Web Services
Summary of Suppor t for Web Services Call-Ins to the Database
Support for Web Services Call-Outs from the Database
Features to Filter JPublisher Output
Publishing a Specified Subset of Functions or Procedures
Publ ishing Functions or Procedures According to Parameter Modes or Types
Ensuring that Gene rated Methods Adhere to the JavaBeans Specification
Backward Compatibility an d Migration
JPublisher Backward Compatibility
Changes in JPublisher Behavior Between Oracle9i and Oracle Database 10g
Changes in JPublisher Behavior Between Oracle8i and Oracle9i
JPublisher Backward Compatibility Modes and Settings
Explicit Gener ation of .sqlj Files
Oracle9i Compatibility Mode
Oracle8i Compatibility Mode
Individual Settings to Force Orac le8i JPublisher Behavior

5 Command-Line Options and Input Files

JPublisher Options
JPublisher Option Summary
JPublisher Option Tips
Notational Conventions
Options for Input Files and Items to Publish
File Con taining Names of Objects and Packages to Translate (-input)
Declaration of Server-Side Java Classes to Translate (-java)
Input Properties File (-props)
Declaration of Object Types and Packages to Translate (-sql)
De claration of SQL Statements to Translate (-sqlstatement)
Declaration of Object Types to Translate (-types)
Connection Options
SQLJ Connection Context Classes (-context)
JDBC Driver Class for Data base Connection (-driver)
Connection URL for Target Database (-url)
User Name and Password for Database Connection (-user)
Options for Datatype Mappings
Mappings For Built-In Types (-builtintypes )
Mappings For LOB Types (-lobtypes)
Mapp ings For Numeric Types (-numbertypes)
Mappings for User-Defined Types (-usertypes)< /dd>
Mappings for All Types (-mapping)
Style File for Java-to-Java Type Mappings (-style)
Options for Type Maps
< dl>
Additional Entry to the Default Type Map (-adddefaulttypemap)
Additional Entry to the User Type Map (-addtypemap)
Default Type Map fo r JPublisher (-defaulttypemap)
Replacement of the JPublisher Type Map (-typemap)
Java Code Generation Options
Method Access (-access)
Case of Java Identifiers (-case)
Method Filtering According to Parameter Modes (-filtermodes)
Method F iltering According to Parameter Types (-filtertypes)
Code Generation Adherence to the J avaBeans Specification (-generatebean)
Class and Interface Naming Pattern (-genpattern)
Generation of User Subclasses (-gensubclass)
Generation of Package Classes and Wrapper Methods (-methods)
Omission of Schema Na me from Name References (-omit_schema_names)
Holder Types for Output Arguments (-outarg uments)
Name for Generated Java Package (-package)
Serializability of Generated Object Wrapper Classes (-serializable)
Generatio n of toString() Method on Object Wrapper Classes (-tostring)
PL/SQL Code Gene ration Options
File Names for PL/SQL Scripts (-plsqlfile)
Generation of PL/SQL Wrapper Functions (-plsqlmap)
Package f or Generated PL/SQL Code (-plsqlpackage)
Input/Output Options
< dl>
No Compilation or Translation (-compile)
Outpu t Directories for Generated Source and Class Files (-dir and -d)
Java Character Encodin g (-encoding)
Options to Facilitate Web Services Call-Outs
Mechanisms Used in Exposing Java to PL/SQL
Classe s for Java and PL/SQL Wrapper Generation (-proxyclasses)
Settings for Java and PL/SQL W rapper Generation (-proxyopts)
WSDL Document for Java and PL/SQL Wrapper Generation (-p roxywsdl)
Web Services Endpoint (-endpoint)
Proxy URL for WSDL (-httpproxy)
Superuser for Permissions to Run Client Proxies (-sy suser)
Option to Access SQLJ Functionality
Settings for the SQLJ Translator (-sqlj)
Backward Compa tibility Option
Backward-Compatible Oracle Mapping for User-Defined Types (-c ompatible)
Java Environment Options
Classpath for Translation and Compilation (-classpath)
Java Compiler (-c ompiler-executable)
Java Version (-vm)
Code Generation for Wrapper Class and PL/SQL Wrapper Options
Wrapper Class Generation without Handles
Wrapper Class Generation with Handles
Code Generation for Method Parameters
Code Gene ration for Table Functions
JPublisher Input Files
Properties File Structure and Syntax
INPUT File Structure and Syntax
Understanding the Translation Statement
Sample Translation Statement
INPUT File Precautions
Requesting the Same Java Class Name for Different Object Types
Requesting the Same Attribute Name for Different Object Attributes
Specifying Nonexistent Attributes
JPublisher Reserved Terms

A Generated Co de Examples

Generated Code: User Subclass for Java-to-Java Transformations
Interface Code
Base Class Code
User Subclass Code
Generated Code: SQL St atement
Generated Code: Java and PL/SQL Wrappers for Web Services
WSDL Document
JAX-RPC Client Proxy Classes and Interfaces< /a>
Java Wrapper Class and PL/SQL Wrapper
Additio nal PL/SQL Utility Scripts
Generated Code: Java and PL/SQL Wrappers for General Use
Classes to Be Wrapped
Java and PL/SQL Wrappers for Static Methods
Java and PL/SQL Wrappers for Instance Methods Using t he Handle Mechanism

Index