Oracle
  Home arrow Oracle arrow Page 5 - Extending PL/SQL with Java Libraries, concluded
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
Google.com  
ORACLE

Extending PL/SQL with Java Libraries, concluded
By: McGraw-Hill/Osborne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 12
    2006-01-19


    Table of Contents:
  • Extending PL/SQL with Java Libraries, concluded
  • Building Internal Server Java Objects
  • More on Building Internal Server Java Objects
  • Troubleshooting Java Class Library Build, Load, Drop, and Use
  • Mapping Oracle Types

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Extending PL/SQL with Java Libraries, concluded - Mapping Oracle Types
    ( Page 5 of 5 )

    Oracle maps all native types and User Defined Types (UDTs) to Java types. When you use SQLData you map individual components and structures. The following table notes how Oracle types map to Java types:

    SQL Data Types

    Java Class Data Types

    CHAR

    oracle.sql.CHAR

    LONG

    java.lang.String

    VARCHAR2

    java.lang.Byte

     

    java.lang.Short

     

    java.lang.Integer

     

    java.lang.Long

     

    java.lang.Float

     

    java.lang.Double

     

    java.lang.BigDecimal

     

    java.sql.Date

     

    java.sql.Time

     

    java.sql.Timestamp

     

    byte

     

    short

     

    int

     

    long

     

    float

     

    double

    DATE

    oracle.sql.DATE java.lang.String java.sql.Date java.sql.Time java.sql.Timestamp

    NUMBER

    oracle.sql.NUMBER java.lang.Byte java.lang.Short java.lang.Integer java.lang.Long java.lang.Float java.lang.Double java.lang.BigDecimal byte short

     

    int

     

    long float

     

    double

    OPAQUE

    oracle.sql.OPAQUE

    RAW LONG RAW

    oracle.sql.RAW byte[]

    ROWID

    oracle.sql.CHAR oracle.sql.ROWID java.lang.String

    BFILE

    oracle.sql.BFILE

    BLOB

    oracle.sql.BLOB oracle.jdbc.Blob (JDK 1.1.x

    CLOB NCLOB

    oracle.sql.CLOB oracle.jdbc.Clob (JDK 1.1.x

    OBJECT Object types

    oracle.sql.STRUCT java.sql.Struct (JDK 1.1.x)

     

    java.sql.SQLData

     

    oracle.sql.ORAData

    REF

    oracle.sql.REF

    Reference types

    java.sql.Ref (JDK 1.1.x)

     

    oracle.sql.ORAData

    TABLE

    oracle.sql.ARRAY

    VARRAY

    java.sql.Array (JDK 1.1.x)

    Nested table and types

    oracle.sql.ORAData

    VARRAY types

     

    Any of the preceding

    oracle.sql.CustomDatum

    SQL types

    oracle.sql.Datum

    Native types and UDTs can be used and managed by the SQLData conventions covered in the chapter. The Oracle JPublisher tool enables you to develop SQLData stubs and programs to use your UDTs.

    Summary

    You should now have an understanding of how to implement and troubleshoot server-side or internal Java class libraries. With these skills, you can build robust solutions in Java, affording you a certain simplicity over using PL/SQL.



     
     
    >>> More Oracle Articles          >>> More By McGraw-Hill/Osborne
     

       

    ORACLE ARTICLES

    - Oracle's Turn to Play in the Sun
    - Implementing and Using Oracle`s Restore Poin...
    - Tuning PL/SQL Code
    - Debugging PL/SQL Code
    - Testing PL/SQL Code
    - Working With PL/SQL Code
    - Conditional Compilation for Oracle Database ...
    - Compile-Time Warnings for Oracle DB 10g
    - Compiling PL/SQL Code for an Oracle Database
    - Troubleshooting PL/SQL Code
    - Managing PL/SQL Code
    - Data Manipulation and More for HTML DB Appli...
    - Oracle Database Fundamentals
    - Adding Processes to HTML DB Applications
    - Adding Computations, Processes, and Validati...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek