|
WebObjects 5.2.3 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.webobjects.jdbcadaptor.JDBCPlugIn com.webobjects.jdbcadaptor.OraclePlugIn
Nested Class Summary | |
static class |
OraclePlugIn.OracleExpression
|
static class |
OraclePlugIn.OracleSynchronizationFactory
|
Field Summary |
Fields inherited from class com.webobjects.jdbcadaptor.JDBCPlugIn |
DefaultPlugInClassName, DefaultPlugInSuffix |
Constructor Summary | |
OraclePlugIn(JDBCAdaptor adaptor)
|
Method Summary | |
void |
assignTypeForAttribute(EOAttribute attribute)
The adaptor invokes this method to allow the JDBCPlugIn to customize the newly created attribute. |
Properties |
connectionPropertiesForConnectionDictionary(NSDictionary connectionDictionary)
Returns a Properties object that should be used for setting up a connection environment. |
EOSynchronizationFactory |
createSynchronizationFactory()
Creates a new EOSynchronizationFactory using the plugin's response to adaptor() . |
String |
databaseProductName()
Returns a string identifying the database. |
String |
defaultDriverName()
Returns a fully qualified name of the JDBC driver class that this plugin prefers to use. |
Class |
defaultExpressionClass()
Returns the Java Class to use as the expression class. |
Object |
fetchBLOB(ResultSet rs,
int column,
EOAttribute attribute,
boolean materialize)
Fetch a BLOB. |
Object |
fetchCLOB(ResultSet rs,
int column,
EOAttribute attribute,
boolean materialize)
Fetch a CLOB. |
NSDictionary |
jdbcInfo()
Returns database-specific information about the JDBC data source. |
int |
jdbcTypeForUnknownExternalType(String externalType,
int precision,
int scale)
Returns a JDBC type that might be more useful than Types.OTHER . |
NSArray |
newPrimaryKeys(int count,
EOEntity entity,
JDBCChannel channel)
Generates a batch of new primary keys for entity . |
String |
schemaNameForEntity(EOEntity entity)
Return the schema associated with entity . |
String |
sqlStatementForGettingProcedureNames()
The default implementation of this method returns null to indicate that the JDBC API should be used
for reverse engineering stored procedures. |
String |
sqlStatementForGettingTableNames()
Returns a SQL statement to be used for fetching a list of available tables during reverse engineering. |
String |
storedProcedureCatalogPattern()
The standard reverse engineering implementation for stored procedures calls this method to get the catalog pattern used with the JDBC method getProcedures . |
String |
storedProcedureSchemaPattern()
The standard reverse engineering implementation for stored procedures calls this method to get the schema pattern used with the JDBC method getProcedures . |
void |
updateLOBs(JDBCChannel channel,
JDBCExpression expression,
NSDictionary row,
EOEntity entity)
Update LOBs (BLOBs and CLOBs). |
String |
wildcardPatternForAttributes()
Return the String to use for describing the column pattern in the JDBC getColumns method call. |
String |
wildcardPatternForSchema()
Return the String to use for describing the schema pattern in the JDBC getTables method call. |
String |
wildcardPatternForTables()
Return the String to use for describing the table pattern in the JDBC getTables method call. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public OraclePlugIn(JDBCAdaptor adaptor)
Method Detail |
public void assignTypeForAttribute(EOAttribute attribute)
JDBCPlugIn
assignTypeForAttribute
in class JDBCPlugIn
attribute
- an EOAttributeEOAdaptor.assignExternalTypeForAttribute(com.webobjects.eoaccess.EOAttribute)
,
EOAdaptorChannel.describeResults()
public Properties connectionPropertiesForConnectionDictionary(NSDictionary connectionDictionary)
JDBCPlugIn
connectionPropertiesForConnectionDictionary
in class JDBCPlugIn
JDBCAdaptor.username()
,
JDBCAdaptor.password()
public EOSynchronizationFactory createSynchronizationFactory()
JDBCPlugIn
adaptor()
. The default
EOSynchronizationFactory supports only basic SQL table
generation. Subclasses need to override this method to support
schema synchronization.
createSynchronizationFactory
in class JDBCPlugIn
JDBCPlugIn.synchronizationFactory()
public String databaseProductName()
JDBCPlugIn
databaseProductName
in class JDBCPlugIn
public String defaultDriverName()
JDBCPlugIn
defaultDriverName
in class JDBCPlugIn
public Class defaultExpressionClass()
JDBCPlugIn
defaultExpressionClass
in class JDBCPlugIn
JDBCExpression
,
JDBCAdaptor.defaultExpressionClass()
public Object fetchBLOB(ResultSet rs, int column, EOAttribute attribute, boolean materialize) throws SQLException
JDBCPlugIn
null
.
fetchBLOB
in class JDBCPlugIn
rs
- the current ResultSetcolumn
- the column index corresponding to the BLOBattribute
- the attribute mapped to the BLOBmaterialize
- a boolean that determines if the BLOB should be
fully "materialized" (if true
) or left as a reference
(if false
)
SQLException
JDBCPlugIn.updateLOBs(com.webobjects.jdbcadaptor.JDBCChannel, com.webobjects.jdbcadaptor.JDBCExpression, com.webobjects.foundation.NSDictionary, com.webobjects.eoaccess.EOEntity)
public Object fetchCLOB(ResultSet rs, int column, EOAttribute attribute, boolean materialize) throws SQLException
JDBCPlugIn
null
.
fetchCLOB
in class JDBCPlugIn
rs
- the current ResultSetcolumn
- the column index corresponding to the CLOBattribute
- the attribute mapped to the CLOBmaterialize
- a boolean that determines if the CLOB should be
fully "materialized" (if true
) or left as a reference
(if false
)
SQLException
JDBCPlugIn.updateLOBs(com.webobjects.jdbcadaptor.JDBCChannel, com.webobjects.jdbcadaptor.JDBCExpression, com.webobjects.foundation.NSDictionary, com.webobjects.eoaccess.EOEntity)
public NSDictionary jdbcInfo()
JDBCPlugIn
jdbcInfo
in class JDBCPlugIn
public int jdbcTypeForUnknownExternalType(String externalType, int precision, int scale)
JDBCPlugIn
Types.OTHER
. Some JDBC drivers return
Types.OTHER
for external types that actually match
better to a well known type. This method provides the plugin a
chance to substitute a better JDBC type when reverse
engineering. The default implementation specifically
recognizes BLOB
and CLOB
external
types as mapping to Types.BLOB
and
Types.CLOB
. If no better type is known, the
method should return Types.OTHER
.
jdbcTypeForUnknownExternalType
in class JDBCPlugIn
public NSArray newPrimaryKeys(int count, EOEntity entity, JDBCChannel channel)
JDBCPlugIn
entity
. It should return an NSArray of
NSDictionary where each dictionary corresponds to a unique
primary key value. The count of the NSArray should match
count
. The JDBChannel channel
is
already open and ready to use. If the primary key contains
multiple attributes or is not of kind number, then the default
implementation returns null. The default implementation uses a
table named according to primaryKeyTableName
containing the table name and the last primary key inserted in
this table. If the row for a table name is not present, then it
is automatically created. If the
primaryKeyTableName
table does not exists then it
is automatically created. Subclasses should override the
default implementation if they want to provide a more efficient
mechanism for generating primary keys.
newPrimaryKeys
in class JDBCPlugIn
count
- the batch sizeentity
- the entity requesting primary keyschannel
- an open JDBCChannelJDBCPlugIn.primaryKeyTableName()
,
EOEntity.primaryKeyAttributes()
public String schemaNameForEntity(EOEntity entity)
JDBCPlugIn
entity
. This is
used as an argument to the JDBC method getColumns
when reverse engineering. The default implementation gets the
schema from the externalName
of the entity
.
schemaNameForEntity
in class JDBCPlugIn
EOEntity.externalName()
public String sqlStatementForGettingProcedureNames()
JDBCPlugIn
null
to indicate that the JDBC API should be used
for reverse engineering stored procedures. Subclasses can
implement a private scheme for reverse engineering stored
procedures by returning a SQL statement to be used for fetching
stored procedures names. The SQL statement should return a
result set with one column named 'name'.
sqlStatementForGettingProcedureNames
in class JDBCPlugIn
public String sqlStatementForGettingTableNames()
JDBCPlugIn
getTables
. Subclasses might override
this method.
sqlStatementForGettingTableNames
in class JDBCPlugIn
public String storedProcedureCatalogPattern()
JDBCPlugIn
getProcedures
. The default
implementation returns null
.
storedProcedureCatalogPattern
in class JDBCPlugIn
JDBCPlugIn.storedProcedureSchemaPattern()
public String storedProcedureSchemaPattern()
JDBCPlugIn
getProcedures
. The default
implementation returns null
.
storedProcedureSchemaPattern
in class JDBCPlugIn
JDBCPlugIn.storedProcedureCatalogPattern()
public void updateLOBs(JDBCChannel channel, JDBCExpression expression, NSDictionary row, EOEntity entity)
JDBCPlugIn
updateLOBs
in class JDBCPlugIn
channel
- an open JDBCChannelexpression
- the JDBCExpression used to perform the insert or updaterow
- an NSDictionary of the row values used in the insert or updateentity
- the entity of the row that was inserted or updatedJDBCPlugIn.fetchBLOB(java.sql.ResultSet, int, com.webobjects.eoaccess.EOAttribute, boolean)
,
JDBCPlugIn.fetchCLOB(java.sql.ResultSet, int, com.webobjects.eoaccess.EOAttribute, boolean)
public String wildcardPatternForAttributes()
JDBCPlugIn
getColumns
method call. This is used
for reverse engineering. The default implementation returns
"%".
wildcardPatternForAttributes
in class JDBCPlugIn
public String wildcardPatternForSchema()
JDBCPlugIn
getTables
method call. This is used
for reverse engineering. The default implementation returns
null.
wildcardPatternForSchema
in class JDBCPlugIn
public String wildcardPatternForTables()
JDBCPlugIn
getTables
method call. This is used
for reverse engineering. The default implementation returns
"%".
wildcardPatternForTables
in class JDBCPlugIn
|
Last updated Thu Oct 21 15:04:16 PDT 2004. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |