Documentation Archive Developer
Search
[an error occurred while processing this directive] PATH  Documentation > WebObjects 4.5 > OracleEOAdaptor Reference

Table of Contents

OracleChannel


Inherits from: EOAdaptorChannel : NSObject
Package: com.apple.yellow.oracleeoadaptorjava


Class Description


An OracleChannel represents an independent communication channel to the database server its OracleAdaptor is connected to. All of an OracleChannel's operations take place within the context of transactions controlled or tracked by its OracleContext. An OracleContext can manage multiple OracleChannels, and a channel is associated with only one context.

The features OracleChannel adds to EOAdaptorChannel are as follows:




Method Types


Finding table names
oracleTableNamesSQL
setOracleTableNamesSQL
describeTableNames
Accessing the fetch buffer length
fetchBufferLength
setFetchBufferLength
Error handling
raiseOracleError


Static Methods



oracleTableNamesSQL

public static String oracleTableNamesSQL()

Returns the SQL statement that will be executed when building a default model.

setOracleTableNamesSQL

public static void setOracleTableNamesSQL(String sql)

Sets to sql the SQL statement that will be used to return a list of table names from the database. By default, this list is the result of the SQL statement:SELECT TABLE_NAME FROM USER_TABLES ORDER BY TABLE_NAME

This setting is used by all OracleChannels in an application. You can specify a different SQL statement using the defaults write command, for example:

% defaults write NSGlobalDomain OracleTableNamesSQL "SELECT TABLE_NAME FROM..."

Once you use setOracleTableNamesSQL to specify a setting, it supersedes values set with the defaults write command.




Instance Methods



describeTableNames

public NSArray describeTableNames()

Overrides the EOAdaptorChannel implementation to return an array of the names of all the tables owned by the current user. Uses the SQL returned by oracleTableNamesSQL.

fetchBufferLength

public int fetchBufferLength()

Returns the size, in bytes, of the fetch buffer. The larger the buffer, the more rows can be returned for each round trip to the server.

raiseOracleError

public void raiseOracleError()

Examines Oracle structures for error flags and raises an exception if one is found. The userInfo of the exception contains the Oracle error code in an entry with the key OracleErrorKey.

setFetchBufferLength

public void setFetchBufferLength(int length)

Sets to length the size, in bytes, of the fetch buffer. The larger the buffer, the more rows can be returned for each round trip to the server.


Table of Contents