Oracle9i Business Components for Java Oracle Domains API Reference
Oracle9i Jdeveloper (9.0.4)
B10392-01


Package oracle.jbo.domain

The oracle.jbo.domain.* classes, also known as the "JBO Oracle Domains", provide lightweight wrappers for the Java representation of the Oracle data types (that is, the oracle.sql.* classes).

See:
          Description

Class Summary
Array This class provides a lightweight wrapper for oracle.sql.ARRAY, the Java representation of the ARRAY database type.
BaseLobDomain This class provides a lightweight wrapper for oracle.sql.BLOB, the Java representation of the BLOB database type.
BFileDomain This class provides a lightweight wrapper for oracle.sql.BFILE, the Java representation of the BFILE database type.
BlobDomain This class provides a lightweight wrapper for oracle.sql.BLOB, the Java representation of the BLOB database type.
Char This class provides a lightweight wrapper for oracle.sql.CHAR, the Java representation of the CHAR database type.
ClobDomain This class provides a lightweight wrapper for oracle.sql.Clob, the Java representation of the CLOB database type.
Date This class extends oracle.sql.DATE, Oracle's Java representation of the DATE database type.
DBSequence A lightweight, tier-independent wrapper that allows working with attributes that should get their number values from database sequence on insert of a new row.
Number This class extends oracle.sql.NUMBER, Oracle's Java representation of the NUMBER database type.
Raw This class provides a lightweight wrapper for oracle.sql.Raw, the Java representation of the RAW database type.
Ref This class provides a lightweight wrapper for oracle.sql.Ref, the Java representation of the REF database type.
RowID This class provides a lightweight wrapper for oracle.sql.RowID, the Java representation of the ROWID database type.
Sequence A lightweight, tier-independent wrapper for the server tier-dependent SequenceImpl class.
Struct This class provides a lightweight wrapper for oracle.sql.STRUCT, the Java representation of the Struct database type.
Timestamp This class extends oracle.sql.TIMESTAMP, Oracle's Java representation of the TIMESTAMP database type.

 

Package oracle.jbo.domain Description

The oracle.jbo.domain.* classes, also known as the "JBO Oracle Domains", provide lightweight wrappers for the Java representation of the Oracle data types (that is, the oracle.sql.* classes). These wrappers allow the Oracle data types to be represented as domain objects. A domain object is a class for scalar data values that can be accessed in a tier-independent manner, and that has no inherent implication on mappability to database columns.

The oracle.jbo.domain.* classes work by containing an instance of the corresponding oracle.sql class. For example, the oracle.jbo.domain.Raw class contains an instance of oracle.sql.RAW.

Use the JBO Oracle Domain classes when you are writing code against an Oracle database, using the Oracle JDBC drivers. Note that there is a separate domain package, known as the "JBO Generic Domains", that provides lightweight wrappers for the native Java data types. The difference between these two domains are described in the next section.

JBO Oracle Domains Versus JBO Generic Domains

The JBO Oracle Domain package provides lightweight wrappers for the Java representation of the Oracle data types; the JBO Generic Domain package provides lightweight wrappers for the native Java types. The product ships with a zip file for each domain package.

Include the JBO Oracle Domain zip when you are writing code against an Oracle database, using the Oracle JDBC drivers. Use the JBO Generic Domain zip when you are writing code against some other database, using other drivers such as Oracle Lite or Sun ODBC-JDBC Bridge. If you attempt to use the JBO Oracle Domains with a non-Oracle JDBC driver, your code will fail. Similarly, if you attempt to use the JBO Generic Domains with a Oracle JDBC driver, your code will fail.

If you want to write code which is able to run without modification against an Oracle database or a generic database, you switch the underylying domain classes by switching the zip files for the appropriate database.

More About the oracle.sql Package

A key feature of the Oracle JDBC extensions is the type support in the oracle.sql package. This package includes classes that map to all the Oracle SQL datatypes, acting as wrappers for raw SQL data. This functionality provides two significant advantages in manipulating SQL data:

Because data in an oracle.sql.* object remains in SQL format, no information is lost. For SQL primitive types, these classes simply wrap the SQL data. For SQL structured types (objects and arrays), they provide additional information such as conversion methods and details of structure.

Each of the oracle.sql.* datatype classes extends oracle.sql.Datum, a superclass that encapsulates functionality common to all the datatypes.


Oracle9i Business Components for Java Oracle Domains API Reference
Oracle9i Jdeveloper (9.0.4)
B10392-01


 

Copyright © 1997, 2003, Oracle. All rights reserved.