WebObjects 5.4

com.webobjects.jdbcadaptor
Class FrontbasePlugIn

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

public class FrontbasePlugIn
extends JDBCPlugIn

This is the wo5 java runtime plugin for FrontBase.


Nested Class Summary
static class FrontbasePlugIn.FrontbaseExpression
           
static class FrontbasePlugIn.FrontbaseSynchronizationFactory
           
 
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
FrontbasePlugIn(JDBCAdaptor jdbcadaptor)
           
 
Method Summary
 boolean canDescribeStoredProcedure(String s)
          Returns true if the plugin has a private way of describing the stored procedure named spName when reverse engineering.
 Properties connectionPropertiesForConnectionDictionary(NSDictionary connectionDictionary)
          Returns a Properties object that should be used for setting up a connection environment.
 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.
 Object fetchBLOB(ResultSet resultset, int i, EOAttribute attribute, boolean flag)
          Fetch a BLOB.
 Object fetchCLOB(ResultSet resultset, int i, EOAttribute attribute, boolean flag)
          Fetch a CLOB.
static String getPlugInVersion()
           
protected static int internalTypeForExternal(String externalType)
           
 NSDictionary<String,Object> jdbcInfo()
          Returns database-specific information about the JDBC data source.
 String name()
          Returns the plugin's name.
 NSArray<NSDictionary<String,Object>> newPrimaryKeys(int rows, EOEntity eoentity, JDBCChannel jdbcchannel)
          Generates a batch of new primary keys for entity.
protected static String quoteTableName(String s)
           
 String schemaNameForEntity(EOEntity eoentity)
          Return the schema associated with entity.
 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<String,Object> dictionary, EOEntity entity)
          Update LOBs (BLOBs and CLOBs).
 String wildcardPatternForSchema()
          Return the String to use for describing the schema pattern in the JDBC getTables method call.
 
Methods inherited from class com.webobjects.jdbcadaptor.JDBCPlugIn
adaptor, assignTypeForAttribute, connectionURL, createAttributeForRow, createExpressionFactory, createSynchronizationFactory, databaseInformation, expressionFactory, isDroppedConnectionException, isPseudoColumnName, jdbcTypeForUnknownExternalType, newPrimaryKeySelectString, plugInNameForURL, plugInValueForValue, primaryKeyLockString, primaryKeyTableCreateString, primaryKeyTableName, removePlugInNameForSubprotocol, schemaSynchronizationFactory, setPlugInNameForSubprotocol, sqlStatementForGettingProcedureNames, sqlStatementForGettingTableNames, sqlStatementForTableNamed, storedProcedureCatalogPattern, storedProcedureNamed, synchronizationFactory, tableTypes, wildcardPatternForAttributes, wildcardPatternForTables
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FrontbasePlugIn

public FrontbasePlugIn(JDBCAdaptor jdbcadaptor)
Method Detail

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.

getPlugInVersion

public static String getPlugInVersion()

canDescribeStoredProcedure

public boolean canDescribeStoredProcedure(String s)
Description copied from class: JDBCPlugIn
Returns true if the plugin has a private way of describing the stored procedure named spName when reverse engineering. The default implementation returns false indicating that the adaptor should use the normal JDBC API to reverse engineer the the stored procedure.

Overrides:
canDescribeStoredProcedure in class JDBCPlugIn
Parameters:
s - the name of a stored procedure

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()

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

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
Returns:
a wildcard pattern string

schemaNameForEntity

public String schemaNameForEntity(EOEntity eoentity)
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
Returns:
a schema String
See Also:
EOEntity#externalName

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
See Also:
JDBCPlugIn.storedProcedureCatalogPattern()

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
Returns:
Properties for the connection environment
See Also:
JDBCAdaptor#username, JDBCAdaptor#password

jdbcInfo

public NSDictionary<String,Object> 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

updateLOBs

public void updateLOBs(JDBCChannel channel,
                       JDBCExpression expression,
                       NSDictionary<String,Object> dictionary,
                       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
Parameters:
channel - an open JDBCChannel
expression - the JDBCExpression used to perform the insert or update
dictionary - 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)

fetchBLOB

public Object fetchBLOB(ResultSet resultset,
                        int i,
                        EOAttribute attribute,
                        boolean flag)
                 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
Parameters:
resultset - the current ResultSet
i - the column index corresponding to the BLOB
attribute - the attribute mapped to the BLOB
flag - a boolean that determines if the BLOB should be fully "materialized" (if true) or left as a reference (if false)
Throws:
SQLException
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 resultset,
                        int i,
                        EOAttribute attribute,
                        boolean flag)
                 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
Parameters:
resultset - the current ResultSet
i - the column index corresponding to the CLOB
attribute - the attribute mapped to the CLOB
flag - a boolean that determines if the CLOB should be fully "materialized" (if true) or left as a reference (if false)
Throws:
SQLException
See Also:
JDBCPlugIn.updateLOBs(com.webobjects.jdbcadaptor.JDBCChannel, com.webobjects.jdbcadaptor.JDBCExpression, com.webobjects.foundation.NSDictionary, com.webobjects.eoaccess.EOEntity)

newPrimaryKeys

public NSArray<NSDictionary<String,Object>> newPrimaryKeys(int rows,
                                                           EOEntity eoentity,
                                                           JDBCChannel jdbcchannel)
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:
rows - the batch size
eoentity - the entity requesting primary keys
jdbcchannel - an open JDBCChannel
See Also:
JDBCPlugIn.primaryKeyTableName(), EOEntity#primaryKeyAttributes

quoteTableName

protected static String quoteTableName(String s)

internalTypeForExternal

protected static int internalTypeForExternal(String externalType)

Last updated Tuesday, October 9, 2007 08:58 PDT

Copyright © 2000-2007 Apple Inc.