WebObjects 5.2

com.webobjects.jdbcadaptor
Class OraclePlugIn

java.lang.Object
  |
  +--com.webobjects.jdbcadaptor.JDBCPlugIn
        |
        +--com.webobjects.jdbcadaptor.OraclePlugIn

public class OraclePlugIn
extends JDBCPlugIn


Inner Class Summary
static class OraclePlugIn.OracleExpression
           
static class OraclePlugIn.OracleSynchronizationFactory
           
 
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 com.webobjects.jdbcadaptor.JDBCPlugIn
adaptor, canDescribeStoredProcedure, connectionURL, createAttributeForRow, createExpressionFactory, databaseInformation, expressionFactory, isPseudoColumnName, newPrimaryKeySelectString, plugInNameForURL, plugInValueForValue, primaryKeyTableName, removePlugInNameForSubprotocol, setPlugInNameForSubprotocol, sqlStatementForTableNamed, storedProcedureNamed, synchronizationFactory, tableTypes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OraclePlugIn

public OraclePlugIn(JDBCAdaptor adaptor)
Method Detail

assignTypeForAttribute

public void assignTypeForAttribute(EOAttribute attribute)
Description copied from class: JDBCPlugIn
The adaptor invokes this method to allow the JDBCPlugIn to customize the newly created attribute. The default implementation does nothing.
Overrides:
assignTypeForAttribute in class JDBCPlugIn
Following copied from class: com.webobjects.jdbcadaptor.JDBCPlugIn
Parameters:
an - EOAttribute
See Also:
EOAdaptor.assignExternalTypeForAttribute(com.webobjects.eoaccess.EOAttribute), EOAdaptorChannel.describeResults()

connectionPropertiesForConnectionDictionary

public Properties connectionPropertiesForConnectionDictionary(NSDictionary connectionDictionary)
Description copied from class: JDBCPlugIn
Returns a Properties object that should be used for setting up a connection environment. The default implementation asks the adaptor for the username and password.
Overrides:
connectionPropertiesForConnectionDictionary in class JDBCPlugIn
Following copied from class: com.webobjects.jdbcadaptor.JDBCPlugIn
Returns:
Properties for the connection environment
See Also:
JDBCAdaptor.username(), JDBCAdaptor.password()

createSynchronizationFactory

public EOSynchronizationFactory createSynchronizationFactory()
Description copied from class: JDBCPlugIn
Creates a new EOSynchronizationFactory using the plugin's response to adaptor(). The default EOSynchronizationFactory supports only basic SQL table generation. Subclasses need to override this method to support schema synchronization.
Overrides:
createSynchronizationFactory in class JDBCPlugIn
Following copied from class: com.webobjects.jdbcadaptor.JDBCPlugIn
Returns:
a JDBCExpressionFactory
See Also:
JDBCPlugIn.synchronizationFactory()

databaseProductName

public String databaseProductName()
Description copied from class: JDBCPlugIn
Returns a string identifying the database. Subclasses should override.
Overrides:
databaseProductName in class JDBCPlugIn
Following copied from class: com.webobjects.jdbcadaptor.JDBCPlugIn
Returns:
a String identifying the database

defaultDriverName

public String defaultDriverName()
Description copied from class: JDBCPlugIn
Returns a fully qualified name of the JDBC driver class that this plugin prefers to use. The adaptor will attempt to load this class when making a connection. Subclasses should override.
Overrides:
defaultDriverName in class JDBCPlugIn
Following copied from class: com.webobjects.jdbcadaptor.JDBCPlugIn
Returns:
JDBC driver class name

defaultExpressionClass

public Class defaultExpressionClass()
Description copied from class: JDBCPlugIn
Returns the Java Class to use as the expression class. The default is JDBCExpression. Subclasses will typically override to use their own subclass of JDBCExpression.
Overrides:
defaultExpressionClass in class JDBCPlugIn
Following copied from class: com.webobjects.jdbcadaptor.JDBCPlugIn
Returns:
a Java Class (subclass of JDBCExpression)
See Also:
JDBCExpression, JDBCAdaptor.defaultExpressionClass()

