|
Oracle JDBC API Reference 11g Release 2 ("11.2.0.3.0") |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectoracle.jdbc.OracleConnectionWrapper
public class OracleConnectionWrapper
A simple implementation of a connection wrapper which may be nested to any depth.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface oracle.jdbc.OracleConnection |
|---|
OracleConnection.CommitOption, OracleConnection.DatabaseShutdownMode, OracleConnection.DatabaseStartupMode |
| Field Summary | |
|---|---|
static java.lang.String |
BUILD_DATE
|
static boolean |
TRACE
|
| Fields inherited from interface java.sql.Connection |
|---|
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE |
| Constructor Summary | |
|---|---|
OracleConnectionWrapper()
|
|
OracleConnectionWrapper(OracleConnection toBeWrapped)
Construct an instance which wraps the arguement |
|
| Method Summary | |
|---|---|
java.sql.Connection |
_getPC()
Return the underlying physical connection if this is a logical connection. |
void |
abort()
Calling abort() on an open connection does the following: marks the connection as closed, closes any sockets or other primitive connections to the database, and insures that any thread that is currently accessing the connection will either progress to completion of the JDBC call or throw an exception. |
void |
applyConnectionAttributes(java.util.Properties connAttr)
Applies the connection Attributes provided on the underlying PooledConnection. |
void |
archive(int mode,
int aseq,
java.lang.String acstext)
Not implemented. |
void |
cancel()
Performs an immediate (asynchronous) termination of any currently executing operation on this connection. |
void |
clearAllApplicationContext(java.lang.String nameSpace)
Clear all the attribute/value information in a namespace. |
void |
clearWarnings()
|
void |
close()
|
void |
close(int opt)
If opt is OracleConnection.INVALID_CONNECTION : Closes the given Logical connection, as well the underlying PooledConnection without returning the connection to the cache when called with the parameter INVALID_CONNECTION. |
void |
close(java.util.Properties connAttr)
Closes the given Logical connection, and returns the underlying PooledConnection to the implicit connection cache. |
void |
commit()
|
void |
commit(java.util.EnumSet<OracleConnection.CommitOption> flags)
Commits the transaction with the given options. |
ARRAY |
createARRAY(java.lang.String typeName,
java.lang.Object elements)
Creates an ARRAY object with the given type name and elements. |
BINARY_DOUBLE |
createBINARY_DOUBLE(double value)
Creates a BINARY_DOUBLE that has the given value. |
BINARY_FLOAT |
createBINARY_FLOAT(float value)
Creates a BINARY_FLOAT that has the given value. |
DATE |
createDATE(java.sql.Date value)
Creates a DATE that has the given value. |
DATE |
createDATE(java.sql.Date value,
java.util.Calendar cal)
Creates a DATE that has the given value. |
DATE |
createDATE(java.lang.String value)
Creates a DATE that has the given value. |
DATE |
createDATE(java.sql.Time value)
Creates a DATE that has the given value. |
DATE |
createDATE(java.sql.Time value,
java.util.Calendar cal)
Creates a DATE that has the given value. |
DATE |
createDATE(java.sql.Timestamp value)
Creates a DATE that has the given value. |
DATE |
createDATE(java.sql.Timestamp value,
java.util.Calendar cal)
Creates a DATE that has the given value. |
INTERVALDS |
createINTERVALDS(java.lang.String value)
Creates an INTERVALDS that has the given value. |
INTERVALYM |
createINTERVALYM(java.lang.String value)
Creates an INTERVALYM that has the given value. |
NUMBER |
createNUMBER(java.math.BigDecimal value)
Creates a new NUMBER that has the given value. |
NUMBER |
createNUMBER(java.math.BigInteger value)
Creates a new NUMBER that has the given value. |
NUMBER |
createNUMBER(boolean value)
Creates a new NUMBER that has the given value. |
NUMBER |
createNUMBER(byte value)
Creates a new NUMBER that has the given value. |
NUMBER |
createNUMBER(double value)
Creates a new NUMBER that has the given value. |
NUMBER |
createNUMBER(float value)
Creates a new NUMBER that has the given value. |
NUMBER |
createNUMBER(int value)
Creates a new NUMBER that has the given value. |
NUMBER |
createNUMBER(long value)
Creates a new NUMBER that has the given value. |
NUMBER |
createNUMBER(short value)
Creates a new NUMBER that has the given value. |
NUMBER |
createNUMBER(java.lang.String value,
int scale)
Creates a new NUMBER that has the given value and scale. |
java.sql.Array |
createOracleArray(java.lang.String arrayTypeName,
java.lang.Object elements)
Creates an Array object with the given type name and elements. |
java.sql.Statement |
createStatement()
|
java.sql.Statement |
createStatement(int resultSetType,
int resultSetConcurrency)
|
java.sql.Statement |
createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
|
TIMESTAMP |
createTIMESTAMP(java.sql.Date value)
Creates a new TIMESTAMP with the given value. |
TIMESTAMP |
createTIMESTAMP(DATE value)
Creates a new TIMESTAMP with the given value. |
TIMESTAMP |
createTIMESTAMP(java.lang.String value)
Creates a new TIMESTAMP with the given value. |
TIMESTAMP |
createTIMESTAMP(java.sql.Time value)
Creates a new TIMESTAMP with the given value. |
TIMESTAMP |
createTIMESTAMP(java.sql.Timestamp value)
Creates a new TIMESTAMP with the given value. |
TIMESTAMPLTZ |
createTIMESTAMPLTZ(java.sql.Date value,
java.util.Calendar cal)
Creates a new TIMESTAMPLTZ with the given value. |
TIMESTAMPLTZ |
createTIMESTAMPLTZ(DATE value,
java.util.Calendar cal)
Creates a new TIMESTAMPLTZ with the given value. |
TIMESTAMPLTZ |
createTIMESTAMPLTZ(java.lang.String value,
java.util.Calendar cal)
Creates a new TIMESTAMPLTZ with the given value. |
TIMESTAMPLTZ |
createTIMESTAMPLTZ(java.sql.Time value,
java.util.Calendar cal)
Creates a new TIMESTAMPLTZ with the given value. |
TIMESTAMPLTZ |
createTIMESTAMPLTZ(java.sql.Timestamp value,
java.util.Calendar cal)
Creates a new TIMESTAMPLTZ with the given value. |
TIMESTAMPTZ |
createTIMESTAMPTZ(java.sql.Date value)
Creates a new TIMESTAMPTZ with the given value. |
TIMESTAMPTZ |
createTIMESTAMPTZ(DATE value)
|
TIMESTAMPTZ |
createTIMESTAMPTZ(java.sql.Date value,
java.util.Calendar cal)
Creates a new TIMESTAMPTZ with the given value. |
TIMESTAMPTZ |
createTIMESTAMPTZ(java.lang.String value)
Creates a new TIMESTAMPTZ with the given value. |
TIMESTAMPTZ |
createTIMESTAMPTZ(java.lang.String value,
java.util.Calendar cal)
Creates a new TIMESTAMPTZ with the given value. |
TIMESTAMPTZ |
createTIMESTAMPTZ(java.sql.Time value)
Creates a new TIMESTAMPTZ with the given value. |
TIMESTAMPTZ |
createTIMESTAMPTZ(java.sql.Time value,
java.util.Calendar cal)
Creates a new TIMESTAMPTZ with the given value. |
TIMESTAMPTZ |
createTIMESTAMPTZ(java.sql.Timestamp value)
Creates a new TIMESTAMPTZ with the given value. |
TIMESTAMPTZ |
createTIMESTAMPTZ(java.sql.Timestamp value,
java.util.Calendar cal)
Creates a new TIMESTAMPTZ with the given value. |
AQMessage |
dequeue(java.lang.String queueName,
AQDequeueOptions opt,
byte[] tdo)
Dequeues an AQ message from the queue specified by its name. |
AQMessage |
dequeue(java.lang.String queueName,
AQDequeueOptions opt,
java.lang.String typeName)
Dequeues an AQ message from the queue specified by its name. |
void |
enqueue(java.lang.String queueName,
AQEnqueueOptions opt,
AQMessage mesg)
Enqueues the given AQ message to the queue specified by its name. |
TypeDescriptor[] |
getAllTypeDescriptorsInCurrentSchema()
Obtain all the type descriptors associated with object types or array in the schema of this connection. |
java.lang.String |
getAuthenticationAdaptorName()
Returns the name of the adaptor that is used for authentication by the thin driver. |
boolean |
getAutoClose()
The driver is always in auto-close mode. |
boolean |
getAutoCommit()
|
java.sql.CallableStatement |
getCallWithKey(java.lang.String key)
getCallWithKey Searches the explicit cache for a match on key. |
java.lang.String |
getCatalog()
|
java.util.Properties |
getConnectionAttributes()
Returns the connection Attributes set on the underlying PooledConnection. |
int |
getConnectionReleasePriority()
Returns the release priority set on the connection |
boolean |
getCreateStatementAsRefCursor()
Retrieves the current setting of the createStatementAsRefCursor flag which you can set with the
setCreateStatementAsRefCursor method. |
java.lang.String |
getCurrentSchema()
Obtains the current schema of the current connection. |
DatabaseChangeRegistration |
getDatabaseChangeRegistration(int regid)
Maps an existing registration identified by its ID 'regid' with a new DatabaseChangeRegistration object. |
java.lang.String |
getDatabaseTimeZone()
Returns the database timezone. |
java.lang.String |
getDataIntegrityAlgorithmName()
Returns the name of the algorithm that is used for data integrity checking by the thin driver on the network. |
int |
getDefaultExecuteBatch()
Retrieves the overall connection batch value of this connection. |
int |
getDefaultRowPrefetch()
Retrieves the value of row prefetch for all statements associated with this connection and created after this value was set. |
java.util.TimeZone |
getDefaultTimeZone()
Returns the TimeZone set through setDefaultTimeZone. |
java.lang.Object |
getDescriptor(java.lang.String sql_name)
Gets a Descriptor object corresponding to a sql type. |
java.lang.String |
getEncryptionAlgorithmName()
Returns the name of the algorithm that is used for data encryption by the thin driver on the network. |
short |
getEndToEndECIDSequenceNumber()
Gets the current end to end tracing context id sequence number. |
java.lang.String[] |
getEndToEndMetrics()
Gets the values of the end-to-end metrics, if any. |
boolean |
getExplicitCachingEnabled()
getExplicitCachingEnabled Returns true if the explicit cache is currently enabled, false otherwise. |
int |
getHoldability()
|
boolean |
getImplicitCachingEnabled()
getImplicitCachingEnabled Returns true if the implicit cache is currently enabled, false otherwise. |
boolean |
getIncludeSynonyms()
Checks whether or not synonyms information is included in DatabaseMetaData.getColumns. |
java.lang.Object |
getJavaObject(java.lang.String sql_name)
|
java.sql.DatabaseMetaData |
getMetaData()
|
java.util.Properties |
getProperties()
Determines the connection properties. |
boolean |
getRemarksReporting()
Checks whether or not a call of getTables or
getColumns of the DatabaseMetaData interface will
report the REMARKS column. |
boolean |
getRestrictGetTables()
Gets the restriction status of the returned data in DatabaseMetaData.getTables. |
java.lang.String |
getSessionTimeZone()
Obtain Oracle session time zone region name. |
java.lang.String |
getSessionTimeZoneOffset()
Obtain the time zone offset in hours of the current database session. |
java.lang.String |
getSQLType(java.lang.Object obj)
|
int |
getStatementCacheSize()
getStatementCacheSize Returns the current size of the application cache. |
java.sql.PreparedStatement |
getStatementWithKey(java.lang.String key)
getStatementWithKey Searches the explicit cache for a match on key. |
int |
getStmtCacheSize()
|
short |
getStructAttrCsId()
Obtain the Oracle identifier of the character set used in STRUCT attributes. |
int |
getTransactionIsolation()
|
TypeDescriptor[] |
getTypeDescriptorsFromList(java.lang.String[][] schemaAndTypeNamePairs)
Obtain the type descriptors associated with object types or arrays from an array of scheama and type names. |
TypeDescriptor[] |
getTypeDescriptorsFromListInCurrentSchema(java.lang.String[] typeNames)
Obtain the type descriptors associated with object types or array in a schema from an array of type names. |
java.util.Map |
getTypeMap()
|
java.util.Properties |
getUnMatchedConnectionAttributes()
Returns the unmatched connection Attributes from the underlying PooledConnection. |
java.lang.String |
getUserName()
Gets the user name of the current connection. |
boolean |
getUsingXAFlag()
Gets the value of the UsingXA flag which the driver sets to
true when using XA to manage distributed transactions. |
java.sql.SQLWarning |
getWarnings()
|
boolean |
getXAErrorFlag()
Gets the value of the XAError flag which is used with
distributed transactions. |
boolean |
isClosed()
|
boolean |
isLogicalConnection()
Method that returns a boolean indicating whether its a logical connection or not. |
boolean |
isProxySession()
Returns true if the current session associated with this connection is a proxy session. |
boolean |
isReadOnly()
|
boolean |
isUsable()
Identifies whether this connection is still usable for JDBC operations. |
java.lang.String |
nativeSQL(java.lang.String sql)
|
void |
openProxySession(int mode,
java.util.Properties prop)
Opens a new proxy session with the username provided in the prop argument and switches to this new session. This feature is supported for both thin and oci driver. Three proxy types are supported : OracleConnection.PROXYTYPE_USER_NAME : In this type PROXY_USER_NAME needs to be provided in prop. |
void |
oracleReleaseSavepoint(OracleSavepoint savepoint)
Removes the given OracleSavepoint object from the current
transaction. |
void |
oracleRollback(OracleSavepoint savepoint)
Undoes all changes made after the given OracleSavepoint
object was set. |
OracleSavepoint |
oracleSetSavepoint()
Creates an unnamed savepoint in the current transaction and returns the new OracleSavepoint object that
represents it. |
OracleSavepoint |
oracleSetSavepoint(java.lang.String name)
Creates a savepoint with the given name in the current transaction and returns the new OracleSavepoint object that
represents it. |
int |
pingDatabase()
Ping Database server to see if both database and the connection are actively up. |
int |
pingDatabase(int timeOut)
ping Database |
java.sql.CallableStatement |
prepareCall(java.lang.String sql)
|
java.sql.CallableStatement |
prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
|
java.sql.CallableStatement |
prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
|
java.sql.CallableStatement |
prepareCallWithKey(java.lang.String key)
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql)
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int autoGeneratedKeys)
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int[] columnIndexes)
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
java.lang.String[] columnNames)
|
java.sql.PreparedStatement |
prepareStatementWithKey(java.lang.String key)
|
void |
purgeExplicitCache()
purgeExplicitCache Removes all existing statements from the explicit cache, after which it will be empty. |
void |
purgeImplicitCache()
purgeImplicitCache Removes all existing statements from the implicit cache, after which it will be empty. |
void |
putDescriptor(java.lang.String sql_name,
java.lang.Object desc)
Store the Object Descriptor for later usage. |
AQNotificationRegistration[] |
registerAQNotification(java.lang.String[] name,
java.util.Properties[] options,
java.util.Properties globaloptions)
Registers your interest into being notified when a message is enqueued in a particular queue (or array of queues). |
void |
registerConnectionCacheCallback(OracleConnectionCacheCallback occc,
java.lang.Object userObj,
int cbkFlag)
Registers the connection cache callback on the logical connection This is used in conjunction with the Implicit Connection Cache Properties. |
DatabaseChangeRegistration |
registerDatabaseChangeNotification(java.util.Properties options)
Creates a new database change registration. |
void |
registerSQLType(java.lang.String sql_name,
java.lang.Class java_class)
|
void |
registerSQLType(java.lang.String sql_name,
java.lang.String java_class_name)
|
void |
registerTAFCallback(OracleOCIFailover cbk,
java.lang.Object obj)
Register an application TAF Callback instance that will be called when an application failover occurs. |
void |
releaseSavepoint(java.sql.Savepoint savepoint)
|
void |
rollback()
|
void |
rollback(java.sql.Savepoint savepoint)
|
void |
setApplicationContext(java.lang.String nameSpace,
java.lang.String attribute,
java.lang.String value)
Sets a attribute/value pair in a particular namespace in the application context on the server. |
void |
setAutoClose(boolean autoClose)
set auto-close mode. |
void |
setAutoCommit(boolean autoCommit)
|
void |
setCatalog(java.lang.String catalog)
|
void |
setConnectionReleasePriority(int priority)
Sets connection release priority. |
void |
setCreateStatementAsRefCursor(boolean value)
When this is set to true, any new statements created from this
connection will be created as a REF CURSOR. |
void |
setDefaultExecuteBatch(int batch)
Sets a default batch value for the Oracle update batching model (the default value is 1). |
void |
setDefaultRowPrefetch(int value)
Sets the value of row prefetch for all statements associated with this connection and created after this value was set. |
void |
setDefaultTimeZone(java.util.TimeZone tz)
The TimeZone to be used while creating java.sql.Date, java.sql.Time & java.sql.Timestamp. |
void |
setEndToEndMetrics(java.lang.String[] metrics,
short sequenceNumber)
Sets the values of the end-to-end tracing metrics. |
void |
setExplicitCachingEnabled(boolean cache)
setExplicitCachingEnabled Enables or disables the explicit cache. |
void |
setHoldability(int holdability)
|
void |
setImplicitCachingEnabled(boolean cache)
setImplicitCachingEnabled Enables or disables the implicit cache. |
void |
setIncludeSynonyms(boolean synonyms)
Turns on or off retrieval of synonym information in DatabaseMetaData. |
void |
setPlsqlWarnings(java.lang.String setting)
Enable/Disable PLSQL Compiler Warnings |
void |
setReadOnly(boolean readOnly)
|
void |
setRemarksReporting(boolean reportRemarks)
Turns on or off the reporting of the REMARKS columns by the getTables and getColumns calls of the
DatabaseMetaData interface. |
void |
setRestrictGetTables(boolean restrict)
Turns on or off the restriction of the returned data in DatabaseMetaData.getTables. |
java.sql.Savepoint |
setSavepoint()
|
java.sql.Savepoint |
setSavepoint(java.lang.String name)
|
void |
setSessionTimeZone(java.lang.String regionName)
Set the session time zone. |
void |
setStatementCacheSize(int size)
setStatementCacheSize Specifies the size of the size of the application cache (which will be used by both implicit and explicit caching). |
void |
setStmtCacheSize(int size)
|
void |
setStmtCacheSize(int size,
boolean clearMetaData)
|
void |
setTransactionIsolation(int level)
|
void |
setTypeMap(java.util.Map map)
|
void |
setUsingXAFlag(boolean value)
When using distributed transactions with XA, you can set the value of the UsingXA flag. |
void |
setWrapper(OracleConnection wrapper)
Set a connection wrapper as the wrapper of this connection. |
void |
setXAErrorFlag(boolean value)
Sets the value of the XAError flag which is used with
distributed transactions. |
void |
shutdown(OracleConnection.DatabaseShutdownMode mode)
Shuts the database server down. |
void |
startup(OracleConnection.DatabaseStartupMode mode)
Starts the database server up. |
void |
startup(java.lang.String startup_str,
int mode)
Not implemented |
void |
unregisterAQNotification(AQNotificationRegistration registration)
Deletes a given AQ registration. |
void |
unregisterDatabaseChangeNotification(DatabaseChangeRegistration registration)
Deletes a given database change registration. |
void |
unregisterDatabaseChangeNotification(int registrationId)
Deletes a given database change registration in the server. |
void |
unregisterDatabaseChangeNotification(int registrationId,
java.lang.String host,
int tcpport)
Deletes a given database change registration in the server. |
void |
unregisterDatabaseChangeNotification(long registrationId,
java.lang.String callback)
Deletes a given database change registration in the server. |
OracleConnection |
unwrap()
Unwrap one level. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String BUILD_DATE
public static final boolean TRACE
| Constructor Detail |
|---|
public OracleConnectionWrapper()
public OracleConnectionWrapper(OracleConnection toBeWrapped)
toBeWrapped - | Method Detail |
|---|
public OracleConnection unwrap()
unwrap in interface OracleConnection
public java.lang.String getDatabaseTimeZone()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void setWrapper(OracleConnection wrapper)
setWrapper in interface OracleConnectionwrapper -
public java.sql.Statement createStatement()
throws java.sql.SQLException
createStatement in interface java.sql.Connectionjava.sql.SQLException
public java.sql.PreparedStatement prepareStatement(java.lang.String sql)
throws java.sql.SQLException
prepareStatement in interface java.sql.Connectionjava.sql.SQLException
public java.sql.CallableStatement prepareCall(java.lang.String sql)
throws java.sql.SQLException
prepareCall in interface java.sql.Connectionjava.sql.SQLException
public java.lang.String nativeSQL(java.lang.String sql)
throws java.sql.SQLException
nativeSQL in interface java.sql.Connectionjava.sql.SQLException
public void setAutoCommit(boolean autoCommit)
throws java.sql.SQLException
setAutoCommit in interface java.sql.Connectionjava.sql.SQLException
public boolean getAutoCommit()
throws java.sql.SQLException
getAutoCommit in interface java.sql.Connectionjava.sql.SQLException
public void commit()
throws java.sql.SQLException
commit in interface java.sql.Connectionjava.sql.SQLException
public void rollback()
throws java.sql.SQLException
rollback in interface java.sql.Connectionjava.sql.SQLException
public void close()
throws java.sql.SQLException
close in interface java.sql.Connectionjava.sql.SQLException
public boolean isClosed()
throws java.sql.SQLException
isClosed in interface java.sql.Connectionjava.sql.SQLException
public java.sql.DatabaseMetaData getMetaData()
throws java.sql.SQLException
getMetaData in interface java.sql.Connectionjava.sql.SQLException
public void setReadOnly(boolean readOnly)
throws java.sql.SQLException
setReadOnly in interface java.sql.Connectionjava.sql.SQLException
public boolean isReadOnly()
throws java.sql.SQLException
isReadOnly in interface java.sql.Connectionjava.sql.SQLException
public void setCatalog(java.lang.String catalog)
throws java.sql.SQLException
setCatalog in interface java.sql.Connectionjava.sql.SQLException
public java.lang.String getCatalog()
throws java.sql.SQLException
getCatalog in interface java.sql.Connectionjava.sql.SQLException
public void setTransactionIsolation(int level)
throws java.sql.SQLException
setTransactionIsolation in interface java.sql.Connectionjava.sql.SQLException
public int getTransactionIsolation()
throws java.sql.SQLException
getTransactionIsolation in interface java.sql.Connectionjava.sql.SQLException
public java.sql.SQLWarning getWarnings()
throws java.sql.SQLException
getWarnings in interface java.sql.Connectionjava.sql.SQLException
public void clearWarnings()
throws java.sql.SQLException
clearWarnings in interface java.sql.Connectionjava.sql.SQLException
public java.sql.Statement createStatement(int resultSetType,
int resultSetConcurrency)
throws java.sql.SQLException
createStatement in interface java.sql.Connectionjava.sql.SQLException
public java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
throws java.sql.SQLException
prepareStatement in interface java.sql.Connectionjava.sql.SQLException
public java.sql.CallableStatement prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
throws java.sql.SQLException
prepareCall in interface java.sql.Connectionjava.sql.SQLException
public java.util.Map getTypeMap()
throws java.sql.SQLException
getTypeMap in interface java.sql.Connectionjava.sql.SQLException
public void setTypeMap(java.util.Map map)
throws java.sql.SQLException
setTypeMap in interface java.sql.Connectionjava.sql.SQLExceptionpublic boolean isProxySession()
OracleConnection
isProxySession in interface OracleConnection
public void openProxySession(int mode,
java.util.Properties prop)
throws java.sql.SQLException
OracleConnection
openProxySession in interface OracleConnectionmode - has to be either OracleConnection.PROXYTYPE_USER_NAME
or OracleConnection.PROXYTYPE_DISTINGUISHED_NAME or
OracleConnection.PROXYTYPE_CERTIFICATEprop - keys/values
java.sql.SQLException
public void archive(int mode,
int aseq,
java.lang.String acstext)
throws java.sql.SQLException
OracleConnection
archive in interface OracleConnectionjava.sql.SQLException
public boolean getAutoClose()
throws java.sql.SQLException
OracleConnection
getAutoClose in interface OracleConnectionjava.sql.SQLException - should never been raisedsetAutoClose
public java.sql.CallableStatement getCallWithKey(java.lang.String key)
throws java.sql.SQLException
OracleConnection
getCallWithKey in interface OracleConnectionkey - Specified key to search for
java.sql.SQLExceptionpublic int getDefaultExecuteBatch()
OracleConnection The batch value from the connection is used for all prepared statements
associated with this connection. A different batch value can also be
defined for individual prepared statements. This can be done by using
OraclePreparedStatement.setExecuteBatch, which will override
the default value provided from the connection. Therefore, the batch value
returned by this getDefaultExecuteBatch entrypoint is valid
for prepared statements for which you have not defined a different batch
value.
The following code retrieves the default batch value of the connection
conn.
Integer batch_val = ((OracleConnection)conn).getDefaultExecuteBatch();
getDefaultExecuteBatch in interface OracleConnectionOraclePreparedStatement.setExecuteBatch,
setDefaultExecuteBatchpublic int getDefaultRowPrefetch()
OracleConnectionThe row-prefetching feature associates an integer row-prefetch setting
with a given statement object. JDBC fetches that number of rows at a time
from the database during the query. That is, JDBC will fetch N rows that
match the query criteria and bring them all back to the client at once,
where N is the prefetch setting. Then, once your next calls
have run through those N rows, JDBC will go back to fetch the next N rows
that match the criteria.
You can set the number of rows to prefetch for a particular Oracle
statement (any type of statement). You can also reset the default number of
rows that will be prefetched for all statements in your connection with the
setDefaultRowPrefetch method. Therefore, the row prefetch
value returned by this getDefaultRowPrefetch entrypoint is
valid for statements for which you have not defined a different row
prefetch value.
The default number of rows to prefetch to the client is 10.
Example where conn is your connection object:
//Get the default row-prefetch setting for this connection
int defRowPref = ((OracleConnection)conn).getDefaultRowPrefetch();
getDefaultRowPrefetch in interface OracleConnectionOracleStatement.setRowPrefetch,
setDefaultRowPrefetchpublic java.lang.Object getDescriptor(java.lang.String sql_name)
OracleConnection
getDescriptor in interface OracleConnectionsql_name - the sql type
putDescriptor,
oracle.sql.TypeDescriptor
public java.lang.String[] getEndToEndMetrics()
throws java.sql.SQLException
OracleConnection
getEndToEndMetrics in interface OracleConnectionjava.sql.SQLException - if an error occurssetEndToEndMetrics
public short getEndToEndECIDSequenceNumber()
throws java.sql.SQLException
OracleConnection
getEndToEndECIDSequenceNumber in interface OracleConnectionjava.sql.SQLException - if an error occurspublic boolean getIncludeSynonyms()
OracleConnectionDatabaseMetaData.getColumns.
By default and for performance reasons it won't but you can change this with the
setIncludeSynonyms method.
getIncludeSynonyms in interface OracleConnectionDatabaseMetaData.getColumns will report
information if a table synonym is passed in, and false otherwisesetIncludeSynonymspublic boolean getRestrictGetTables()
OracleConnectionDatabaseMetaData.getTables.
The default behavior is to return information about all synonyms,
including those which do not point to accessible tables or views. But you
can change this with the setRestrictGetTables method.
getRestrictGetTables in interface OracleConnectionDatabaseMetaData.getTables is restricted, and false otherwisesetRestrictGetTables
public boolean getImplicitCachingEnabled()
throws java.sql.SQLException
OracleConnection
getImplicitCachingEnabled in interface OracleConnectionjava.sql.SQLException
public boolean getExplicitCachingEnabled()
throws java.sql.SQLException
OracleConnection
getExplicitCachingEnabled in interface OracleConnectionjava.sql.SQLException
public java.lang.Object getJavaObject(java.lang.String sql_name)
throws java.sql.SQLException
getJavaObject in interface OracleConnectionjava.sql.SQLExceptionpublic boolean getRemarksReporting()
OracleConnectiongetTables or
getColumns of the DatabaseMetaData interface will
report the REMARKS column.
By default and for performance reasons it won't (it will return
null) but you can change this with the
setRemarksReporting method.
getRemarksReporting in interface OracleConnectionDatabaseMetaData calls getTables
and getColumns will report the REMARKS column and false otherwisesetRemarksReporting
public java.lang.String getSQLType(java.lang.Object obj)
throws java.sql.SQLException
getSQLType in interface OracleConnectionjava.sql.SQLExceptionpublic int getStmtCacheSize()
getStmtCacheSize in interface OracleConnection
public int getStatementCacheSize()
throws java.sql.SQLException
OracleConnection
getStatementCacheSize in interface OracleConnectionjava.sql.SQLException
public java.sql.PreparedStatement getStatementWithKey(java.lang.String key)
throws java.sql.SQLException
OracleConnection
getStatementWithKey in interface OracleConnectionkey - Specified key to search for
java.sql.SQLException
public short getStructAttrCsId()
throws java.sql.SQLException
OracleConnection
getStructAttrCsId in interface OracleConnectionjava.sql.SQLException - if Conversion is null
public java.lang.String getUserName()
throws java.sql.SQLException
OracleConnectionExample where conn is your connection object:
String UserName = ((OracleConnection)conn).getUserName();
getUserName in interface OracleConnectionjava.sql.SQLException - if the logical connection is closed
public java.lang.String getCurrentSchema()
throws java.sql.SQLException
OracleConnection
getCurrentSchema in interface OracleConnectionjava.sql.SQLException - If there was an error while fetching the resultspublic boolean getUsingXAFlag()
OracleConnectionUsingXA flag which the driver sets to
true when using XA to manage distributed transactions. If you
are not using distributed transactions with the XA library, the value of
the UsingXA flag will be false.
getUsingXAFlag in interface OracleConnectiontrue when using XA to manage distributed transactions
and false otherwise.setUsingXAFlagpublic boolean getXAErrorFlag()
OracleConnectionXAError flag which is used with
distributed transactions.
When using distributed transactions with an XA library, you can ask the
driver to raise exception when doing anything that might require a
transaction. To do so, set the value of the XAError flag to
true with the method setXAErrorFlag.
The default value is false.
getXAErrorFlag in interface OracleConnectionsetXAErrorFlag
public OracleSavepoint oracleSetSavepoint()
throws java.sql.SQLException
OracleConnectionOracleSavepoint object that
represents it.
oracleSetSavepoint in interface OracleConnectionOracleSavepoint object
java.sql.SQLException - if a database access error occurs
or this Connection object is currently in
auto-commit modeOracleSavepoint
public OracleSavepoint oracleSetSavepoint(java.lang.String name)
throws java.sql.SQLException
OracleConnectionOracleSavepoint object that
represents it.
oracleSetSavepoint in interface OracleConnectionname - a String containing the name of the savepoint
OracleSavepoint object
java.sql.SQLException - if a database access error occurs
or this Connection object is currently in
auto-commit modeOracleSavepoint
public void oracleRollback(OracleSavepoint savepoint)
throws java.sql.SQLException
OracleConnectionOracleSavepoint
object was set.
This method should be used only when auto-commit has been disabled.
oracleRollback in interface OracleConnectionsavepoint - the OracleSavepoint object to roll back to
java.sql.SQLException - if a database access error occurs,
the OracleSavepoint object is no longer valid,
or this Connection object is currently in
auto-commit modeOracleSavepoint
public void oracleReleaseSavepoint(OracleSavepoint savepoint)
throws java.sql.SQLException
OracleConnectionOracleSavepoint object from the current
transaction. Any reference to the savepoint after it have been removed
will cause an SQLException to be thrown.
oracleReleaseSavepoint in interface OracleConnectionsavepoint - the OracleSavepoint object to be removed
java.sql.SQLException - if a database access error occurs or
the given OracleSavepoint object is not a valid
savepoint in the current transactionOracleSavepoint
public int pingDatabase()
throws java.sql.SQLException
OracleConnection
pingDatabase in interface OracleConnectionjava.sql.SQLException
public int pingDatabase(int timeOut)
throws java.sql.SQLException
OracleConnection
pingDatabase in interface OracleConnectionjava.sql.SQLException
public void purgeExplicitCache()
throws java.sql.SQLException
OracleConnection
purgeExplicitCache in interface OracleConnectionjava.sql.SQLException
public void purgeImplicitCache()
throws java.sql.SQLException
OracleConnection
purgeImplicitCache in interface OracleConnectionjava.sql.SQLException
public void putDescriptor(java.lang.String sql_name,
java.lang.Object desc)
throws java.sql.SQLException
OracleConnection
putDescriptor in interface OracleConnectionsql_name - the sql typedesc - the Object Descriptor associated
java.sql.SQLException - if sql_name or desc is nullgetDescriptor,
oracle.sql.TypeDescriptor
public void registerSQLType(java.lang.String sql_name,
java.lang.Class java_class)
throws java.sql.SQLException
registerSQLType in interface OracleConnectionjava.sql.SQLException
public void registerSQLType(java.lang.String sql_name,
java.lang.String java_class_name)
throws java.sql.SQLException
registerSQLType in interface OracleConnectionjava.sql.SQLException
public void setAutoClose(boolean autoClose)
throws java.sql.SQLException
OracleConnection
setAutoClose in interface OracleConnectionautoClose - the boolean value
java.sql.SQLException - when the argument autoClose is falsegetAutoClose
public void setDefaultExecuteBatch(int batch)
throws java.sql.SQLException
OracleConnectionYou can reduce the number of round trips to the database, thereby
improving application performance, by grouping multiple
UPDATE, DELETE, or INSERT statements
into a single "batch" and having the whole batch sent to the database and
processed in one trip. To do this, you can either use the Oracle update
batching model or the batch updates of the Sun Microsystems JDBC 2.0
specification. The standard model is a manual, explicit model (there is no
batch value) whereas the Oracle model is an implicit model.
Note: It is important to be aware that you cannot mix theses models. In any single application, you can use the syntax of one model or the other, but not both. The Oracle JDBC driver will throw exceptions when you mix these syntaxes.
The Oracle update batching feature associates a batch value (limit) with
each prepared statement object (this way the driver knows in advance how
many operations will be batched). With Oracle update batching, instead of
the JDBC driver executing a prepared statement each time its
executeUpdate method is called, the driver adds the statement
to a batch of accumulated execution requests. The driver will pass all the
operations to the database for execution once the batch value is
reached. For example, if the batch value is 10, then each batch of 10
operations will be sent to the database and processed in one trip.
The following code sets the default batch value to 20 for
all prepared statement objects associated with the conn
connection object:
((OracleConnection)conn).setDefaultExecuteBatch(20);
Even though this sets the default batch value for all the prepared
statements of the connection, you can override it by calling
setDefaultBatch on individual Oracle prepared statements.
The connection batch value will apply to statement objects created after
this batch value was set.
Note that instead of calling setDefaultExecuteBatch, you
can set the defaultBatchValue Java property if you use a Java
Properties object in establishing the connection.
Types of Statements Supported. As implemented by Oracle, update batching is intended for use with prepared statements, when you are repeating the same statement with different bind variables. Be aware of the following:
Note
that because Oracle update batching is vendor-specific, you must actually
use (or cast to) OraclePreparedStatement objects, not general
PreparedStatement objects.
UPDATE, INSERT, or
DELETE operations. Executing a batch that includes an
operation that attempts to return a result set will cause an exception.
Note that with standard update batching model, you can use either
standard PreparedStatement, CallableStatement,
and Statement objects, or Oracle-specific
OraclePreparedStatement, OracleCallableStatement,
and OracleStatement objects.
Oracle Update Batching Characteristics and Limitations
sendBatch method of an Oracle prepared statement in any of the
following circumstances: 1) the connection receives a COMMIT
request, either as a result of invoking the commit method or
as a result of auto-commit mode; 2) the statement receives a
close request; or 3) the connection receives a
close request.
COMMIT request, statement close, or
connection close has no effect on a pending batch if you use standard
update batching--only if you use Oracle update batching.
setDefaultExecuteBatch in interface OracleConnectionbatch - your default batch value (default is 1)
java.sql.SQLException - if the argument batch is <=0OraclePreparedStatement.setExecuteBatch,
getDefaultExecuteBatch
public void setDefaultRowPrefetch(int value)
throws java.sql.SQLException
OracleConnection
The row-prefetching feature associates an integer row-prefetch setting with
a given statement object. JDBC fetches that number of rows at a time from
the database during the query. That is, JDBC will fetch N rows that match
the query criteria and bring them all back to the client at once, where N
is the prefetch setting. Then, once your next calls have run
through those N rows, JDBC will go back to fetch the next N rows that match
the criteria.
You can set the number of rows to prefetch for a particular Oracle statement (any type of statement) but this method allows you to reset the default number of rows that will be prefetched for all statements in your connection. The default number of rows to prefetch to the client is 10.
Use the setDefaultRowPrefetch method to set the default number of
rows to prefetch, passing in an integer that specifies the desired default. If you
want to check the current setting of the default, then use the
getDefaultRowPrefetch method. This method returns an integer.
Example where conn is your connection object:
//Set the default row-prefetch setting for this connection to 7
((OracleConnection)conn).setDefaultRowPrefetch(7);
Note 1 : A statement object receives the default row-prefetch setting from the associated connection at the time the statement object is created. Subsequent changes to the connection's default row-prefetch setting have no effect on the statement's row-prefetch setting.
Note 2 : If a column of a result set is of datatype LONG or LONG RAW (that is, the streaming types), JDBC changes the statement's row-prefetch setting to 1, even if you never actually read a value of either of those types.
Note 3 : Do not mix the JDBC 2.0 fetch size API and the Oracle row-prefetching API in your application. You can use one or the other but not both.
setDefaultRowPrefetch in interface OracleConnectionvalue - the number of rows to prefetch
java.sql.SQLException - if the argument value is <=0OracleStatement.setRowPrefetch,
getDefaultRowPrefetch
public void setEndToEndMetrics(java.lang.String[] metrics,
short sequenceNumber)
throws java.sql.SQLException
OracleConnection
setEndToEndMetrics in interface OracleConnectionmetrics - String[] containing the metric values.sequenceNumber - the sequence number for the context id
java.sql.SQLException - if an error occursgetEndToEndMetrics
public void setExplicitCachingEnabled(boolean cache)
throws java.sql.SQLException
OracleConnection
setExplicitCachingEnabled in interface OracleConnectioncache - If true, then explicit caching will be enabled. If false,
then any existing statements will be purged and the explicit
cache will be disabled.
java.sql.SQLException - if called on a logical connection.
public void setImplicitCachingEnabled(boolean cache)
throws java.sql.SQLException
OracleConnection
setImplicitCachingEnabled in interface OracleConnectioncache - If true, then implicit caching will be enabled. If false,
then any existing statements will be purged and the implicit
cache will be disabled.
java.sql.SQLException - if called on a logical connection.public void setIncludeSynonyms(boolean synonyms)
OracleConnectionSimilar to setRemarksReporting, getColumns
performs extremely slow if information about synonyms has to be included,
because it neccessitates an outer join so, by default, the JDBC driver will
not report information about synonyms.
You can get synonym information by passing true to this method, and turn it off by passing false. You can also control this behavior by passing a property named "includeSynonyms" as "true" to DriverManager.getConnection.
setIncludeSynonyms in interface OracleConnectionsynonyms - true if you want to retrieve synonym information
in DatabaseMetaData.getColumns and false otherwise.getIncludeSynonymspublic void setRemarksReporting(boolean reportRemarks)
OracleConnectiongetTables and getColumns calls of the
DatabaseMetaData interface.
The DatabaseMetaData calls getTables and getColumns
are extremely slow if the REMARKS column has to be reported as this
necessitates an expensive outer join so by default the JDBC driver does not report
the REMARKS columns.
You can turn the reporting of REMARKS on by passing a true argument
to this method. You turn it back off by passing a false argument.
Example where conn is your connection object:
((OracleConnection)conn).setRemarksReporting(true);
You can also control the reporting of REMARKS by passing a property
named remarksReporting as true to the
DriverManager.getConnection call.
setRemarksReporting in interface OracleConnectionreportRemarks - true if you want to turn on the reporting of
the REMARKS columns and false otherwise.getRemarksReportingpublic void setRestrictGetTables(boolean restrict)
OracleConnectionDatabaseMetaData.getTables.
DatabaseMetaData.getTables will return information about
all accessible tables, views, and synonyms. There are two issues relating
to synonyms which can affect the quality of the returned data:
getTables can return rows
containing objects that are not describable with getColumns,
either because they are not accessible (issue 1) or because they are not
tables or views (issue 2).
To remedy this, you can restrict the results of getTables
to only those tables and views to which you have access. This is done by
either passing true to this method, or by passing the
restrictGetTables property as true to the
DriverManager.getConnection call. The default behavior is to
return information about all synonyms, including those which do not point
to accessible tables or views.
Note that getTables can return more than one row for the
same object, one for the object itself, and additional rows for any
synonyms defined for that object. This is the case regardless of the
setting for restrictGetTables.
The following code turns on the restriction:
((OracleConnection)conn).setRestrictGetTables(true);
setRestrictGetTables in interface OracleConnectionrestrict - true to turn on the restriction and false
otherwise.getRestrictGetTables
public void setStmtCacheSize(int size)
throws java.sql.SQLException
setStmtCacheSize in interface OracleConnectionjava.sql.SQLException
public void setStatementCacheSize(int size)
throws java.sql.SQLException
OracleConnection
setStatementCacheSize in interface OracleConnectionsize - Requested size of the cache. If the existing cache size
is less than size, statements will be purged to reduce the
size.
java.sql.SQLException - if size < 0, or if called on a logical connection.
public void setStmtCacheSize(int size,
boolean clearMetaData)
throws java.sql.SQLException
setStmtCacheSize in interface OracleConnectionjava.sql.SQLExceptionpublic void setUsingXAFlag(boolean value)
OracleConnectionUsingXA flag.
XA is a general standard (not specific to Java) for distributed transactions. You should use this method only when using XA.
By default, when using distributed transactions with XA, the driver will
set the UsingXA flag to true and exceptions will
be raised when you want to do anything with your logical connection that
might require a transaction. Otherwise the flag UsingXA is
always false.
If you are actually using distributed transactions with XA and you dislike the
default behavior, you can set the flag back to false.
setUsingXAFlag in interface OracleConnectionvalue - the value of the UsingXA flaggetUsingXAFlagpublic void setXAErrorFlag(boolean value)
OracleConnectionXAError flag which is used with
distributed transactions. When coexisting with an XA library, you can set
the XAError flag to true and the driver will then
raise an exception when doing anything that might require a transaction.
setXAErrorFlag in interface OracleConnectionvalue - the value of the XAError flaggetXAErrorFlag
public void shutdown(OracleConnection.DatabaseShutdownMode mode)
throws java.sql.SQLException
OracleConnection
shutdown in interface OracleConnectionmode - can be either OracleConnection.DatabaseShutdownMode.CONNECTOracleConnection.DatabaseShutdownMode.TRANSACTIONALOracleConnection.DatabaseShutdownMode.TRANSACTIONAL_LOCALOracleConnection.DatabaseShutdownMode.IMMEDIATEOracleConnection.DatabaseShutdownMode.ABORTOracleConnection.DatabaseShutdownMode.FINALjava.sql.SQLException
public void startup(java.lang.String startup_str,
int mode)
throws java.sql.SQLException
OracleConnection
startup in interface OracleConnectionjava.sql.SQLException
public void startup(OracleConnection.DatabaseStartupMode mode)
throws java.sql.SQLException
OracleConnection
startup in interface OracleConnectionmode - can be either OracleConnection.DatabaseStartupMode.NO_RESTRICTIONOracleConnection.DatabaseStartupMode.FORCEOracleConnection.DatabaseStartupMode.RESTRICTjava.sql.SQLException
public java.sql.PreparedStatement prepareStatementWithKey(java.lang.String key)
throws java.sql.SQLException
prepareStatementWithKey in interface OracleConnectionkey - the key with which it was closed
java.sql.SQLException - if a database access error occurs
public java.sql.CallableStatement prepareCallWithKey(java.lang.String key)
throws java.sql.SQLException
prepareCallWithKey in interface OracleConnectionkey - the key with which it was closed
java.sql.SQLException - if a database access error occurspublic void setCreateStatementAsRefCursor(boolean value)
OracleConnectiontrue, any new statements created from this
connection will be created as a REF CURSOR. Only resultsets
obtained from statements that are created as REF CURSORS can
be returned from a Java Stored Procedure. This feature is supported by the
server-side internal driver only, and is no-op in all other JDBC drivers.
Default value is false.
To use the setCreateStatementAsRefCursor entrypoint you
have to cast the Connection object to the type
oracle.jdbc.OracleConnection.
setCreateStatementAsRefCursor in interface OracleConnectionvalue - true if new statements should be created as
REF CURSORS, false otherwisegetCreateStatementAsRefCursorpublic boolean getCreateStatementAsRefCursor()
OracleConnectioncreateStatementAsRefCursor flag which you can set with the
setCreateStatementAsRefCursor method.
To use the getCreateStatementAsRefCursor entrypoint you
have to cast the Connection object to the type
oracle.jdbc.OracleConnection.
getCreateStatementAsRefCursor in interface OracleConnectionsetCreateStatementAsRefCursor
public void setSessionTimeZone(java.lang.String regionName)
throws java.sql.SQLException
OracleConnectionThis method is used to set the session time zone. This method must be invoked before accessing any TIMESTAMP WITH LOCAL TIME ZONE data. Upon invocation of this method, the Jdbc driver sets the session timezone of the connection and saves the session timezone so that any TSLTZ data accessed via Jdbc are adjusted using the session timezone.
setSessionTimeZone in interface OracleConnectionregionName - Oracle session time zone region name.
java.sql.SQLException - if an error occurred.public java.lang.String getSessionTimeZone()
OracleConnection
getSessionTimeZone in interface OracleConnection
public java.lang.String getSessionTimeZoneOffset()
throws java.sql.SQLException
OracleConnection"ALTER SESSION SET TIME_ZONE ..." and then call this
method, it will return the new value.
The value returned by this method is that same as the result
of "SELECT SESSIONTIMEZONE FROM DUAL;". The drivers
may use some performance optimization to not use a roundtrip to the
server so it is always preferrable to use this method.
getSessionTimeZoneOffset in interface OracleConnectionjava.sql.SQLExceptionpublic java.sql.Connection _getPC()
OracleConnection
_getPC in interface OracleConnectionpublic boolean isLogicalConnection()
OracleConnection
isLogicalConnection in interface OracleConnection
public void registerTAFCallback(OracleOCIFailover cbk,
java.lang.Object obj)
throws java.sql.SQLException
OracleConnection
registerTAFCallback in interface OracleConnectioncbk - Callback instance.obj - Context object in which any client's state can be
stored and provided when the callback method is
invoked.
java.sql.SQLException - if this method is invoked in drivers other than
the Jdbc OCI driver.public java.util.Properties getProperties()
OracleConnection
getProperties in interface OracleConnection
public void close(java.util.Properties connAttr)
throws java.sql.SQLException
OracleConnection
close in interface OracleConnectionconnAttr - the connection Attributes to be applied
java.sql.SQLException - if a database access error occurs
public void close(int opt)
throws java.sql.SQLException
OracleConnection
close in interface OracleConnectionopt - set to INVALID_CONNECTION to close the PooledConnection
java.sql.SQLException - if a database access error occurs
public void applyConnectionAttributes(java.util.Properties connAttr)
throws java.sql.SQLException
OracleConnection
applyConnectionAttributes in interface OracleConnectionconnAttr - the connection Attributes to be applied
java.sql.SQLException - if a database access error occurs
public java.util.Properties getConnectionAttributes()
throws java.sql.SQLException
OracleConnection
getConnectionAttributes in interface OracleConnectionjava.sql.SQLException - if a database access error occurs
public java.util.Properties getUnMatchedConnectionAttributes()
throws java.sql.SQLException
OracleConnection
getUnMatchedConnectionAttributes in interface OracleConnectionjava.sql.SQLException - if a database access error occurs
public void registerConnectionCacheCallback(OracleConnectionCacheCallback occc,
java.lang.Object userObj,
int cbkFlag)
throws java.sql.SQLException
OracleConnection
registerConnectionCacheCallback in interface OracleConnectionoccc - Implementation of the OracleConnectionCacheCallback InterfaceuserObj - User private object to be passed when invoking callbackscbkFlag - Indicates which callback method to invoke.
Supported values are:
ABANDONED_CONNECTION_CALLBACK
RELEASE_CONNECTION_CALLBACK
ALL_CONNECTION_CALLBACKS
java.sql.SQLException - if a database access error occurs
public void setConnectionReleasePriority(int priority)
throws java.sql.SQLException
OracleConnection
setConnectionReleasePriority in interface OracleConnectionpriority - one of the above release priority
java.sql.SQLException - if a database access error occurs
public int getConnectionReleasePriority()
throws java.sql.SQLException
OracleConnection
getConnectionReleasePriority in interface OracleConnectionjava.sql.SQLException - if a database access error occurs
public void setPlsqlWarnings(java.lang.String setting)
throws java.sql.SQLException
OracleConnection
setPlsqlWarnings in interface OracleConnectionsetting - Setting specified for ALTER SESSION SET PLSQL_WARNINGS.
Sample values are: "'ENABLE:ALL'", "'DISABLE:ALL'",
"'ENALBLE:INFORMATIONAL'", etc. Please refer to the SQL
reference of ALTER SESSION SET PLSQL_WARNINGS for
more information. If the setting is "'DISABLE:ALL'",
jdbc drivers turn off PLSQL Compiler Warnings.
Note: the quotes(') in the setting String are necessary.
java.sql.SQLException - if a database access error occurs
public void setHoldability(int holdability)
throws java.sql.SQLException
setHoldability in interface java.sql.Connectionjava.sql.SQLException
public int getHoldability()
throws java.sql.SQLException
getHoldability in interface java.sql.Connectionjava.sql.SQLException
public java.sql.Statement createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
throws java.sql.SQLException
createStatement in interface java.sql.Connectionjava.sql.SQLException
public java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
throws java.sql.SQLException
prepareStatement in interface java.sql.Connectionjava.sql.SQLException
public java.sql.CallableStatement prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
throws java.sql.SQLException
prepareCall in interface java.sql.Connectionjava.sql.SQLException
public java.sql.Savepoint setSavepoint()
throws java.sql.SQLException
setSavepoint in interface java.sql.Connectionjava.sql.SQLException
public java.sql.Savepoint setSavepoint(java.lang.String name)
throws java.sql.SQLException
setSavepoint in interface java.sql.Connectionjava.sql.SQLException
public void rollback(java.sql.Savepoint savepoint)
throws java.sql.SQLException
rollback in interface java.sql.Connectionjava.sql.SQLException
public void releaseSavepoint(java.sql.Savepoint savepoint)
throws java.sql.SQLException
releaseSavepoint in interface java.sql.Connectionjava.sql.SQLException
public java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int autoGeneratedKeys)
throws java.sql.SQLException
prepareStatement in interface java.sql.Connectionjava.sql.SQLException
public java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int[] columnIndexes)
throws java.sql.SQLException
prepareStatement in interface java.sql.Connectionjava.sql.SQLException
public java.sql.PreparedStatement prepareStatement(java.lang.String sql,
java.lang.String[] columnNames)
throws java.sql.SQLException
prepareStatement in interface java.sql.Connectionjava.sql.SQLException
public ARRAY createARRAY(java.lang.String typeName,
java.lang.Object elements)
throws java.sql.SQLException
createARRAY in interface OracleConnectiontypeName - the name of the SQL type of the created objectelements - the elements of the created object
java.sql.SQLException - if a database error occurs
public java.sql.Array createOracleArray(java.lang.String arrayTypeName,
java.lang.Object elements)
throws java.sql.SQLException
createOracleArray in interface OracleConnectionarrayTypeName - the name of the SQL type of the created objectelements - the elements of the created object
java.sql.SQLException - if a database error occurs
public BINARY_DOUBLE createBINARY_DOUBLE(double value)
throws java.sql.SQLException
createBINARY_DOUBLE in interface OracleConnectionvalue - the value that the new object should represent
java.sql.SQLException - if a database error occurs
public BINARY_FLOAT createBINARY_FLOAT(float value)
throws java.sql.SQLException
createBINARY_FLOAT in interface OracleConnectionvalue - the value that the new object should represent
java.sql.SQLException - if a database error occurs
public DATE createDATE(java.sql.Date value)
throws java.sql.SQLException
createDATE in interface OracleConnectionvalue - the value that the new object should repreesnt
java.sql.SQLException - if a database error occurs
public DATE createDATE(java.sql.Time value)
throws java.sql.SQLException
createDATE in interface OracleConnectionvalue - the value that the new object should repreesnt
java.sql.SQLException - if a database error occurs
public DATE createDATE(java.sql.Timestamp value)
throws java.sql.SQLException
createDATE in interface OracleConnectionvalue - the value that the new object should repreesnt
java.sql.SQLException - if a database error occurs
public DATE createDATE(java.sql.Date value,
java.util.Calendar cal)
throws java.sql.SQLException
createDATE in interface OracleConnectionvalue - the value that the new object should repreesntcal - the timezone in which the value is interpreted
java.sql.SQLException - if a database error occurs
public DATE createDATE(java.sql.Time value,
java.util.Calendar cal)
throws java.sql.SQLException
createDATE in interface OracleConnectionvalue - the value that the new object should repreesntcal - the timezone in which the value is interpreted
java.sql.SQLException - if a database error occurs
public DATE createDATE(java.sql.Timestamp value,
java.util.Calendar cal)
throws java.sql.SQLException
createDATE in interface OracleConnectionvalue - the value that the new object should repreesntcal - the timezone in which the value is interpreted
java.sql.SQLException - if a database error occurs
public DATE createDATE(java.lang.String value)
throws java.sql.SQLException
createDATE in interface OracleConnectionvalue - the value that the new object should repreesnt
java.sql.SQLException - if a database error occurs
public INTERVALDS createINTERVALDS(java.lang.String value)
throws java.sql.SQLException
createINTERVALDS in interface OracleConnectionvalue - the value that the new object shoud represent
java.sql.SQLException - if a database error occurs
public INTERVALYM createINTERVALYM(java.lang.String value)
throws java.sql.SQLException
createINTERVALYM in interface OracleConnectionvalue - the value that the new object shoud represent
java.sql.SQLException - if a database error occurs
public NUMBER createNUMBER(boolean value)
throws java.sql.SQLException
createNUMBER in interface OracleConnectionvalue - the value that the new object should represent
java.sql.SQLException - if a database error occurs
public NUMBER createNUMBER(byte value)
throws java.sql.SQLException
createNUMBER in interface OracleConnectionvalue - the value that the new object should represent
java.sql.SQLException - if a database error occurs
public NUMBER createNUMBER(short value)
throws java.sql.SQLException
createNUMBER in interface OracleConnectionvalue - the value that the new object should represent
java.sql.SQLException - if a database error occurs
public NUMBER createNUMBER(int value)
throws java.sql.SQLException
createNUMBER in interface OracleConnectionvalue - the value that the new object should represent
java.sql.SQLException - if a database error occurs
public NUMBER createNUMBER(long value)
throws java.sql.SQLException
createNUMBER in interface OracleConnectionvalue - the value that the new object should represent
java.sql.SQLException - if a database error occurs
public NUMBER createNUMBER(float value)
throws java.sql.SQLException
createNUMBER in interface OracleConnectionvalue - the value that the new object should represent
java.sql.SQLException - if a database error occurs
public NUMBER createNUMBER(double value)
throws java.sql.SQLException
createNUMBER in interface OracleConnectionvalue - the value that the new object should represent
java.sql.SQLException - if a database error occurs
public NUMBER createNUMBER(java.math.BigDecimal value)
throws java.sql.SQLException
createNUMBER in interface OracleConnectionvalue - the value that the new object should represent
java.sql.SQLException - if a database error occurs
public NUMBER createNUMBER(java.math.BigInteger value)
throws java.sql.SQLException
createNUMBER in interface OracleConnectionvalue - the value that the new object should represent
java.sql.SQLException - if a database error occurs
public NUMBER createNUMBER(java.lang.String value,
int scale)
throws java.sql.SQLException
createNUMBER in interface OracleConnectionvalue - the value that the new object should representscale - the scale of the new object
java.sql.SQLException - if a database error occurs
public TIMESTAMP createTIMESTAMP(java.sql.Date value)
throws java.sql.SQLException
createTIMESTAMP in interface OracleConnectionvalue - the value that the new object should represent
java.sql.SQLException - if a database error occurs
public TIMESTAMP createTIMESTAMP(DATE value)
throws java.sql.SQLException
createTIMESTAMP in interface OracleConnectionvalue - the value that the new object should represent
java.sql.SQLException - if a database error occurs
public TIMESTAMP createTIMESTAMP(java.sql.Time value)
throws java.sql.SQLException
createTIMESTAMP in interface OracleConnectionvalue - the value that the new object should represent
java.sql.SQLException - if a database error occurs
public TIMESTAMP createTIMESTAMP(java.sql.Timestamp value)
throws java.sql.SQLException
createTIMESTAMP in interface OracleConnectionvalue - the value that the new object should represent
java.sql.SQLException - if a database error occurs
public TIMESTAMP createTIMESTAMP(java.lang.String value)
throws java.sql.SQLException
createTIMESTAMP in interface OracleConnectionvalue - the value that the new object should represent
java.sql.SQLException - if a database error occurs
public TIMESTAMPTZ createTIMESTAMPTZ(java.sql.Date value)
throws java.sql.SQLException
createTIMESTAMPTZ in interface OracleConnectionvalue - the value that the new object should represent
java.sql.SQLException - if a database error occurs
public TIMESTAMPTZ createTIMESTAMPTZ(java.sql.Date value,
java.util.Calendar cal)
throws java.sql.SQLException
createTIMESTAMPTZ in interface OracleConnectionvalue - the value that the new object should representcal - the timezone of the value
java.sql.SQLException - if a database error occurs
public TIMESTAMPTZ createTIMESTAMPTZ(java.sql.Time value)
throws java.sql.SQLException
createTIMESTAMPTZ in interface OracleConnectionvalue - the value that the new object should represent
java.sql.SQLException - if a database error occurs
public TIMESTAMPTZ createTIMESTAMPTZ(java.sql.Time value,
java.util.Calendar cal)
throws java.sql.SQLException
createTIMESTAMPTZ in interface OracleConnectionvalue - the value that the new object should representcal - the timezone of the value
java.sql.SQLException - if a database error occurs
public TIMESTAMPTZ createTIMESTAMPTZ(java.sql.Timestamp value)
throws java.sql.SQLException
createTIMESTAMPTZ in interface OracleConnectionvalue - the value that the new object should represent
java.sql.SQLException - if a database error occurs
public TIMESTAMPTZ createTIMESTAMPTZ(java.sql.Timestamp value,
java.util.Calendar cal)
throws java.sql.SQLException
createTIMESTAMPTZ in interface OracleConnectionvalue - the value that the new object should representcal - the timezone of the value
java.sql.SQLException - if a database error occurs
public TIMESTAMPTZ createTIMESTAMPTZ(java.lang.String value)
throws java.sql.SQLException
createTIMESTAMPTZ in interface OracleConnectionvalue - the value that the new object should represent
java.sql.SQLException - if a database error occurs
public TIMESTAMPTZ createTIMESTAMPTZ(java.lang.String value,
java.util.Calendar cal)
throws java.sql.SQLException
createTIMESTAMPTZ in interface OracleConnectionvalue - the value that the new object should representcal - the timezone of the value
java.sql.SQLException - if a database error occurs
public TIMESTAMPTZ createTIMESTAMPTZ(DATE value)
throws java.sql.SQLException
createTIMESTAMPTZ in interface OracleConnectionjava.sql.SQLException - if a database error occurs
public TIMESTAMPLTZ createTIMESTAMPLTZ(java.sql.Date value,
java.util.Calendar cal)
throws java.sql.SQLException
createTIMESTAMPLTZ in interface OracleConnectionvalue - the value that the new object should representcal - the timezone of the value
java.sql.SQLException - if a database error occurs
public TIMESTAMPLTZ createTIMESTAMPLTZ(java.sql.Time value,
java.util.Calendar cal)
throws java.sql.SQLException
createTIMESTAMPLTZ in interface OracleConnectionvalue - the value that the new object should representcal - the timezone of the value
java.sql.SQLException - if a database error occurs
public TIMESTAMPLTZ createTIMESTAMPLTZ(java.sql.Timestamp value,
java.util.Calendar cal)
throws java.sql.SQLException
createTIMESTAMPLTZ in interface OracleConnectionvalue - the value that the new object should representcal - the timezone of the value
java.sql.SQLException - if a database error occurs
public TIMESTAMPLTZ createTIMESTAMPLTZ(java.lang.String value,
java.util.Calendar cal)
throws java.sql.SQLException
createTIMESTAMPLTZ in interface OracleConnectionvalue - the value that the new object should representcal - the timezone of the value
java.sql.SQLException - if a database error occurs
public TIMESTAMPLTZ createTIMESTAMPLTZ(DATE value,
java.util.Calendar cal)
throws java.sql.SQLException
createTIMESTAMPLTZ in interface OracleConnectionvalue - the value that the new object should representcal - the timezone of the value
java.sql.SQLException - if a database error occurs
public DatabaseChangeRegistration registerDatabaseChangeNotification(java.util.Properties options)
throws java.sql.SQLException
OracleConnectionThis method creates a new database change registration in the database server with the given options. It also opens a listening socket which will be used by the database to send notifications. Note that if there already is a listening socket (created by a different registration), then it will be used by this registration as well.
This method returns a DatabaseChangeRegistration object that can then be used to associate a statement with this registration.
The registration will continue to live after this connection is closed. You need to explicitly unregister it to destroy it in the server and release the resources in the driver.
This method uses one roundtrip.
registerDatabaseChangeNotification in interface OracleConnectionoptions - Possible options are ([] means default):OracleConnection.NTF_QOS_RELIABLE: "true"/["false"]. Set this option
to "true" to make the notifications persistent which comes at a performance
cost.OracleConnection.NTF_QOS_PURGE_ON_NTFN: "true"/["false"]. Set this
option to "true" and the registration will be expunged on the first
notification event.OracleConnection.NTF_TIMEOUT: value in seconds "60"/["0"]. Specifies
the time in seconds after which the registration is automatically
expunged by the database. The default is "0": the registration lives
until explicitly deregistered.OracleConnection.NTF_LOCAL_TCP_PORT: "1234"/[NTF_DEFAULT_TCP_PORT].
This option lets you specify what TCP port the driver should use for the
listening socket. If you don't specify a port, the driver will use
NTF_DEFAULT_TCP_PORT and if it's already used, it will increment it by one
until it finds one that is available.OracleConnection.NTF_LOCAL_HOST: example "212.121.134.12". Use this
option to manually specify the IP address of the machine that will
receive the notifications from the server. Use this option with caution:
only specify the IP address of the local machine when the driver is unable
to find it out on its own (it uses InetAddress.getLocalHost()
). For example if the machine on which runs the JDBC
driver is a VPN client, you may have to specify the IP address of the
VPN client which the driver cannot find out on its own. This option
should not be used to attempt to have a different remote host receive
the notifications from the server.OracleConnection.DCN_NOTIFY_ROWIDS: "true"/["false"]. Use this option
to have the server send the ROWIDs of the row that have changed within the
notification event. By default this feature is turned off.OracleConnection.DCN_IGNORE_INSERTOP: "true"/["false"]. Use this
option to tell the server to ignore INSERT operations.OracleConnection.DCN_IGNORE_UPDATEOP: "true"/["false"]. Use this
options to tell the server to ignore UPDATE operations.OracleConnection.DCN_IGNORE_DELETEOP: "true"/["false"]. Use this
options to tell the server to ignore DELETE operations.OracleConnection.DCN_NOTIFY_CHANGELAG: "30"/["0"]. This is
an int value (specified as a String), that can be used to specify
the number of transactions by which the client is willing to lag behind.
This option can be used by the client as a throttling mechanism for
database change events. When this option is chosen, ROWID level granularity
of information will not be available in the events, even if the
DCN_NOTIFY_ROWIDS option was set to "true". OracleConnection.DCN_QUERY_CHANGE_NOTIFICATION: "true"/["false"]. Use
this option to activate query change notification instead of object
change notification. Note that this option is only available in the database
server starting in 11.1.OracleConnection.DCN_BEST_EFFORT: "true"/["false"]. If a query has been
successfully registered, by default there will be no FALSE positives. If this
option is selected during registrations, then registrations on complex
queries may still be allowed but notifications may have some FALSE positives,
because full pruning may not be performed if determined to be too expensive.
In the worst case notifications will be generated in response to any DML/DDL
changes to underlying objects. Note that this option is ignored if the
DCN_QUERY_CHANGE_NOTIFICATION isn't turned on. As
DCN_QUERY_CHANGE_NOTIFICATION, this option is only available
in the database server starting in 11.1.OracleConnection.NTF_GROUPING_CLASS:
OracleConnection.NTF_GROUPING_CLASS_TIME/[OracleConnection.NTF_GROUPING_CLASS_NONE].
Notification Grouping Class, the criterion
or dimension for grouping. The only supported class is
OracleConnection.NTF_GROUPING_CLASS_TIME meaning grouping by time, that is,
the user specifies a time value and a single notification gets published at the end of
that time. To use grouping at least this option must be specified to a value other than
the default OracleConnection.NTF_GROUPING_CLASS_NONE, which is no grouping.OracleConnection.NTF_GROUPING_VALUE: "1200/["600"]. Notification Grouping
Value, the value of the grouping class. The value must be an integer number. For the TIME
grouping class, this value represents a number of seconds, meaning the time after which
grouped notifications are sent. If not specified, it defaults to 600 sec.OracleConnection.NTF_GROUPING_TYPE:
OracleConnection.NTF_GROUPING_TYPE_LAST/[OracleConnection.NTF_GROUPING_TYPE_SUMMARY].
Notification Grouping Type, the format of grouping notification. It can either contain
the summary of all events (default) or the last event in the group.OracleConnection.NTF_GROUPING_START_TIME: When to start grouping?
Notification grouping can start from a user-specified time that should a valid
timestamp with time zone, that is an instance of oracle.sql.TIMESTAMPTZ.
If this option is not specified when using grouping, it defaults to current system time.
For example if prop was the option properties, and conn the
connection object, you would call:
prop.put(OracleConnection.NTF_GROUPING_START_TIME,new TIMESTAMPTZ(conn,"2007-06-21 10:10:00.0"));.OracleConnection.NTF_GROUPING_REPEAT_TIME: "100"/[NTF_GROUPING_REPEAT_FOREVER].
How many times do grouping?
Grouping notifications will be sent as many times as specified by the notification
grouping repeat count and after that revert to regular notifications. If not specified,
it will default to: NTF_GROUPING_REPEAT_FOREVER - keep sending grouping notifications forever.java.sql.SQLException
public DatabaseChangeRegistration getDatabaseChangeRegistration(int regid)
throws java.sql.SQLException
OracleConnectionThis method can be used if you create a registration through PLSQL and you want to associate a JDBC statement with it.
This method doesn't create a new listener on the JDBC driver side and DatabaseChangeEvent won't be created. Thus you won't be allowed to attach any listeners to this registration.
Note that this method doesn't generate any roundtrip to the database.
getDatabaseChangeRegistration in interface OracleConnectionregid - The id of the registration
java.sql.SQLException
public void unregisterDatabaseChangeNotification(DatabaseChangeRegistration registration)
throws java.sql.SQLException
OracleConnectionThis method interrupts the notification thread and removes all listeners attached to this registration before closing it.
unregisterDatabaseChangeNotification in interface OracleConnectionjava.sql.SQLExceptionOracleConnection.unregisterDatabaseChangeNotification(long,String)
public void unregisterDatabaseChangeNotification(int registrationId,
java.lang.String host,
int tcpport)
throws java.sql.SQLException
OracleConnectionThis method will throw an "ORA-24950: unregister failed, registration not found" if you don't provide the correct TCP port which can be extracted from the "callback" value in the "USER_CHANGE_NOTIFICATION_REGS" table.
unregisterDatabaseChangeNotification in interface OracleConnectionjava.sql.SQLExceptionOracleConnection.unregisterDatabaseChangeNotification(long,String)
public void unregisterDatabaseChangeNotification(int registrationId)
throws java.sql.SQLException
OracleConnection
unregisterDatabaseChangeNotification in interface OracleConnectionjava.sql.SQLExceptionOracleConnection.unregisterDatabaseChangeNotification(long, String)
public void unregisterDatabaseChangeNotification(long registrationId,
java.lang.String callback)
throws java.sql.SQLException
OracleConnection
This flavor of unregisterDatabaseChangeNotification can be used to
process the result of the following query:
select regid,callback from USER_CHANGE_NOTIFICATION_REGS;.
For example to remove all registrations from the database you would execute the following code:
Statement stmt= conn.createStatement();
ResultSet rs = stmt.executeQuery("select regid,callback from USER_CHANGE_NOTIFICATION_REGS");
while(rs.next())
{
long regid = rs.getLong(1);
String callback = rs.getString(2);
((OracleConnection)conn).unregisterDatabaseChangeNotification(regid,callback);
}
rs.close();
stmt.close();
unregisterDatabaseChangeNotification in interface OracleConnectionjava.sql.SQLExceptionOracleConnection.unregisterDatabaseChangeNotification(oracle.jdbc.dcn.DatabaseChangeRegistration)
public AQNotificationRegistration[] registerAQNotification(java.lang.String[] name,
java.util.Properties[] options,
java.util.Properties globaloptions)
throws java.sql.SQLException
OracleConnectionThis method creates an array of new AQ registrations in the database server with the given options. It also opens a listening socket which will be used by the database to send notifications. Note that mutiple registrations can share the same listening socket.
Each registration will continue to live after this connection is closed. You need to explicitly unregister it to destroy it in the server and release the resources in the driver.
This method uses one roundtrip.
registerAQNotification in interface OracleConnectionname - contains an array of queue names ("SCOTT.MY_QUEUE") for single consumer
queues or queue names with the consumer name ("SCOTT.MY_QUEUE:RECEIVER")
for multiple consumer queues.options - Possible options are ([] means default):OracleConnection.NTF_QOS_RELIABLE: "true"/["false"]. Set this option
to "true" to make the notifications persistent which comes at a performance
cost.OracleConnection.NTF_QOS_PURGE_ON_NTFN: "true"/["false"]. Set this
option to "true" and the registration will be expunged on the first
notification event.OracleConnection.NTF_TIMEOUT: value in seconds "60"/["0"]. Specifies
the time in seconds after which the registration is automatically
expunged by the database. The default is "0": the registration lives
until explicitly deregistered.OracleConnection.NTF_AQ_PAYLOAD: "true"/["false"]. Sets this to "true"
to make the server send the payload within the notification. Note that
this feature works only with "RAW" payloads.OracleConnection.NTF_GROUPING_CLASS:
OracleConnection.NTF_GROUPING_CLASS_TIME/[OracleConnection.NTF_GROUPING_CLASS_NONE].
Notification Grouping Class, the criterion
or dimension for grouping. As of 11.2 the only supported class is
OracleConnection.NTF_GROUPING_CLASS_TIME meaning grouping by time, that is,
the user specifies a time value and a single notification gets published at the end of
that time. To use grouping at least this option must be specified to a value other than
the default OracleConnection.NTF_GROUPING_CLASS_NONE, which is no grouping.OracleConnection.NTF_GROUPING_VALUE: "1200/["600"]. Notification Grouping
Value, the value of the grouping class. The value must be an integer number. For the TIME
grouping class, this value represents a number of seconds, meaning the time after which
grouped notifications are sent. If not specified, it defaults to 600 sec.OracleConnection.NTF_GROUPING_TYPE:
OracleConnection.NTF_GROUPING_TYPE_LAST/[OracleConnection.NTF_GROUPING_TYPE_SUMMARY].
Notification Grouping Type, the format of grouping notification. It can either contain
the summary of all events (default) or the last event in the group.OracleConnection.NTF_GROUPING_START_TIME: When to start grouping?
Notification grouping can start from a user-specified time that should a valid
timestamp with time zone, that is an instance of oracle.sql.TIMESTAMPTZ.
If this option is not specified when using grouping, it defaults to current system time.
For example if prop was the option properties, and conn the
connection object, you would call:
prop.put(OracleConnection.NTF_GROUPING_START_TIME,new TIMESTAMPTZ(conn,"2007-06-21 10:10:00.0"));.OracleConnection.NTF_GROUPING_REPEAT_TIME: "100/[NTF_GROUPING_REPEAT_FOREVER]".
How many times do grouping?
Grouping notifications will be sent as many times as specified by the notification
grouping repeat count and after that revert to regular notifications. If not specified,
it will default to: NTF_GROUPING_REPEAT_FOREVER - keep sending grouping notifications forever.globaloptions - Possible options are ([] means default):OracleConnection.NTF_LOCAL_TCP_PORT: "1234"/[NTF_DEFAULT_TCP_PORT].
This option lets you specify what TCP port the driver should use for the
listening socket. If you don't specify a port, the driver will use
NTF_DEFAULT_TCP_PORT and if it's already used, it will increment it by one
until it finds one that is available.OracleConnection.NTF_LOCAL_HOST: example "212.121.134.12". Use this
option to manually specify the IP address of the machine that will
receive the notifications from the server. Use this option with caution:
only specify the IP address of the local machine when the driver is unable
to find it out on its own (it uses InetAddress.getLocalHost()
). For example if the machine on which runs the JDBC
driver is a VPN client, you may have to specify the IP address of the
VPN client which the driver cannot find out on its own. This option
should not be used to attempt to have a different remote host receive
the notifications from the server.
java.sql.SQLException
public void unregisterAQNotification(AQNotificationRegistration registration)
throws java.sql.SQLException
OracleConnection
unregisterAQNotification in interface OracleConnectionjava.sql.SQLException
public AQMessage dequeue(java.lang.String queueName,
AQDequeueOptions opt,
byte[] tdo)
throws java.sql.SQLException
OracleConnection
dequeue in interface OracleConnectionqueueName - name of the queue from which to dequeue.opt - dequeue optionstdo - the Type Descriptor Object OID of the type of the queue.
java.sql.SQLException
public AQMessage dequeue(java.lang.String queueName,
AQDequeueOptions opt,
java.lang.String typeName)
throws java.sql.SQLException
OracleConnection
dequeue in interface OracleConnectionqueueName - name of the queue from which to dequeue.opt - dequeue options.typeName - the name of the type of the queue. For example,
it can be "RAW", "SYS.ANYDATA" or "SCOTT.MY_OBJECT_TYPE".
java.sql.SQLException
public void enqueue(java.lang.String queueName,
AQEnqueueOptions opt,
AQMessage mesg)
throws java.sql.SQLException
OracleConnection
enqueue in interface OracleConnectionqueueName - name of the queue where to enqueue.opt - enqueue options.mesg - the AQ message to enqueue.
java.sql.SQLException
public void commit(java.util.EnumSet<OracleConnection.CommitOption> flags)
throws java.sql.SQLException
OracleConnection
commit in interface OracleConnectionjava.sql.SQLException
public void cancel()
throws java.sql.SQLException
OracleConnectionFor example, in the context of AQ, it can be used to cancel a 'dequeue' call that is waiting for a new message to be enqueued.
cancel in interface OracleConnectionjava.sql.SQLException - if the cancel operation fails
public void abort()
throws java.sql.SQLException
OracleConnection
abort in interface OracleConnectionjava.sql.SQLException - -- Io Exception: Socket closed - ORA-17002
TNS:not connected - ORA-12153
public TypeDescriptor[] getAllTypeDescriptorsInCurrentSchema()
throws java.sql.SQLException
OracleConnection
getAllTypeDescriptorsInCurrentSchema in interface OracleConnectionjava.sql.SQLException - If an error occurs.
public TypeDescriptor[] getTypeDescriptorsFromListInCurrentSchema(java.lang.String[] typeNames)
throws java.sql.SQLException
OracleConnection
getTypeDescriptorsFromListInCurrentSchema in interface OracleConnectionjava.sql.SQLException - if the specified type does not exist, or if an error
occurred.
public TypeDescriptor[] getTypeDescriptorsFromList(java.lang.String[][] schemaAndTypeNamePairs)
throws java.sql.SQLException
OracleConnection
getTypeDescriptorsFromList in interface OracleConnectionjava.sql.SQLException - if any of the specified types does not exist, or if an error
occurs.
public java.lang.String getDataIntegrityAlgorithmName()
throws java.sql.SQLException
OracleConnection
getDataIntegrityAlgorithmName in interface OracleConnectionjava.sql.SQLException
public java.lang.String getEncryptionAlgorithmName()
throws java.sql.SQLException
OracleConnection
getEncryptionAlgorithmName in interface OracleConnectionjava.sql.SQLException
public java.lang.String getAuthenticationAdaptorName()
throws java.sql.SQLException
OracleConnection
getAuthenticationAdaptorName in interface OracleConnectionjava.sql.SQLExceptionpublic boolean isUsable()
OracleConnection
isUsable in interface OracleConnection
public void setDefaultTimeZone(java.util.TimeZone tz)
throws java.sql.SQLException
setDefaultTimeZone in interface OracleConnectionDefault - TimeZone to be used for all Date, Time and Timestamp
conversions.
java.sql.SQLException - if there is an issue while setting the TimeZone
public java.util.TimeZone getDefaultTimeZone()
throws java.sql.SQLException
getDefaultTimeZone in interface OracleConnectionjava.sql.SQLException - If there is any issue while retrieving the TimeZone
public void setApplicationContext(java.lang.String nameSpace,
java.lang.String attribute,
java.lang.String value)
throws java.sql.SQLException
OracleConnection
setApplicationContext in interface OracleConnectionnameSpace - The namespace where this attribute/value pairs
will be stored. The only supported namespace is CLIENTCONTEXT.
The value cannot be null nor empty.attribute - The attribute whose value needs to be set. If
the value is null then a NullPointerException is thrown. If the
value is an empty string (""), then the namespace will be cleared
and the value is ignored.value - The value of the attribute. If the value is null then
a NullPointerException is thrown. If the
value is an empty string (""), then the attribute will be cleared.
java.sql.SQLException - If an error occursclearAllApplicationContext
public void clearAllApplicationContext(java.lang.String nameSpace)
throws java.sql.SQLException
OracleConnection
clearAllApplicationContext in interface OracleConnectionnameSpace - The namespace which will be cleared
java.sql.SQLExceptionsetApplicationContext
|
Oracle JDBC API Reference 11g Release 2 ("11.2.0.3.0") |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||