Oracle
  Home arrow Oracle arrow Page 5 - Extending PL/SQL with Java Libraries, ...
Dev Shed Forums 
Administration  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
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? 
ORACLE

Extending PL/SQL with Java Libraries, concluded
By: McGraw-Hill/Osborne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 11
    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:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb 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

    PCmover - $15 Off with Coupon Code CJPH7Q

    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.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

       · This article is an excerpt from the book "Expert Oracle PL/SQL," published by...
     

    Buy this book now. This article is excerpted from chapter five of Expert Oracle PL/SQL, written by Ron Hardman and Michael McLaughlin (McGraw-Hill/Osborne, 2005; ISBN: 0072261943). Check it out today at your favorite bookstore. Buy this book now.

       

    ORACLE ARTICLES

    - 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...
    - Sub-templates and More with Oracle HTML DB
    - Focusing on Templates in Oracle HTML DB

     
    Accelerating Trading Partner Performance
     
    Competing on Analytics
     
    Cost Effective Scaling with Virtualization and Coyote Point Systems
     
    Five Checkpoints to Implementing IP Telephony
     
    Hosted Email Security: Staying Ahead of New Threats
     




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway