Oracle9i SQLJ Samples
The Oracle9i
SQLJ Samples demonstrate the usage of various new SQLJ features. All the samples have also been certified on Red Hat Linux Advanced Server 2.1
Add ORAData Sample [11-Apr-2003]
This sample illustrates additional
uses of ORAData class in Oracle9i
SQLJ. Addtional usage includes 1. Perform encryption and
decryption 2. Map data into more desirable java formats
(mapping a DATE field to java.util.GregorianCalender format)
Download
Now (JAR, 28KB)
Readme
Source
Batching and REFCursor Sample [11-Apr-2003]
This sample illustrates how to access a REF
Cursor returned from a PLSQL procedure in Oracle9i SQLJ. It
also demonstrates the Batch update feature of Oracle9i SQLJ.
Update batching (referred to as batch updates in the Sun Microsystems
JDBC 2.0 specification) allows UPDATE, DELETE, and INSERT statements
that are batchable and compatible (as discussed below) to be
collected into a batch and sent to the database for execution
at once, saving round trips to the database.
Download
Now (JAR, 27KB)
Readme
Source
Iterator Subclassing Sample
[11-Apr-2003]
SQLJ Iterator is used for getting the query
results returned by a SELECT statement. This iterator can be
extended to form a sub class. The sub class will contain all
the attributes of the super class plus additional functionality
can be included in it to enhance the query results and perform
operations on them. This sample shows how to subclass an iterator
and define and use additional methods in it.
Download
Now (JAR, 22KB)
Readme
Source
Object Type Inheritance Sample
[11-Apr-2003]
This sample illustrates
1. Overloading Methods
2. Dynamic Method Dispatch
3. Substitute types in a type hierarchy
Download
Now (JAR, 57KB)
Readme
Source
Optimization Sample
[11-Apr-2003]
This Sample illustrates optimization techiques
available in Oracle9i SQLJ. The Optimization techniques demonstrated
in this sample are
1. Statement Caching
2. Parameter Size Definition
3. Column type definitions for a query .
Download
Now (JAR, 25KB)
Readme
Source
Row Prefetch Sample [11-Apr-2003]
This sample illustrates the row-prefetch
performance extension of Oracle JDBC drivers. Standard JDBC
receives the results of a query one row at a time, with each
row requiring a separate round trip to the database (or middle-tier
database cache). Row prefetching allows you to receive the results
more efficiently, in groups of multiple rows each.
Download
Now (JAR, 19KB)
Readme
Source
Scrollable Iterator Sample [11-Apr-2003]
This sample illustrates how to make use of
and access scrollable iterators in Oracle9i SQLJ. Scrollable
Iterators provide a way by which an application can move back
and forth in an iterator for accessing data. The functionality
is patterned after the JDBC 2.0 specification for scrollable
JDBC result sets.
Download
Now (JAR, 20KB)
Readme
Source
SQLJ and JPublisher Sample 11-Apr-2003]
This sample shows the following features
1. Using user defined SQL objects and collection types (nested
tables and VARRAY) in SQLJ code to perform database operations.
2. Passing object and collection types as parameters to a stored
procedure.
3. Using JPublisher to generate custom java classes for database
SQL Objects
Download
Now (JAR, 39KB)
Readme
Source
SQLJ with BC4J Sample [11-Apr-2003]
This sample demonstrates embedding SQLJ code
in Business Components for Java (BC4J) application.
Download
Now (JAR, 36KB)
Readme
Source
Streaming Data Sample [11-Apr-2003]
The sample illustrates how to store Java
objects into the database using SQLJ constructs. This sample
also features Datasource support in SQLJ context. The datasource
clause, while defining SQLJ contexts allows to refer to DataSource
objects in the JNDI namespace. At runtime, the program will
look up the data source object in the JNDI. The advantage here
is that, when the database is changed, appropriate changes need
to be done only in the JNDI tree, and re-compilation of source
file is not required. The database vendor specific code is removed
from the source and hence the code becomes completely portable.
Download
Now (JAR, 24KB)
Readme
Source
|