fetchBLOB

public Object fetchBLOB(ResultSet rs,
                        int column,
                        EOAttribute attribute,
                        boolean materialize)
                 throws SQLException
Description copied from class: JDBCPlugIn
Fetch a BLOB. This supports a database-specific way of fetching a BLOB so plugin subclasses need to override the default, which simply returns null.
Overrides:
fetchBLOB in class JDBCPlugIn
Following copied from class: com.webobjects.jdbcadaptor.JDBCPlugIn
Parameters:
rs - the current ResultSet
column - the column index corresponding to the BLOB
attribute - the attribute mapped to the BLOB
materialize - a boolean that determines if the BLOB should be fully "materialized" (if true) or left as a reference (if false)
See Also:
JDBCPlugIn.updateLOBs(com.webobjects.jdbcadaptor.JDBCChannel, com.webobjects.jdbcadaptor.JDBCExpression, com.webobjects.foundation.NSDictionary, com.webobjects.eoaccess.EOEntity)

fetchCLOB

public Object fetchCLOB(ResultSet rs,
                        int column,
                        EOAttribute attribute,
                        boolean materialize)
                 throws SQLException
Description copied from class: JDBCPlugIn
Fetch a CLOB. This supports a database-specific way of fetching a CLOB so plugin subclasses need to override the default, which simply returns null.
Overrides:
fetchCLOB in class JDBCPlugIn
Following copied from class: com.webobjects.jdbcadaptor.JDBCPlugIn
Parameters:
rs - the current ResultSet
column - the column index corresponding to the CLOB
attribute - the attribute mapped to the CLOB
materialize - a boolean that determines if the CLOB should be fully "materialized" (if true) or left as a reference (if false)
See Also:
JDBCPlugIn.updateLOBs(com.webobjects.jdbcadaptor.JDBCChannel, com.webobjects.jdbcadaptor.JDBCExpression, com.webobjects.foundation.NSDictionary, com.webobjects.eoaccess.EOEntity)

jdbcInfo

public NSDictionary jdbcInfo()
Description copied from class: JDBCPlugIn
Returns database-specific information about the JDBC data source. Subclasses may want to return a modified copy of the dictionary returned by calling super.
Overrides:
jdbcInfo in class JDBCPlugIn
Following copied from class: com.webobjects.jdbcadaptor.JDBCPlugIn
Returns:
an NSDictionary describing database-specific information about the JDBC data source

jdbcTypeForUnknownExternalType

public int jdbcTypeForUnknownExternalType(String externalType,
                                          int precision,
                                          int scale)
Description copied from class: JDBCPlugIn
Returns a JDBC type that might be more useful than 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.
Overrides:
jdbcTypeForUnknownExternalType in class JDBCPlugIn
Following copied from class: com.webobjects.jdbcadaptor.JDBCPlugIn
Returns:
a java.sql.Types constant

newPrimaryKeys

public NSArray newPrimaryKeys(int count,
                              EOEntity entity,
                              JDBCChannel channel)
Description copied from class: JDBCPlugIn
Generates a batch of new primary keys for 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.
Overrides:
newPrimaryKeys in class JDBCPlugIn
Following copied from class: com.webobjects.jdbcadaptor.JDBCPlugIn
Parameters:
count - the batch size
entity - the entity requesting primary keys
channel - an open JDBCChannel
See Also:
JDBCPlugIn.primaryKeyTableName(), EOEntity.primaryKeyAttributes()

schemaNameForEntity

public String schemaNameForEntity(EOEntity entity)
Description copied from class: JDBCPlugIn
Return the schema associated with 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.
Overrides:
schemaNameForEntity in class JDBCPlugIn
Following copied from class: com.webobjects.jdbcadaptor.JDBCPlugIn
Returns:
a schema String
See Also:
EOEntity.externalName()

sqlStatementForGettingProcedureNames

public String sqlStatementForGettingProcedureNames()
Description copied from class: JDBCPlugIn
The default implementation of this method returns 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'.
Overrides:
sqlStatementForGettingProcedureNames in class JDBCPlugIn

