Skip Headers
Oracle9
i
JDBC Developer's Guide and Reference
Release 2 (9.2)
Part Number A96654-01
Home
Book List
Contents
Master Index
Feedback
Index
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Symbols
%, 9-55
A
absolute positioning in result sets, 13-2
absolute() method (result set), 13-14
acceptChanges() method, A-13
addBatch() method, 12-11
addConnectionEventListener() method (connection cache), 16-21
addRowSetListener() method, A-6
afterLast() method (result sets), 13-14
ANO (Oracle Advanced Security), 18-8
ANSI Web site, 9-53
APPLET HTML tag, 18-24
applets
connecting to a database, 18-15
deploying in an HTML page, 18-24
packaging, 18-23
for JDK 1.2.x or 1.1.x browser, 18-23
packaging and deploying, 1-11
signed applets
browser security, 18-19
object-signing certificate, 18-20
using signed applets, 18-19
using with firewalls, 18-20
working with, 18-15
ARCHIVE, parameter for APPLET tag, 18-25
ARRAY
class, 6-12
descriptors, 6-12
objects, creating, 6-12,
11-12
array descriptor
creating, 11-22
ArrayDescriptor object, 11-11,
11-22
creating, 11-12
deserialization, 11-15
get methods, 11-14
serialization, 11-15
setConnection() method, 11-15
arrays
defined, 11-2
getting, 11-19
named, 11-2
passing to callable statement, 11-23
retrieving from a result set, 11-16
retrieving partial arrays, 11-19
using type maps, 11-25
working with, 11-2
ASO (Oracle Advanced Security), 18-8
authentication (security), 18-9
AUTHENTICATION_LEVEL parameter, 18-18
auto-commit mode
disabling, 19-7
result set behavior, 19-7
B
batch updates--see update batching
batch value
checking value, 12-7
connection batch value, setting, 12-5
connection vs. statement value, 12-4
default value, 12-5
overriding value, 12-7
statement batch value, setting, 12-6
BatchUpdateException, 12-16
beforeFirst() method, A-10
beforeFirst() method (result sets), 13-13
BFILE
accessing data, 8-25
class, 6-12
creating and populating columns, 8-23
defined, 3-29
introduction, 8-2
locators, 8-20
getting from a result set, 8-20
getting from callable statement, 8-21
passing to callable statements, 8-21
passing to prepared statements, 8-21
manipulating data, 8-25
reading data, 8-22
BFILE locator, selecting, 6-13
BigDecimal mapping (for attributes), 9-47
BLOB, 8-5
class, 6-12
creating and populating, 8-10
creating columns, 8-11
getting locators, 8-3
introduction, 8-2
locators
getting from result set, 8-4
selecting, 6-13
manipulating data, 8-12
populating columns, 8-11
reading data, 8-6,
8-8
writing data, 8-9
Boolean parameters, restrictions, 19-10
branch qualifier (distributed transactions), 15-16
C
cache schemes (connection cache), 16-26
CachedRowSet, A-9
caching, client-side
custom use for scrollable result sets, 13-6
Oracle use for scrollable result sets, 13-5
callable statement
getting a BFILE locator, 8-21
getting LOB locators, 8-4
passing BFILE locator, 8-21
passing LOB locators, 8-5
using getOracleObject() method, 7-5
cancelRowUpdates() method (result set), 13-20
casting return values, 7-10
catalog arguments (DatabaseMetaData), 20-17
CHAR class
conversions with KPRB driver, 18-33
CHAR columns
globalization size restrictions, Thin, 18-6
space padding, 19-9
using setFixedCHAR() to match in WHERE, 7-17
character sets, 6-32
conversions with KPRB driver, 18-33
checksums
code example, 18-13
setting parameters in Java, 18-13
support by OCI drivers, 18-11
support by Thin driver, 18-12
Class.forName method, 3-3
CLASSPATH, specifying, 2-7
clearBatch() method, 12-14
clearClientIdentifier() method, 6-19
clearDefines() method, 12-24
clearMetaData parameter, 17-11
client installation, 1-10
CLOB
class, 6-12
creating and populating, 8-10
creating columns, 8-11
introduction, 8-2
locators, 8-3
getting from result set, 8-4
passing to callable statements, 8-5
passing to prepared statement, 8-5
locators, selecting, 6-13
manipulating data, 8-12
populating columns, 8-11
reading data, 8-6,
8-9
writing data, 8-9
close(), 14-4
close() method, 6-20,
6-21,
6-22,
19-9
for caching statements, 14-7,
14-8
for OracleConnectionCache interface, 16-23
closeFile() method, 8-26
closePooledConnection() method, 16-23
closeWithKey(), 14-4
closeWithKey() method, 14-9,
14-10
CMAN.ORA file, creating, 18-18
CODE, parameter for APPLET tag, 18-24
CODEBASE, parameter for APPLET tag, 18-24
collections
defined, 11-2
collections (nested tables and arrays), 11-11
column types
defining, 12-23
redefining, 12-20
commit a distributed transaction branch, 15-15
commit changes to database, 3-13
CONCUR_READ_ONLY result sets, 13-9
CONCUR_UPDATABLE result sets, 13-9
concurrency types in result sets, 13-4
connect string
Connection Manager, 18-18
for KPRB driver, 18-28
connection
closing, 3-14
from KPRB driver, 1-13
opening, 3-3
opening for JDBC OCI driver, 3-9
opening for JDBC Thin driver, 3-10
Properties object, 3-6
connection caching
adding connection event listener, 16-21
basics, accessing the cache, 16-17
basics, closing connections, 16-18
basics, opening connections, 16-17
basics, setting up a cache, 16-16
cache instance getConnection() method, 16-17
connection events, 16-18
creating connection event listener, 16-21
implementation scenarios, 16-19
OracleConnectionCache interface, 16-23
OracleConnectionCacheImpl class, 16-24
OracleConnectionEventListener class, 16-28
overview, 16-16
preliminary steps, 16-20
removing connection event listener, 16-22
steps in closing a connection, 16-22
steps in opening a connection, 16-20
connection event listener, 16-21
Connection Manager, 18-16
installing, 18-17
starting, 18-18
using, 18-17
using multiple managers, 18-19
writing the connect string, 18-18
connection methods, JDBC 2.0 result sets, 13-32
connection pooling
concepts, 16-11
creating data source and connecting, 16-14
introduction, 16-11
Oracle data source implementation, 16-12
pooled connections, 16-13
standard data source interface, 16-12
connection properties
database, 3-7
defaultBatchValue, 3-7
defaultRowPrefetch, 3-7
includeSynonyms, 3-7
internal_logon, 3-7
sysdba, 3-8
sysoper, 3-8
password, 3-7
put() method, 3-9
remarksReporting, 3-7
user, 3-7
connectionClosed() method (connection event listener), 16-28
connectionErrorOccurred() method (connection event listener), 16-28
connections
read-only, 19-16
constants for SQL types, 6-23
CREATE DIRECTORY statement
for BFILEs, 8-23
CREATE TABLE statement
to create BFILE columns, 8-23
to create BLOB, CLOB columns, 8-11
CREATE TYPE command, 9-53,
9-55,
9-63
CREATE TYPE statement, 9-29,
9-52
create() method
for ORADataFactory interface, 9-21
createDescriptor() method, 9-5,
9-61,
11-14
createStatement(), 14-4
createStatement() method, 6-19,
14-10
createStatementWithKey() method, 14-11
createTemporary() method, 8-18
creationState() method, 14-6
code example, 14-7
CursorName
limitations, 20-16
cursors, 19-9
custom collection classes
and JPublisher, 11-27
defined, 11-2,
11-27
custom Java classes, 6-4
defined, 9-2
custom object classes
creating, 9-10
defined, 9-2
custom reference classes
and JPublisher, 10-10
defined, 10-2,
10-10
D
data conversions, 7-2
LONG, 3-21
LONG RAW, 3-21
data sources
creating and connecting (with JNDI), 16-8
creating and connecting (without JNDI), 16-7
logging and tracing, 16-10
Oracle implementation, 16-3
PrintWriter, 16-10
properties, 16-4
standard interface, 16-3
data streaming
avoiding, 3-24
database
connecting
from an applet, 18-15
via multiple Connection Managers, 18-19
with server-side internal driver, 18-26
connection testing, 2-9
database connection
connection property, 3-7
database meta data methods, JDBC 2.0 result sets, 13-35
database URL
including userid and password, 3-5
database URL, specifying, 3-5
DatabaseMetaData calls, 20-17
DatabaseMetaData class, 20-12
entry points for applets, 18-23
datatype classes, 6-8
datatype mappings, 3-16
datatypes
Java, 3-16
Java native, 3-16
JDBC, 3-16
Oracle SQL, 3-16
DATE class, 6-13
DBMS_LOB package, 8-6
debugging JDBC programs, 19-12
DEFAULT_CHARSET character set value, 6-31
defaultBatchValue connection property, 3-7
defaultConnection() method, 18-26
defaultRowPrefetch connection property, 3-7
defineColumnType() method, 3-25,
6-20,
12-24
DELETE in a result set, 13-18
deleteRow() method (result set), 13-18
deletesAreDetected() method (database meta data), 13-29
deserialization
ArrayDescriptor object, 11-15
creating a StructDescriptor object, 9-6
creating an ArrayDescriptor object, 11-15
definition of, 9-6,
11-15
StructDescriptor object, 9-6
disabling
escape processing, 3-7
distributed transaction ID component, 15-16
distributed transactions
branch qualifier, 15-16
check for same resource manager, 15-16
commit a transaction branch, 15-15
components and scenarios, 15-3
concepts, 15-3
distributed transaction ID component, 15-16
end a transaction branch, 15-13
example of implementation, 15-21
global transaction identifier, 15-16
ID format identifier, 15-16
introduction, 15-2
Oracle XA connection implementation, 15-9
Oracle XA data source implementation, 15-8
Oracle XA ID implementation, 15-16
Oracle XA optimizations, 15-20
Oracle XA resource implementation, 15-10
prepare a transaction branch, 15-14
roll back a transaction branch, 15-15
start a transaction branch, 15-12
transaction branch ID component, 15-16
XA connection interface, 15-9
XA data source interface, 15-8
XA error handling, 15-19
XA exception classes, 15-18
XA ID interface, 15-16
XA resource functionality, 15-11
XA resource interface, 15-10
DriverManager class, 3-3
driverType, 16-6
dynamic SQL, 1-2
DYNAMIC_SCHEME (connection cache), 16-27
E
encryption
code example, 18-13
overview, 18-10
setting parameters in Java, 18-13
support by OCI drivers, 18-11
support by Thin driver, 18-12
end a distributed transaction branch, 15-13
Enterprise Java Beans (EJB), A-13
environment variables
specifying, 2-6
errors
general JDBC message structure, B-2
general JDBC messages, listed, B-3
processing exceptions, 3-34
TTC messages, listed, B-17
escape processing
disabling, 3-7
exceptions
printing stack trace, 3-35
retrieving error code, 3-34
retrieving message, 3-34
retrieving SQL state, 3-34
execute() method, A-16
executeBatch() method, 12-12
executeQuery() method, 6-20
executeUpdate() method, 12-9
expansion factor
and globalization, 18-6
explicit statement caching
definition of, 14-3
null data, 14-10
extensions to JDBC, Oracle, 6-1,
7-1,
9-1,
10-1,
11-1,
12-1
external changes (result set)
defined, 13-27
seeing, 13-28
visibility vs. detection, 13-29
external file
defined, 3-29
EXTERNAL NAME clause, 9-55
F
fetch direction in result sets, 13-17
fetch size, result sets, 13-24
finalizer methods, 19-9
firewalls
configuring for applets, 18-21
connect string, 18-22
described, 18-20
required rule list items, 18-21
using with applets, 1-11,
18-20
first() method (result sets), 13-14
FIXED_RETURN_NULL_SCHEME (connection cache), 16-27
floating-point compliance, 20-17
format identifier, transaction ID, 15-16
forward-only result sets, 13-3
freeTemporary() method, 8-18
function call syntax, SQL92 syntax, 20-14
G
getActiveSize() method (connection cache), 16-27
getARRAY() method, 11-16
getArray() method, 11-6,
11-10,
11-16
using type maps, 11-18
getArrayType() method, 11-14
getAsciiOutputStream() method, 8-15
for writing CLOB data, 8-7
getAsciiStream() method, 8-15
for reading CLOB data, 8-7
getAttributes() method, 9-3
used by Structs, 9-15
getAutoBuffering() method
of the oracle.sql.ARRAY class, 11-9
of the oracle.sql.STRUCT class, 9-9
getBaseName() method, 11-14
getBaseType() method, 11-6,
11-14,
11-20
getBaseTypeName() method, 10-4,
11-6
getBinaryOutputStream() method, 8-14
for writing BLOB data, 8-7
getBinaryStream() method, 3-23,
8-14,
8-26
for reading BFILE data, 8-22
for reading BLOB data, 8-6
getBufferSize() method, 8-14,
8-15
getBytes() method, 3-24,
6-10,
8-14,
8-26
getCacheSize() method (connection cache), 16-27
getCallWithKey(), 14-4
getCallWithKey() method, 14-10,
14-11
getCharacterOutputStream() method, 8-15
for writing CLOB data, 8-7
getCharacterStream() method, 8-15
for reading CLOB data, 8-7
getChars() method, 8-15
getChunkSize() method, 8-14,
8-16
getColumnCount() method, 7-19
getColumnName() method, 7-19
getColumns() method, 12-26
getColumnType() method, 7-19
getColumnTypeName() method, 7-19
getConcurrency() method (result set), 13-12
getConnection() method, 3-4,
11-15,
17-10,
18-26
getCursor() method, 6-35,
6-36
getCursorName() method
limitations, 20-16
getDefaultExecuteBatch() method, 6-19,
12-7
getDefaultRowPrefetch() method, 6-19,
12-21
getDescriptor() method, 9-4,
11-6
getDirAlias() method, 8-25,
8-27
getErrorCode() method (SQLException), 3-34
getExecuteBatch() method, 6-21,
12-6,
12-7
getFetchSize() method, 13-24
getJavaSQLConnection() method, 9-4,
11-6
getJavaSqlConnection() method, 6-26
getLanguage() method, 9-62
getMaxLength() method, 11-14
getMessage() method (SQLException), 3-34
getMetaData() method, 9-62
getName() method, 8-25,
8-26
getNumericFunctions() method, 20-12
getObject() method
casting return values, 7-10
for object references, 10-6
for ORAData objects, 9-22
for SQLInput streams, 9-16
for SQLOutput streams, 9-17
for Struct objects, 9-7
return types, 7-4,
7-6
to get BFILE locators, 8-20
to get Oracle objects, 9-7
used with ORAData interface, 9-24
getOracleArray() method, 11-6,
11-16,
11-19
getOracleAttributes() method, 9-4,
9-8
getOracleObject() method, 6-21,
6-22
casting return values, 7-10
return types, 7-4,
7-6
using in callable statement, 7-5
using in result set, 7-5
getOraclePlsqlIndexTable() method, 17-22,
17-25,
17-26
argument
int paramIndex, 17-26
code example, 17-27
getORAData() method, 9-22,
9-24
getPassword() method, 16-5
getPlsqlIndexTable() method, 17-22,
17-25,
17-27
arguments
Class primitiveType, 17-28
int paramIndex, 17-28
code example, 17-26,
17-28
getProcedureColumns() method, 12-26
getProcedures() method, 12-26
getREF() method, 10-7
getRemarksReporting() method, 6-20
getResultSet() method, 6-20,
11-6
getRow() method (result set), 13-15
getRowPrefetch() method, 6-20,
12-21
getSQLState() method (SQLException), 3-34
getSQLTypeName() method, 9-3,
11-6,
11-20
getStatementCacheSize() method
code example, 14-6
getStatementWithKey(), 14-4
getStatementWithKey() method, 14-10,
14-11
getString() method, 6-31
to get ROWIDs, 6-33
getStringFunctions() method, 20-12
getStringWithReplacement() method, 6-32
getSTRUCT() method, 9-7
getSubString() method, 8-16
for reading CLOB data, 8-7
getSystemFunctions() method, 20-12
getTimeDateFunctions() method, 20-12
getTransactionIsolation() method, 6-19,
19-16
getType() method (result set), 13-12
getTypeMap() method, 6-19,
9-13
getUpdateCounts() method (BatchUpdateException), 12-16
getValue() method, 10-5
for object references, 10-6
getXXX() methods
casting return values, 7-10
for specific datatypes, 7-7
Oracle extended properties, 16-6
global transaction identifier (distributed transactions), 15-16
global transactions, 15-2
globalization
and JDBC drivers, 18-3
conversions, 18-3
for JDBC OCI drivers, 18-3
for JDBC Thin drivers, 18-4
for KPRB driver, 18-4
expansion factor, 18-6
Java methods that employ, 18-2
Thin driver CHAR/VARCHAR2 size restrictions, 18-6
using, 18-2
H
HEIGHT, parameter for APPLET tag, 18-24
HeteroRM XA, 17-19
HTML tags, to deploy applets, 18-24
http
//www.ansi.org/, 9-53
HTTP protocol, 1-5
I
IEEE 754 floating-point compliance, 20-17
implicit statement caching
definition of, 14-2
Least Recently Used (LRU) scheme, 14-3
IN OUT parameter mode, 17-24
IN parameter mode, 17-22
includeSynonyms connection property, 3-7
INSERT in a result set, 13-21
INSERT INTO statement
for creating BFILE columns, 8-24
insertRow() method (result set), 13-22
insertsAreDetected() method (database meta data), 13-29
installation
client, 1-10
directories and files, 2-5
verifying on the client, 2-5
integrity
code example, 18-13
overview, 18-10
setting parameters in Java, 18-13
support by OCI drivers, 18-11
support by Thin driver, 18-12
internal changes (result set)
defined, 13-27
seeing, 13-27
internal_logon connection property, 3-7
sysdba, 3-8
sysoper, 3-8
isAfterLast() method (result set), 13-15
isBeforeFirst() method (result set), 13-15
isFileOpen() method, 8-27
isFirst() method (result set), 13-15
isLast() method (result set), 13-15
isSameRM() (distributed transactions), 15-16
isTemporary() method, 8-18
J
Java
compiling and running, 2-8
datatypes, 3-16
native datatypes, 3-16
stored procedures, 3-33
stream data, 3-20
Java Naming and Directory Interface (JNDI), 16-2
Java Sockets, 1-5
Java virtual machine (JVM), 1-8,
18-26
JavaBeans, A-2
java.math, Java math packages, 3-2
JavaSoft, A-2
java.sql, JDBC packages, 3-2
java.sql.SQLData, 9-53
java.sql.SQLException() method, 3-34
java.sql.Types class, 12-24
java.util.Dictionary class
used by type maps, 9-12
java.util.Map class, 11-19
java.util.Properties, 17-7
JDBC
and IDEs, 1-15
basic program, 3-2
datatypes, 3-16
defined, 1-2
guidelines for using, 1-3
importing packages, 3-2
limitations of Oracle extensions, 20-16
sample files, 2-8
testing, 2-9
JDBC 2.0 support
datatype support, 4-3
extended feature support, 4-5
introduction, 4-2,
5-2
JDK 1.2.x vs. JDK 1.1.x, 4-3,
5-3
overview of features, 4-7,
5-4
standard feature support, 4-4
JDBC drivers
and globalization, 18-3
applets, 1-10
applications, 1-10
choosing a driver for your needs, 1-8
common features, 1-4
common problems, 19-9
compatibilities, 2-2
determining driver version, 2-8
introduction, 1-4
registering, 3-3
requirements, 2-2
restrictions, 19-10
SQL92 syntax, 20-10
JDBC mapping (for attributes), 9-46
JdbcCheckup program, 2-9
JDBCSpy, 19-15
JDBCTest, 19-15
JDeveloper, 1-15
Jdeveloper, A-4
JDK
migration from 1.1.x to 1.2.x, 4-5
versions supported, 1-14
JNDI
looking up data source, 16-9
overview of Oracle support, 16-2
registering data source, 16-9
JPublisher, 6-4,
9-25,
9-45
JPublisher utility, 6-4,
9-10
creating custom collection classes, 11-27
creating custom Java classes, 9-45
creating custom reference classes, 10-10
SQL type categories and mapping options, 9-46
type mapping modes and settings, 9-46
type mappings, 9-45
JVM, 1-8,
18-26
K
KPRB driver
connection string for, 18-28
described, 1-8
globalization considerations, 18-4
relation to the SQL engine, 18-26
session context, 18-30
testing, 18-30
transaction context, 18-30
L
last() method (result set), 13-14
LD_LIBRARY_PATH variable, specifying, 2-7
Least Recently Used (LRU) scheme, 14-3,
17-8
length() method, 8-14,
8-16,
8-27,
11-6
libheteroxa9_g.so Solaris shared library, 17-19
libheteroxa9.so Solaris shared library, 17-19
LIKE escape characters, SQL92 syntax, 20-13
limitations on setBytes() and setString(), use of streams to avoid, 3-31
loadjava tool, 9-55
LOB
defined, 3-27
introduction, 8-2
locators, 8-2
reading data, 8-6
LOB locators
getting from callable statements, 8-4
passing, 8-5
LOBs
empty, 8-17
locators
getting for BFILEs, 8-20
getting for BLOBs, 8-3
getting for CLOBs, 8-3
LOB, 8-2
passing to callable statements, 8-5
passing to prepared statement, 8-5
logging with a data source, 16-10
logical connection instance, 16-11
LONG
data conversions, 3-21
LONG RAW
data conversions, 3-21
LRU scheme, 14-3,
17-8
M
make() method, 6-30
memory leaks, 19-9
migration from JDK 1.1.x to 1.2.x, 4-5
moveToCurrentRow() method (result set), 13-21
moveToInsertRow() method (result set), 13-21
mutable arrays, 11-27
N
named arrays, 11-2
defined, 11-11
Native Method Interface, 1-14
nativeXA, 16-6,
17-19
NC, A-13
Network Computer (NC), A-13
network events, trapping, 19-12
next() method, A-10
next() method (result set), 13-15
NLS_LANG environment variable, 18-3
NMI (Native Method Interface), 1-14
NULL data
converting, 7-2
null data
explicit statement caching, 14-10
NUMBER class, 6-13
O
object references
accessing object values, 10-7,
10-9
described, 10-2
passing to prepared statements, 10-8
retrieving, 10-6
retrieving from callable statement, 10-7
updating object values, 10-7,
10-9
object-JDBC mapping (for attributes), 9-46
OCI driver
applications, 1-10
described, 1-6
globalization considerations, 18-3
ODBCSpy, 19-15
ODBCTest, 19-15
openFile() method, 8-26
optimization, performance, 19-7
Oracle Advanced Security, 1-10
support by JDBC, 18-8
support by OCI drivers, 18-8
support by Thin driver, 18-9
Oracle Connection Manager, 1-10,
18-16
Oracle datatypes
using, 7-1
Oracle extensions
datatype support, 6-3
limitations, 20-16
catalog arguments to DatabaseMetaData calls, 20-17
CursorName, 20-16
IEEE 754 floating-point compliance, 20-17
PL/SQL TABLE, BOOLEAN, RECORD types, 20-16
read-only connection, 19-16
SQL92 outer join escapes, 20-16
SQLWarning class, 20-17
object support, 6-4
packages, 6-2
result sets, 7-3
schema naming support, 6-5
statements, 7-3
support under 8.0.x/7.3.x drivers, 6-36
to JDBC, 6-1,
7-1,
9-1,
10-1,
11-1,
12-1
Oracle mapping (for attributes), 9-46
Oracle Net
name-value pair, 3-4
protocol, 1-5
Oracle objects
and JDBC, 9-2
converting with ORAData interface, 9-21
converting with SQLData interface, 9-15
getting with getObject() method, 9-7
Java classes which support, 9-3
mapping to custom object classes, 9-10
reading data by using SQLData interface, 9-17
working with, 9-2
writing data by using SQLData interface, 9-20
Oracle SQL datatypes, 3-16
OracleCallableStatement interface, 6-21
getOraclePlsqlIndexTable() method, 17-22
getPlsqlIndexTable() method, 17-22
getTIMESTAMP(), 6-14
getTIMESTAMPLTZ(), 6-14
getTIMESTAMPTZ(), 6-14
getXXX() methods, 7-7
registerIndexTableOutParameter() method, 17-22,
17-24
registerOutParameter() method, 7-13
setPlsqlIndexTable() method, 17-21,
17-22
OracleCallableStatement object, 14-2,
14-3
OracleConnection class, 6-18
OracleConnection interface, 17-4
OracleConnection object, 14-2
OracleConnectionCache interface, 16-23
close() method, 16-23
closePooledConnection() method, 16-23
reusePooledConnection() method, 16-23
OracleConnectionCacheImpl class, 16-24,
16-26
getActiveSize() method, 16-27
getCacheSize() method, 16-27
instantiating and setting properties, 16-24
schemes for new pooled connections, 16-26
setCacheScheme() method, 16-27
setConnectionPoolDataSource() method, 16-25
setMaxLimit() method
setMaxLimit() method (connection cache), 16-26
setMinLimit() method
setMinLimit() method (connection cache), 16-26
setting maximum pooled connections, 16-25
setting minimum pooled connections, 16-26
OracleConnectionCacheImpl interface, 17-4
OracleConnectionEventListener
connectionClosed() method, 16-28
OracleConnectionEventListener class, 16-28
connectionErrorOccurred() method, 16-28
instantiating, 16-28
setDataSource() method, 16-28
OracleConnectionPoolDataSouorce class, 16-12
OracleDatabaseMetaData class, 20-12
and applets, 18-23
OracleDataSource class, 16-3,
17-4
OracleDriver class, 6-18
oracle.jdbc. package, 6-16
oracle.jdbc., Oracle JDBC extensions, 3-3
oracle.jdbc2 package, described, 6-27
oracle.jdbc2.Struct class, 6-11
getAttributes() method, 9-3
getSQLTypeName() method, 9-3
oracle.jdbc.OracleCallableStatement interface, 6-21
close() method, 6-22
getOracleObject() method, 6-21
getXXX() methods, 6-21,
6-23
registerOutParameter() method, 6-22
setNull() method, 6-22
setOracleObject() methods, 6-22
setXXX() methods, 6-22
oracle.jdbc.OracleConnection interface, 6-18
clearClientIdentifier() method, 6-19
createStatement() method, 6-19
getDefaultExecuteBatch() method, 6-19
getDefaultRowPrefetch() method, 6-19
getRemarksReporting() method, 6-20
getTransactionIsolation() method, 6-19,
19-16
getTypeMap() method, 6-19
prepareCall() method, 6-19
prepareStatement() method, 6-19
setClientIdentifier() method, 6-19
setDefaultExecuteBatch() method, 6-19
setDefaultRowPrefetch() method, 6-19
setRemarksReporting() method, 6-20
setTransactionIsolation() method, 6-19,
19-16
setTypeMap() method, 6-19
oracle.jdbc.OracleDriver class, 6-18
oracle.jdbc.OraclePreparedStatement interface, 6-20
close() method, 6-21
getExecuteBatch() method, 6-21
setExecuteBatch() method, 6-21
setNull() method, 6-21
setOracleObject() method, 6-21
setORAData() method, 6-21
setXXX() methods, 6-21
oracle.jdbc.OracleResultSet interface, 6-22
getOracleObject() method, 6-22
oracle.jdbc.OracleResultSetMetaData interface, 6-23,
7-19
getColumnCount() method, 7-19
getColumnName() method, 7-19
getColumnType() method, 7-19
getColumnTypeName() method, 7-19
using, 7-19
oracle.jdbc.OracleSql class, 20-14
oracle.jdbc.OracleStatement interface, 6-20
close() method, 6-20
defineColumnType(), 6-20
executeQuery() method, 6-20
getResultSet() method, 6-20
getRowPrefetch() method, 6-20
setRowPrefetch() method, 6-20
oracle.jdbc.OracleTypes class, 6-23,
12-24
oracle.jdbc.pool package, 16-14,
17-5
oracle.jdbc.StructMetaData, 9-62
oracle.jdbc.StructMetaData interface, 9-61
oracle.jdbc.xa package and subpackages, 15-7
OracleOCIConnection class, 17-4
OracleOCIConnectionPool class, 17-2,
17-4
OracleOCIFailover interface, 17-5
OraclePooledConnection class, 16-13,
16-14,
17-2
OraclePooledConnection method
definitions, 16-14
OraclePooledConnection object, 14-2
OraclePreparedStatement interface, 6-20
getOraclePlsqlIndexTable() method, 17-22
getPlsqlIndexTable() method, 17-22
registerIndexTableOutParameter() method, 17-22
setPlsqlIndexTable() method, 17-21,
17-22
setTIMESTAMP(), 6-14
setTIMESTAMPLTZ(), 6-14
setTIMESTAMPTZ(), 6-14
OraclePreparedStatement object, 14-2,
14-3
OracleResultSet interface, 6-22
getXXX() methods, 7-7
OracleResultSetCache interface, 13-6
OracleResultSetMetaData interface, 6-23
OracleServerDriver class
defaultConnection() method, 18-27
oracle.sql datatype classes, 6-8
oracle.sql package
data conversions, 7-2
described, 6-7
oracle.sql.ARRAY class, 11-2
and nested tables, 6-12
and VARRAYs, 6-12
createDescriptor() method, 11-14
getArray() method, 11-6
getArrayType() method, 11-14
getAutoBuffering() method, 11-9
getBaseType() method, 11-6
getBaseTypeName() method, 11-6
getDescriptor() method, 11-6
getJavaSQLConnection() method, 11-6,
11-15
getMaxLength() method, 11-14
getOracleArray() method, 11-6
getResultSet() method, 11-6
getSQLTypeName() method, 11-6
length() method, 11-6
methods for Java primitive types, 11-8
setAutoBuffering() method, 11-9
setAutoIndexing() method, 11-10
oracle.sql.ArrayDescriptor class
getBaseName() method, 11-14
getBaseType() method, 11-14
oracle.sql.BFILE class, 6-12
closeFile() method, 8-26
getBinaryStream() method, 8-26
getBytes() method, 8-26
getDirAlias() method, 8-27
getName() method, 8-26
isFileOpen() method, 8-27
length() method, 8-27
openFile() method, 8-26
position() method, 8-27
oracle.sql.BLOB class, 6-12
getBinaryOutputStream() method, 8-14
getBinaryStream() method, 8-14
getBufferSize() method, 8-14
getBytes() method, 8-14
getChunkSize() method, 8-14
length() method, 8-14
position() method, 8-14
putBytes() method, 8-14
oracle.sql.CHAR class, 18-33
getString() method, 6-31
getStringWithReplacement() method, 6-32
toString() method, 6-31
oracle.sql.CharacterSet class, 6-30
oracle.sql.CLOB class, 6-12
getAsciiOutputStream() method, 8-15
getAsciiStream() method, 8-15
getBufferSize() method, 8-15
getCharacterOutputStream() method, 8-15
getCharacterStream() method, 8-15
getChars() method, 8-15
getChunkSize() method, 8-16
getSubString() method, 8-16
length() method, 8-16
position() method, 8-16
putChars() method, 8-16
putString() method, 8-16
supported character sets, 8-13
oracle.sql.datatypes
support, 6-10
oracle.sql.DATE class, 6-13
oracle.sql.Datum array, 17-26
oracle.sql.Datum class, described, 6-7
oracle.sql.NUMBER class, 6-13
oracle.sql.ORAData, 9-53
oracle.sql.ORAData interface, 9-21
oracle.sql.ORADataFactory, 9-53
oracle.sql.ORADataFactory interface, 9-21
OracleSql.parse() method, 20-14
oracle.sql.RAW class, 6-13
oracle.sql.REF class, 6-12,
10-2
getBaseTypeName() method, 10-4
getValue() method, 10-5
setValue() method, 10-5
oracle.sql.ROWID class, 6-10,
6-15,
6-33
oracle.sql.STRUCT class, 6-10,
9-3
getAutoBuffering() method, 9-9
getDescriptor() method, 9-4
getJavaSQLConnection() method, 9-4
getOracleAttributes() method, 9-4
setAutoBuffering() method, 9-9
toJDBC() method, 9-4
oracle.sql.StructDescriptor class, 9-61
createDescriptor() method, 9-5
OracleStatement interface, 6-20
OracleTypes class, 6-23
OracleTypes class for typecodes, 6-23
OracleTypes.CURSOR variable, 6-36
OracleXAConnection class, 15-9
OracleXADataSource class, 15-8
OracleXAResource class, 15-10,
15-11
OracleXid class, 15-16
ORAData interface, 6-4
additional uses, 9-26
advantages, 9-11
Oracle object types, 9-1
reading data, 9-23
writing data, 9-25
othersDeletesAreVisible() method (database meta data), 13-28
othersInsertsAreVisible() method (database meta data), 13-28
othersUpdatesAreVisible() method (database meta data), 13-28
OUT parameter mode, 17-24,
17-25
outer joins, SQL92 syntax, 20-13
ownDeletesAreVisible() method (database meta deta), 13-27
ownInsertsAreVisible() method (database meta data), 13-28
ownUpdatesAreVisible() method (database meta data), 13-27
P
parameter modes
IN, 17-22
IN OUT, 17-24
OUT, 17-24,
17-25
password connection property, 3-7
password, specifying, 3-5
PATH variable, specifying, 2-7
PDA, A-13
performance enhancements, standard vs. Oracle, 4-5
performance extensions
defining column types, 12-23
prefetching rows, 12-20
TABLE_REMARKS reporting, 12-26
performance optimization, 19-7
Personal Digital Assistant (PDA), A-13
PL/SQL
IN parameter, 9-59
OUT parameters, 9-60
restrictions, 19-10
space padding, 19-9
stored procedures, 3-32
PL/SQL index-by tables
mapping, 17-25
scalar datatypes, 17-21
PL/SQL types
corresponding JDBC types, 17-21
limitations, 20-16
PoolConfig() method, 17-7
pooled connections
Oracle implementation, 16-13
standard interface, 16-13
populate() method, A-10
position() method, 8-14,
8-16,
8-27
positioning in result sets, 13-2
prefetching rows, 12-20
suggested default, 12-23
prepare a distributed transaction branch, 15-14
prepareCall(), 14-4
prepareCall() method, 6-19,
14-8,
14-9,
14-10
prepared statement
passing BFILE locator, 8-21
passing LOB locators, 8-5
using setObject() method, 7-12
using setOracleObject() method, 7-12
PreparedStatement object
creating, 3-12
prepareStatement(), 14-4
prepareStatement() method, 6-19,
14-8,
14-9,
14-10
code example, 14-8
previous() method (result set), 13-15
printStackTrace() method (SQLException), 3-35
PrintWriter for a data source, 16-10
processEscapes
connection property, 3-7
put() method
for Properties object, 3-9
for type maps, 9-13
putBytes() method, 8-14
putChars() method, 8-16
putString() method, 8-16
Q
query, executing, 3-11
R
RAW class, 6-13
RDBMS, 1-5
read-only result set concurrency type, 13-4
readSQL() method, 9-15,
9-16,
9-54,
9-61
implementing, 9-16
REF class, 6-12
REF CURSORs, 6-35
materialized as result set objects, 6-35
refetching rows into a result set, 13-26,
13-29
refreshRow() method (result set), 13-26
registerDriver() method, 6-18
registerIndexTableOutParameter() method, 17-22,
17-24
arguments
int elemMaxLen, 17-24
int elemSqlType, 17-24
int maxLen, 17-24
int paramIndex, 17-24
code example, 17-25
registering Oracle JDBC drivers, class for, 6-18
registerOutParameter() method, 6-22,
7-13,
9-61
Relational Database Management System (RDBMS), 1-5
relative positioning in result sets, 13-2
relative() method (result set), 13-14
remarksReporting connection property, 3-7
remarksReporting flag, 12-20
Remote Method Invocation (RMI), A-12
removeConnectionEventListener method (connection cache), 16-22
resource managers, 15-3
result set
auto-commit mode, 19-7
getting BFILE locators, 8-20
getting LOB locators, 8-4
metadata, 6-23
Oracle extensions, 7-3
using getOracleObject() method, 7-5
result set enhancemennts
positioning result sets, 13-13
result set enhancements
concurrency types, 13-4
downgrade rules, 13-11
fetch size, 13-24
limitations, 13-10
Oracle scrollability requirements, 13-5
Oracle updatability requirements, 13-5
positioning, 13-2
processing result sets, 13-16
refetching rows, 13-26,
13-29
result set types, 13-3
scrollability, 13-2
seeing external changes, 13-28
seeing internal changes, 13-27
sensitivity to database changes, 13-2
specifying scrollability, updatability, 13-8
summary of methods, 13-32
summary of visibility of changes, 13-30
updatability, 13-4
updating result sets, 13-18
visibility vs. detection of external changes, 13-29
result set fetch size, 13-24
result set methods, JDBC 2.0, 13-32
result set object
closing, 3-12
result set types for scrollability and sensitivity, 13-3
result set, processing, 3-11
ResultSet class, 3-11
ResultSet() method, 11-10
ResultSetMetaData class, 9-62
return types
for getXXX() methods, 7-7
getObject() method, 7-6
getOracleObject() method, 7-6
return values
casting, 7-10
reusePooledConnection() method, 16-23
RMI, A-12
roll back a distributed transaction branch, 15-15
roll back changes to database, 3-13
row prefetching, 12-20
and data streams, 3-31
ROWID class, 6-15
CursorName methods, 20-16
defined, 6-33
ROWID, use for result set updates, 13-5
S
scalar functions, SQL92 syntax, 20-12
schema naming conventions, 6-5
scrollability in result sets, 13-2
scrollable result sets
creating, 13-8
fetch direction, 13-17
implementation of scroll-sensitivity, 13-30
positioning, 13-13
processing backward/forward, 13-16
refetching rows, 13-26,
13-29
scroll-insensitive result sets, 13-3
scroll-sensitive result sets, 13-3
seeing external changes, 13-28
visibility vs. detection of external changes, 13-29
scroll-sensitive result sets
limitations, 13-10
security
authentication, 18-9
encryption, 18-10
integrity, 18-10
Oracle Advanced Security support, 18-8
overview, 18-8
SELECT statement
to retrieve object references, 10-6
to select LOB locator, 8-12
sendBatch() method, 12-7,
12-9
sensitivity in result sets to database changes, 13-2
serialization
ArrayDescriptor object, 11-15
definition of, 9-6,
11-15
StructDescriptor object, 9-6
server-side internal driver
connection to database, 18-26
server-side Thin driver, described, 1-7
session context, 1-13
for KPRB driver, 18-30
setAsciiStream() method, 7-16
setAutoBuffering() method
of the oracle.sql.ARRAY class, 11-9
of the oracle.sql.STRUCT class, 9-9
setAutoCommit() method, 19-7
setAutoIndexing() method, 11-10
direction parameter values
ARRAY.ACCESS_FORWARD, 11-10
ARRAY.ACCESS_REVERSE, 11-10
ARRAY.ACCESS_UNKNOWN, 11-10
setBFILE() method, 8-21
setBinaryStream() method, 7-16
setBLOB() method, 8-5
setBlob() method, JDK 1.1.x, 8-5
setBlob() method, JDK 1.2.x, 8-5
setBytes() limitations, using streams to avoid, 3-31
setCacheScheme() method (connection cache), 16-27
setCharacterStream() method, 7-16
setClientIdentifier() method, 6-19
setCLOB() method, 8-5
setClob() method, 1.1.x, 8-5
setClob() method, JDK 1.2.x, 8-5
setConnection() method
ArrayDescriptor object, 11-15
StructDescriptor object, 9-6
setConnectionPoolDataSource method (connection cache), 16-25
setCursorName() method, 20-16
setDataSource() method (connection event listener), 16-28
setDate() method, 7-16
setDefaultExecuteBatch() method, 6-19,
12-5
setDefaultRowPrefetch() method, 6-19,
12-21
setDisableStatementCaching() method, 14-8
setEscapeProcessing() method, 20-10
setExecuteBatch() method, 6-21,
12-6
setFetchSize() method, 13-24
setFixedCHAR() method, 7-17
setFormOfUse() method, 6-28
setMaxFieldSize() method, 12-24,
19-9
setNull() method, 6-21,
6-22,
7-13
setObejct() method, 7-11
setObject() method
for BFILES, 8-21
for BLOBs and CLOBs, 8-5
for CustomDatum objects, 9-23
for object references, 10-8
for STRUCT objects, 9-8
to write object data, 9-26
using in prepared statements, 7-12
setOracleObject() method, 6-21,
6-22,
7-11
for BFILES, 8-21
for BLOBs and CLOBs, 8-5
using in prepared statements, 7-12
setORAData() method, 6-21,
9-22,
9-26
setPlsqlIndexTable() method, 17-21,
17-22
arguments
int curLen, 17-23
int elemMaxLen, 17-23
int elemSqlType, 17-23
int maxLen, 17-22
int paramIndex, 17-22,
17-26
Object arrayData, 17-22
code example, 17-23
setPoolConfig() method, 17-7
setREF() method, 10-8
setRemarksReporting() method, 6-20,
12-26
setResultSetCache() method, 13-6
setRowPrefetch() method, 6-20,
12-21
setStmtCacheSize() method, 17-10
setString() limitations, using streams to avoid, 3-31
setString() method
to bind ROWIDs, 6-33
setTime() method, 7-17
setTimestamp() method, 7-17
setTransactionIsolation() method, 6-19,
19-16
setTypeMap() method, 6-19
setUnicodeStream() method, 7-16
setValue() method, 10-5
setXXX() methods
Oracle extended properties, 16-6
setXXX() methods, for empty LOBs, 8-17
setXXX() methods, for specific datatypes, 7-12
signed applets, 1-10
Solaris
shared libraries
libheteroxa9_g.so, 17-19
libheteroxa9.so, 17-19
SQL
data converting to Java datatypes, 7-2
primitive types, 6-7
structured types, 6-7
types, constants for, 6-23
SQL engine
relation to the KPRB driver, 18-26
SQL syntax (Oracle), 20-10
SQL*Plus, 9-55,
9-56,
9-59
SQL92 syntax, 20-10
function call syntax, 20-14
LIKE escape characters, 20-13
outer joins, 20-13
scalar functions, 20-12
time and date literals, 20-10
translating to SQL example, 20-14
SQLData interface, 6-4
advantages, 9-11
described, 9-15
Oracle implementation, 6-27
Oracle object types, 9-1
reading data from Oracle objects, 9-17
using with type map, 9-15
writing data from Oracle objects, 9-20
SQLInput interface, 9-15
described, 9-16
SQLInput streams, 9-16
SQLJ
guidelines for using, 1-3
SQLJ object type, 9-52
SQLNET.ORA
parameters for tracing, 19-12
SQLOutput interface, 9-15
described, 9-16
SQLOutput streams, 9-17
SQLWarning class, limitations, 20-17
start a distributed transaction branch, 15-12
statement caching
explicit
definition of, 14-3
null data, 14-10
implicit
definition of, 14-2
Least Recently Used (LRU) scheme, 14-3
statement methods, JDBC 2.0 result sets, 13-35
Statement object
closing, 3-12
creating, 3-11
statements
Oracle extensions, 7-3
static SQL, 1-2
stored procedures
Java, 3-33
PL/SQL, 3-32
stream data, 3-20,
8-6
CHAR columns, 3-25
closing, 3-29
example, 3-22
external files, 3-28
LOBs, 3-28
LONG columns, 3-20
LONG RAW columns, 3-20
multiple columns, 3-26
precautions, 3-29
RAW columns, 3-25
row prefetching, 3-31
UPDATE/COMMIT statements, 8-8
use to avoid setBytes() and setString() limitations, 3-31
VARCHAR columns, 3-25
stream data column
bypassing, 3-27
STRUCT class, 6-10
STRUCT descriptor, 9-4,
9-5
STRUCT object, 6-11
attributes, 6-11
creating, 9-4,
9-5
embedded object, 9-7
nested objects, 6-11
retrieving, 9-6
retrieving attributes as oracle.sql types, 9-8
StructDescriptor object
creating, 9-5
deserialization, 9-6
get methods, 9-5
serialization, 9-6
setConnection() method, 9-6
StructMetaData interface, 9-62
T
TABLE_REMARKS columns, 12-20
TABLE_REMARKS reporting
restrictions on, 12-26
TAF, definition of, 17-16
TCP/IP protocol, 1-5,
3-10
Thin driver
applets, 1-10,
18-15
applications, 1-10
CHAR/VARCHAR2 globalization size restrictions, 18-6
described, 1-5
globalization considerations, 18-4
server-side, described, 1-7
time and date literals, SQL92 syntax, 20-10
tnsEntry, 16-6,
17-19
TNSNAMES entries, 3-4
toDatum() method, 9-54
applied to CustomDatum objects, 9-11,
9-21
called by setORAData() method, 9-26
toJDBC() method, 9-4
toJdbc() method, 6-10
toString() method, 6-31
trace facility, 19-12
trace parameters
client-side, 19-13
server-side, 19-14
tracing with a data source, 16-10
transaction branch, 15-2
transaction branch ID component, 15-16
transaction context, 1-13
for KPRB driver, 18-30
transaction IDs (distributed transactions), 15-5
transaction managers, 15-3
transactions
switching between local and global, 15-5 to
15-7
Transparent Application Failover (TAF), definition of, 17-16
TTC error messages, listed, B-17
TTC protocol, 1-5,
1-6
type map, 6-4,
7-4
adding entries, 9-13
and STRUCTs, 9-15
creating a new map, 9-14
used with arrays, 11-18
used with SQLData interface, 9-15
using with arrays, 11-25
type map (SQL to Java), 9-10
type mapping
BigDecimal mapping, 9-47
JDBC mapping, 9-46
object JDBC mapping, 9-46
Oracle mapping, 9-46
type mappings
JPublisher options, 9-45
type maps
relationship to database connection, 18-28
TYPE_FORWARD_ONLY result sets, 13-8
TYPE_SCROLL_INSENSITIVE result sets, 13-8
TYPE_SCROLL_SENSITIVE result sets, 13-8
typecodes, Oracle extensions, 6-23
U
unicode data, 6-28
updatability in result sets, 13-4
updatable result set concurrency type, 13-4
updatable result sets
creating, 13-8
DELETE operations, 13-18
INSERT operations, 13-21
limitations, 13-10
refetching rows, 13-26,
13-29
seeing internal changes, 13-27
update conflicts, 13-23
UPDATE operations, 13-19
update batching
overview, Oracle vs. standard model, 12-2
overview, statements supported, 12-3
update batching (Oracle model)
batch value, checking, 12-7
batch value, overriding, 12-7
committing changes, 12-8
connection batch value, setting, 12-5
connection vs. statement batch value, 12-4
default batch value, 12-5
disable auto-commit, 12-4
example, 12-9
limitations and characteristics, 12-5
overview, 12-4
statement batch value, setting, 12-6
stream types not allowed, 12-5
update counts, 12-9
update batching (standard model)
adding to batch, 12-11
clearing the batch, 12-14
committing changes, 12-14
error handling, 12-16
example, 12-15
executing the batch, 12-12
intermixing batched and non-batched, 12-17
overview, 12-10
stream types not allowed, 12-11
update counts, 12-15
update counts upon error, 12-17
update conflicts in result sets, 13-23
update counts
Oracle update batching, 12-9
standard update batching, 12-15
upon error (standard batching), 12-17
UPDATE in a result set, 13-19
updateRow() method (result set), 13-20
updatesAreDetected() method (database meta data), 13-29
updateXXX() methods (result set), 13-19,
13-21
updateXXX() methods for empty LOBs, 8-17
updating result sets, 13-18
url, 16-6
user connection property, 3-7
userid, specifying, 3-5
V
VARCHAR2 columns, 19-9
globalization size restrictions, Thin, 18-6
W
WIDTH, parameter for APPLET tag, 18-24
window, scroll-sensitive result sets, 13-30
writeSQL() method, 9-15,
9-17,
9-54,
9-61
implementing, 9-16
X
XA
connection implementation, 15-9
connections (definition), 15-4
data source implementation, 15-8
data sources (definition), 15-3
definition, 15-2
error handling, 15-19
example of implementation, 15-21
exception classes, 15-18
Oracle optimizations, 15-20
Oracle transaction ID implementation, 15-16
resource implementation, 15-10
resources (definition), 15-4
transaction ID interface, 15-16
XAException, 15-16
Xids, 15-16
Copyright © 1999, 2002 Oracle Corporation.
All Rights Reserved.
Home
Book List
Contents
Master Index
Feedback