Oracle Application Server TopLink API Reference
10g Release 2 (10.1.2)

B15903-01


oracle.toplink.sdk
Class SDKAccessor

java.lang.Object
  extended byoracle.toplink.sdk.SDKAccessor

All Implemented Interfaces:
oracle.toplink.internal.databaseaccess.Accessor, java.lang.Cloneable
Direct Known Subclasses:
XMLFileAccessor, XMLStreamAccessor

public class SDKAccessor
extends java.lang.Object
implements oracle.toplink.internal.databaseaccess.Accessor

SDKAccessor is a facile implementation of the Accessor interface. The only things of real substance it does is:

Since:
TOPLink/Java 3.0
See Also:
SDKCall, SDKLogin

Constructor Summary
SDKAccessor()
Default Constructor.

Method Summary
void afterJTSTransaction()
To be called after JTS transaction has been completed (committed or rolled back)
void beginTransaction(oracle.toplink.publicinterface.Session session)
Begin a transaction on the "data store".
java.lang.Object clone()
Clone the accessor.
void closeConnection()
Close the accessor's connection.
void commitTransaction(oracle.toplink.publicinterface.Session session)
Commit the current transaction on the "data store".
void connect(DatabaseLogin login, oracle.toplink.publicinterface.Session session)
Establish a connection to the "data store".
void decrementCallCount()
Decrement the number of calls in progress.
void disconnect(oracle.toplink.publicinterface.Session session)
Drop the connection to the "data store".
java.lang.Object executeCall(Call call, DatabaseRow translationRow, oracle.toplink.publicinterface.Session session)
Execute the specified call with the specified parameter row.
void flushSelectCalls(oracle.toplink.publicinterface.Session session)
Added as a result of Bug 2804663 - satisfy the Accessor interface implementation.
int getCallCount()
Return the number of calls currently in progress.
java.util.Vector getColumnInfo(java.lang.String catalog, java.lang.String schema, java.lang.String tableName, java.lang.String columnName, oracle.toplink.publicinterface.Session session)
Return column information for the specified database objects.
java.sql.Connection getConnection()
Deprecated. replaced by ((oracle.toplink.internal.databaseaccess.DatabaseAccessor) accessor).getConnection() This has been deprecated as the data accessor is now generic (i.e. JDBC, XML, EIS, SDK). This method cannot be used for SDK accessors and is only implemented for backward compatibility.
java.util.Vector getTableInfo(java.lang.String catalog, java.lang.String schema, java.lang.String tableName, java.lang.String[] types, oracle.toplink.publicinterface.Session session)
Return table information for the specified database objects.
void incrementCallCount(oracle.toplink.publicinterface.Session session)
Increment the number of calls in progress.
boolean isConnected()
Return whether the accessor has a connection to the "data store".
void logMessage(java.lang.String message, oracle.toplink.publicinterface.Session session)
void reestablishConnection(oracle.toplink.publicinterface.Session session)
Reconnect to the database.
void rollbackTransaction(oracle.toplink.publicinterface.Session session)
Roll back the current transaction on the "data store".
java.lang.String toString()
Call #toString(PrintWriter), to allow subclasses to insert additional information.
boolean usesExternalTransactionController()
Return whether the accessor uses an external transaction controller (e.g.

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

SDKAccessor

public SDKAccessor()
Default Constructor.

Method Detail

afterJTSTransaction

public void afterJTSTransaction()
Description copied from interface: oracle.toplink.internal.databaseaccess.Accessor
To be called after JTS transaction has been completed (committed or rolled back)
Specified by:
afterJTSTransaction in interface oracle.toplink.internal.databaseaccess.Accessor

beginTransaction

public void beginTransaction(oracle.toplink.publicinterface.Session session)
                      throws SDKDataStoreException
Begin a transaction on the "data store".
Specified by:
beginTransaction in interface oracle.toplink.internal.databaseaccess.Accessor
Throws:
SDKDataStoreException

clone

public java.lang.Object clone()
Clone the accessor.
Specified by:
clone in interface oracle.toplink.internal.databaseaccess.Accessor

closeConnection

public void closeConnection()
Close the accessor's connection. This is used only for external connection pooling when it is intended for the connection to be reconnected in the future.
Specified by:
closeConnection in interface oracle.toplink.internal.databaseaccess.Accessor

commitTransaction

public void commitTransaction(oracle.toplink.publicinterface.Session session)
                       throws SDKDataStoreException
Commit the current transaction on the "data store".
Specified by:
commitTransaction in interface oracle.toplink.internal.databaseaccess.Accessor
Throws:
SDKDataStoreException

connect

public void connect(DatabaseLogin login,
                    oracle.toplink.publicinterface.Session session)
             throws SDKDataStoreException
Establish a connection to the "data store".
Specified by:
connect in interface oracle.toplink.internal.databaseaccess.Accessor
Throws:
SDKDataStoreException

decrementCallCount

public void decrementCallCount()
Decrement the number of calls in progress. Used for external pooling.
Specified by:
decrementCallCount in interface oracle.toplink.internal.databaseaccess.Accessor

disconnect

public void disconnect(oracle.toplink.publicinterface.Session session)
                throws SDKDataStoreException
Drop the connection to the "data store".
Specified by:
disconnect in interface oracle.toplink.internal.databaseaccess.Accessor
Throws:
SDKDataStoreException

executeCall

public java.lang.Object executeCall(Call call,
                                    DatabaseRow translationRow,
                                    oracle.toplink.publicinterface.Session session)
                             throws SDKDataStoreException
Execute the specified call with the specified parameter row.
Specified by:
executeCall in interface oracle.toplink.internal.databaseaccess.Accessor
Returns:
a row, a collection of rows, a row count, or a cursor
Throws:
SDKDataStoreException

getCallCount

public int getCallCount()
Return the number of calls currently in progress. Used for load balancing and external pooling.
Specified by:
getCallCount in interface oracle.toplink.internal.databaseaccess.Accessor

getColumnInfo

public java.util.Vector getColumnInfo(java.lang.String catalog,
                                      java.lang.String schema,
                                      java.lang.String tableName,
                                      java.lang.String columnName,
                                      oracle.toplink.publicinterface.Session session)
                               throws SDKDataStoreException
Return column information for the specified database objects.
Specified by:
getColumnInfo in interface oracle.toplink.internal.databaseaccess.Accessor
Throws:
SDKDataStoreException

getConnection

public java.sql.Connection getConnection()
Deprecated. replaced by ((oracle.toplink.internal.databaseaccess.DatabaseAccessor) accessor).getConnection() This has been deprecated as the data accessor is now generic (i.e. JDBC, XML, EIS, SDK). This method cannot be used for SDK accessors and is only implemented for backward compatibility.
OBSOLETE:
Specified by:
getConnection in interface oracle.toplink.internal.databaseaccess.Accessor

getTableInfo

public java.util.Vector getTableInfo(java.lang.String catalog,
                                     java.lang.String schema,
                                     java.lang.String tableName,
                                     java.lang.String[] types,
                                     oracle.toplink.publicinterface.Session session)
                              throws SDKDataStoreException
Return table information for the specified database objects.
Specified by:
getTableInfo in interface oracle.toplink.internal.databaseaccess.Accessor
Throws:
SDKDataStoreException

incrementCallCount

public void incrementCallCount(oracle.toplink.publicinterface.Session session)
Increment the number of calls in progress. Used for external pooling.
Specified by:
incrementCallCount in interface oracle.toplink.internal.databaseaccess.Accessor

isConnected

public boolean isConnected()
Return whether the accessor has a connection to the "data store".
Specified by:
isConnected in interface oracle.toplink.internal.databaseaccess.Accessor

logMessage

public void logMessage(java.lang.String message,
                       oracle.toplink.publicinterface.Session session)

reestablishConnection

public void reestablishConnection(oracle.toplink.publicinterface.Session session)
                           throws SDKDataStoreException
Reconnect to the database. This can be used if the connection was temporarily disconnected or if it timed out.
Specified by:
reestablishConnection in interface oracle.toplink.internal.databaseaccess.Accessor
Throws:
SDKDataStoreException

rollbackTransaction

public void rollbackTransaction(oracle.toplink.publicinterface.Session session)
                         throws SDKDataStoreException
Roll back the current transaction on the "data store".
Specified by:
rollbackTransaction in interface oracle.toplink.internal.databaseaccess.Accessor
Throws:
SDKDataStoreException

toString

public java.lang.String toString()
Call #toString(PrintWriter), to allow subclasses to insert additional information.

usesExternalTransactionController

public boolean usesExternalTransactionController()
Return whether the accessor uses an external transaction controller (e.g. JTS).
Specified by:
usesExternalTransactionController in interface oracle.toplink.internal.databaseaccess.Accessor

flushSelectCalls

public void flushSelectCalls(oracle.toplink.publicinterface.Session session)
Added as a result of Bug 2804663 - satisfy the Accessor interface implementation.
Specified by:
flushSelectCalls in interface oracle.toplink.internal.databaseaccess.Accessor
See Also:
LOBValueWriter.buildAndExecuteCallForLocator(DatabaseCall,Session,Accessor)

Copyright © 1998, 2005 Oracle Corporation. All Rights Reserved.