Oracle8i SQLJ Developer's Guide and Reference Release 3 (8.1.7) Part Number A83723-01 |
|
Oracle8i and Oracle SQLJ support user-defined SQL object types (composite data structures), related SQL object reference types, and user-defined SQL collection types. Oracle objects and collections are composite data structures consisting of individual data elements.
Oracle SQLJ supports either strongly typed or weakly typed Java representations of object types, reference types, and collection types to use in iterators or host expressions. Strongly typed representations use a custom Java class that maps to a particular object type, reference type, or collection type and must implement either the JDBC 2.0 standard java.sql.SQLData
interface or the Oracle oracle.sql.CustomDatum
interface. Either paradigm is supported by the Oracle JPublisher utility, which you can use to automatically generate custom Java classes. Weakly typed representations use the class oracle.sql.STRUCT
(for objects), oracle.sql.REF
(for references), or oracle.sql.ARRAY
(for collections). (Or, alternatively, you can use standard java.sql.Struct
, Ref
, or Array
objects in a weakly typed scenario.)
Note that using Oracle extensions in your code requires the following:
oracle.sqlj.runtime.util.OraCustomizer
, is recommended).
(The Oracle SQLJ runtime and an Oracle JDBC driver are required whenever you use the Oracle customizer, even if you do not actually use Oracle extensions in your code.)
You also must import the oracle.sql
package, as follows (unless you use the fully qualified class names in your code):
import oracle.sql.*;
For Oracle-specific semantics-checking, you must use an appropriate checker. The default checker, oracle.sqlj.checker.OracleChecker
, acts as a front end and will run the appropriate checker based on your environment. This will be one of the Oracle-specific checkers if you are using an Oracle JDBC driver.
For information about translator options relating to semantics-checking, see "Connection Options" and "Semantics-Checking Options".
|
![]() Copyright © 1996-2000, Oracle Corporation. All Rights Reserved. |
|