A.5. Oracle Extension Class Mappings
Most of the Oracle extensions are alternatives to the JDBC types. The oracle.sql.NUMBER type is particularly useful when storing and retrieving NUMBER columns because there is no loss of precision, as may occur when using the JDBC numeric types. The oracle.sql.ROWID type allows you to store an Oracle rowid value (rowids were discussed in Chapter 2); Oracle stores a unique address for every row in the database using a column named ROWID of type ROWID. The oracle.sql.NUMBER and oracle.sql.ROWID types were covered in Chapter 3. The oracle.sql.BLOB, oracle.sql.CLOB, and oracle.sql.BFILE types, covered in Chapter 7, allow you to access the Oracle methods for large objects. Table A-5 lists the mappings between the Oracle extension classes and the compatible Oracle types.
| Java type | Oracle type |
|---|---|
| oracle.sql.NUMBER | NUMBER |
| oracle.sql.CHAR | CHAR |
| oracle.sql.RAW | RAW |
| oracle.sql.DATE | DATE |
| oracle.sql.ROWID | ROWID |
| oracle.sql.BLOB | BLOB |
| oracle.sql.CLOB | CLOB |
| oracle.sql.BFILE | BFILE |
| oracle.sql.STRUCT | STRUCT |
| oracle.sql.REF | REF |
| oracle.sql.ARRAY | ARRAY |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access