|Oracle8i SQLJ Developer's Guide and Reference
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 the interface
oracle.sql.CustomDatum. This paradigm is supported by the Oracle JPublisher utility, which you can use to automatically generate such 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).
To use Oracle-specific object, reference, and collection types, you must use one of the Oracle JDBC drivers and you must customize your profiles appropriately (the default Oracle customizer,
oracle.sqlj.runtime.util.OraCustomizer, is recommended). This is performed automatically when you run SQLJ, unless you specify otherwise.
You also must import the
oracle.sql package, as follows (unless you use the fully qualified class names in your code):
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.