sqlStatementForGettingTableNames

public String sqlStatementForGettingTableNames()
Description copied from class: JDBCPlugIn
Returns a SQL statement to be used for fetching a list of available tables during reverse engineering. The result set should have a single column, the table name. The default implementation returns null, which tells the adaptor to use the standard JDBC method getTables. Subclasses might override this method.
Overrides:
sqlStatementForGettingTableNames in class JDBCPlugIn
Following copied from class: com.webobjects.jdbcadaptor.JDBCPlugIn
Returns:
a SQL statement for fetching table names

storedProcedureCatalogPattern

public String storedProcedureCatalogPattern()
Description copied from class: JDBCPlugIn
The standard reverse engineering implementation for stored procedures calls this method to get the catalog pattern used with the JDBC method getProcedures. The default implementation returns null.
Overrides:
storedProcedureCatalogPattern in class JDBCPlugIn
Following copied from class: com.webobjects.jdbcadaptor.JDBCPlugIn
See Also:
JDBCPlugIn.storedProcedureSchemaPattern()

storedProcedureSchemaPattern

public String storedProcedureSchemaPattern()
Description copied from class: JDBCPlugIn
The standard reverse engineering implementation for stored procedures calls this method to get the schema pattern used with the JDBC method getProcedures. The default implementation returns null.
Overrides:
storedProcedureSchemaPattern in class JDBCPlugIn
Following copied from class: com.webobjects.jdbcadaptor.JDBCPlugIn
See Also:
JDBCPlugIn.storedProcedureCatalogPattern()

updateLOBs

public void updateLOBs(JDBCChannel channel,
                       JDBCExpression expression,
                       NSDictionary row,
                       EOEntity entity)
Description copied from class: JDBCPlugIn
Update LOBs (BLOBs and CLOBs). This supports a database-specific way of updating LOBs so plugin subclasses need to override the default, which does nothing. This method is called after a new row is inserted or after an existing row is updated. The plugin's JDBCExpression subclass will typically have to keep some extra bookkeeping information in order to implement this functionality.
Overrides:
updateLOBs in class JDBCPlugIn
Following copied from class: com.webobjects.jdbcadaptor.JDBCPlugIn
Parameters:
channel - an open JDBCChannel
expr - the JDBCExpression used to perform the insert or update
row - an NSDictionary of the row values used in the insert or update
entity - the entity of the row that was inserted or updated
See Also:
JDBCPlugIn.fetchBLOB(java.sql.ResultSet, int, com.webobjects.eoaccess.EOAttribute, boolean), JDBCPlugIn.fetchCLOB(java.sql.ResultSet, int, com.webobjects.eoaccess.EOAttribute, boolean)

wildcardPatternForAttributes

public String wildcardPatternForAttributes()
Description copied from class: JDBCPlugIn
Return the String to use for describing the column pattern in the JDBC getColumns method call. This is used for reverse engineering. The default implementation returns "%".
Overrides:
wildcardPatternForAttributes in class JDBCPlugIn
Following copied from class: com.webobjects.jdbcadaptor.JDBCPlugIn
Returns:
a wildcard pattern string

wildcardPatternForSchema

public String wildcardPatternForSchema()
Description copied from class: JDBCPlugIn
Return the String to use for describing the schema pattern in the JDBC getTables method call. This is used for reverse engineering. The default implementation returns null.
Overrides:
wildcardPatternForSchema in class JDBCPlugIn
Following copied from class: com.webobjects.jdbcadaptor.JDBCPlugIn
Returns:
a wildcard pattern string

wildcardPatternForTables

public String wildcardPatternForTables()
Description copied from class: JDBCPlugIn
Return the String to use for describing the table pattern in the JDBC getTables method call. This is used for reverse engineering. The default implementation returns "%".
Overrides:
wildcardPatternForTables in class JDBCPlugIn
Following copied from class: com.webobjects.jdbcadaptor.JDBCPlugIn
Returns:
a wildcard pattern string

Last updated Fri Feb 21 13:15:00 PST 2003.

Copyright © 2003 Apple Computer, Inc.