WebObjects 5.4.2

com.webobjects.jdbcadaptor
Class OpenBasePlugIn

java.lang.Object
  extended by com.webobjects.jdbcadaptor.JDBCPlugIn
      extended by com.webobjects.jdbcadaptor.OpenBasePlugIn

public class OpenBasePlugIn
extends JDBCPlugIn


Nested Class Summary
static class OpenBasePlugIn.OpenBaseExpression
           
static class OpenBasePlugIn.OpenBaseSynchronizationFactory
           
 
Nested classes/interfaces inherited from class com.webobjects.jdbcadaptor.JDBCPlugIn
JDBCPlugIn.LobEntry
 
Field Summary
 
Fields inherited from class com.webobjects.jdbcadaptor.JDBCPlugIn
DefaultPlugInClassName, DefaultPlugInSuffix
 
Constructor Summary
OpenBasePlugIn(JDBCAdaptor adaptor)
           
 
Method Summary
 String connectionURL()
          Returns the JDBC URL to use for connecting to the database.
 EOSchemaSynchronizationFactory createSchemaSynchronizationFactory()
          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.
 boolean isPseudoColumnName(String columnName)
          Determines if the column is a "pseudo" column.
 NSDictionary jdbcInfo()
          Returns database-specific information about the JDBC data source.
 String name()
          Returns the plugin's name.
 NSArray newPrimaryKeys(int count, EOEntity entity, JDBCChannel adaptorChannel)
          Generates a batch of new primary keys for entity.
 
Methods inherited from class com.webobjects.jdbcadaptor.JDBCPlugIn
adaptor, assignTypeForAttribute, canDescribeStoredProcedure, connectionPropertiesForConnectionDictionary, createAttributeForRow, createExpressionFactory, createSynchronizationFactory, databaseInformation, expressionFactory, fetchBLOB, fetchCLOB, isDroppedConnectionException, jdbcTypeForUnknownExternalType, newPrimaryKeySelectString, plugInNameForURL, plugInValueForValue, primaryKeyLockString, primaryKeyTableCreateString, primaryKeyTableName, removePlugInNameForSubprotocol, schemaNameForEntity, schemaSynchronizationFactory, setPlugInNameForSubprotocol, sqlStatementForGettingProcedureNames, sqlStatementForGettingTableNames, sqlStatementForTableNamed, storedProcedureCatalogPattern, storedProcedureNamed, storedProcedureSchemaPattern, synchronizationFactory, tableTypes, updateLOBs, wildcardPatternForAttributes, wildcardPatternForSchema, wildcardPatternForTables
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenBasePlugIn

public OpenBasePlugIn(JDBCAdaptor adaptor)
Method Detail

newPrimaryKeys

public NSArray newPrimaryKeys(int count,
                              EOEntity entity,
                              JDBCChannel adaptorChannel)
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
Parameters:
count - the batch size
entity - the entity requesting primary keys
adaptorChannel - an open JDBCChannel
See Also:
JDBCPlugIn.primaryKeyTableName(), EOEntity.primaryKeyAttributes()

name

public String name()
Description copied from class: JDBCPlugIn
Returns the plugin's name. Subclasses of JDBCPlugIn need to override this method.

Overrides:
name in class JDBCPlugIn
Returns:
The name of the receiver.

connectionURL

public String connectionURL()
Description copied from class: JDBCPlugIn
Returns the JDBC URL to use for connecting to the database. The default implementation gets the URL from the adaptor.

Overrides:
connectionURL in class JDBCPlugIn
Returns:
a JDBC URL
See Also:
JDBCAdaptor.connectionDictionaryURL()

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
Returns:
JDBC driver class name

databaseProductName

public String databaseProductName()
Description copied from class: JDBCPlugIn
Returns a string identifying the database. Subclasses should override.

Overrides:
databaseProductName in class JDBCPlugIn
Returns:
a String identifying the database

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
Returns:
a Java Class (subclass of JDBCExpression)
See Also:
JDBCExpression, JDBCAdaptor.defaultExpressionClass()

createSchemaSynchronizationFactory

public EOSchemaSynchronizationFactory createSchemaSynchronizationFactory()
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:
createSchemaSynchronizationFactory in class JDBCPlugIn
Returns:
a JDBCExpressionFactory
See Also:
JDBCPlugIn.synchronizationFactory()

isPseudoColumnName

public boolean isPseudoColumnName(String columnName)
Description copied from class: JDBCPlugIn
Determines if the column is a "pseudo" column. A pseudo column is one that was not part of the CREATE TABLE statement, but was created automatically by the database. These columns usually should not be considered for reverse engineering.

Overrides:
isPseudoColumnName in class JDBCPlugIn
Returns:
true if the column should not be reverse engineered; false otherwise

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
Returns:
an NSDictionary describing database-specific information about the JDBC data source

Last updated June 2008

Copyright © 2000-2008 Apple Inc.