FileDocCategorySizeDatePackage
Accessor.javaAPI DocGlassfish v2 API7388Tue May 22 16:54:20 BST 2007oracle.toplink.essentials.internal.databaseaccess

Accessor

public interface Accessor implements Cloneable
INTERNAL: Accessor defines the interface used primarily by the assorted TopLink Sessions to interact with a data store. In "normal" TopLink this data store is a relational database. But this interface also allows developers using the TopLink SDK to develop Accessors to other, non-relational, data stores.

Accessors must implement the following behavior:

  • connect to and disconnect from the data store
  • handle transaction contexts
  • execute calls that read, insert, update, and delete data
  • keep track of concurrently executing calls
  • supply metadata about the data store
see
oracle.toplink.essentials.publicinterface.Session
see
Call
author
Big Country
since
TOPLink/Java 3.0

Fields Summary
Constructors Summary
Methods Summary
public voidafterJTSTransaction()
To be called after JTS transaction has been completed (committed or rolled back)

public voidbeginTransaction(oracle.toplink.essentials.internal.sessions.AbstractSession session)
Begin a transaction on the data store.

public java.lang.Objectclone()
Return a clone of the accessor.

public voidcloseConnection()
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.

public voidcommitTransaction(oracle.toplink.essentials.internal.sessions.AbstractSession session)
Commit a transaction on the data store.

public voidconnect(oracle.toplink.essentials.sessions.Login login, oracle.toplink.essentials.internal.sessions.AbstractSession session)
Connect to the data store using the configuration information in the login.

public voiddecrementCallCount()
Decrement the number of calls in progress. Used for external pooling.

public voiddisconnect(oracle.toplink.essentials.internal.sessions.AbstractSession session)
Disconnect from the data store.

public java.lang.ObjectexecuteCall(oracle.toplink.essentials.queryframework.Call call, oracle.toplink.essentials.internal.sessions.AbstractRecord translationRow, oracle.toplink.essentials.internal.sessions.AbstractSession session)
Execute the call. The actual behavior of the execution depends on the type of call. The call may be parameterized where the arguments are in the translation row. The row will be empty if there are no parameters.

return
a row, a collection of rows, a row count, or a cursor

public voidflushSelectCalls(oracle.toplink.essentials.internal.sessions.AbstractSession session)
Execute any deferred select calls. This method will generally be called after one or more select calls have been collected in a LOBValueWriter (to be executed after all insert calls are executed). Bug 2804663.

see
oracle.toplink.essentials.internal.helper.LOBValueWriter#buildAndExecuteCallForLocator(DatabaseCall,Session,Accessor)

public intgetCallCount()
Return the number of calls currently in progress. Used for load balancing and external pooling.

public java.util.VectorgetColumnInfo(java.lang.String catalog, java.lang.String schema, java.lang.String tableName, java.lang.String columnName, oracle.toplink.essentials.internal.sessions.AbstractSession session)
Return the column metadata for the specified selection criteria.

public java.sql.ConnectiongetConnection()
Return the JDBC connection for relational accessors. This will fail for non-relational accessors.

public java.lang.ObjectgetDatasourceConnection()
Return the driver level connection, this will need to be cast to the implementation class for the data access type being used.

public java.util.VectorgetTableInfo(java.lang.String catalog, java.lang.String schema, java.lang.String tableName, java.lang.String[] types, oracle.toplink.essentials.internal.sessions.AbstractSession session)
Return the table metadata for the specified selection criteria.

public voidincrementCallCount(oracle.toplink.essentials.internal.sessions.AbstractSession session)
Increment the number of calls in progress. Used for external pooling.

public booleanisConnected()
Return whether the accessor is connected to the data store.

public voidreestablishConnection(oracle.toplink.essentials.internal.sessions.AbstractSession session)
Reconnect to the database. This can be used if the connection was temporarily disconnected or if it timed out.

public voidrollbackTransaction(oracle.toplink.essentials.internal.sessions.AbstractSession session)
Roll back a transaction on the data store.

public booleanusesExternalTransactionController()
Return whether the accessor uses an external transaction controller (e.g. JTS).

public voidwritesCompleted(oracle.toplink.essentials.internal.sessions.AbstractSession session)
This method will be called after a series of writes have been issued to mark where a particular set of writes has completed. It will be called from commitTransaction and may be called from writeChanges. Its main purpose is to ensure that the batched statements have been executed