WebObjects 5.4.2

com.webobjects.jdbcadaptor
Class FrontbasePlugIn.FrontbaseSynchronizationFactory

java.lang.Object
  extended by com.webobjects.eoaccess.synchronization.EOSchemaSynchronizationFactory
      extended by com.webobjects.jdbcadaptor.FrontbasePlugIn.FrontbaseSynchronizationFactory
All Implemented Interfaces:
EOSchemaGeneration, EOSchemaSynchronization
Enclosing class:
FrontbasePlugIn

public static class FrontbasePlugIn.FrontbaseSynchronizationFactory
extends EOSchemaSynchronizationFactory


Nested Class Summary
static class FrontbasePlugIn.FrontbaseSynchronizationFactory.FrontbaseColumnDescription
           
static class FrontbasePlugIn.FrontbaseSynchronizationFactory.FrontbaseIndexDescription
           
static class FrontbasePlugIn.FrontbaseSynchronizationFactory.FrontbaseTableDescription
           
 
Nested classes/interfaces inherited from class com.webobjects.eoaccess.synchronization.EOSchemaSynchronizationFactory
EOSchemaSynchronizationFactory.Delegate
 
Nested classes/interfaces inherited from interface com.webobjects.eoaccess.synchronization.EOSchemaSynchronization
EOSchemaSynchronization.ColumnTypes
 
Constructor Summary
FrontbasePlugIn.FrontbaseSynchronizationFactory(EOAdaptor eoadaptor)
           
 
Method Summary
 StringBuffer addCreateClauseForAttribute(EOAttribute eoattribute)
           
static boolean boolValueForKeyDefault(NSDictionary nsdictionary, String s, boolean flag)
           
 String columnTypeStringForAttribute(EOAttribute eoattribute)
           
 NSArray createDatabaseStatementsForConnectionDictionary(NSDictionary connectionDictionary, NSDictionary administrativeConnectionDictionary)
          The default implementation returns null.
 NSArray createTableStatementsForEntityGroup(NSArray entityGroup)
          Returns an array of EOSQLExpression objects that define the SQL necessary to create a table for entityGroup.
 NSArray createTableStatementsForEntityGroups(NSArray entityGroups)
          Returns an array of EOSQLExpression objects that define the SQL necessary to create the tables for each of the entity groups in entityGroups.
 NSArray dropDatabaseStatementsForConnectionDictionary(NSDictionary connectionDictionary, NSDictionary administrativeConnectionDictionary)
          The default implementation returns null.
 NSArray dropPrimaryKeySupportStatementsForEntityGroups(NSArray entityGroups)
          Returns an array of EOSQLExpression objects that define the SQL necessary to drop the primary key generation support for all the entities in each of the the entity groups in entityGroups.
 NSArray dropTableStatementsForEntityGroup(NSArray entityGroup)
          Returns an array of EOSQLExpression objects that define the SQL necessary to drop the table identified by entityGroup.
 NSDictionary fetchTableDescriptionForModel(String tableName, EOModel eomodel)
           
 NSArray foreignKeyConstraintStatementsForRelationship(EORelationship relationship)
          Returns an array of EOSQLExpression objects that define the SQL statements necessary to create foreign key constraints for relationship.
 NSArray primaryKeyConstraintStatementsForEntityGroup(NSArray entityGroup)
          Returns an array of EOSQLExpression objects that define the SQL necessary to create the primary key constraints for entityGroup.
 NSArray primaryKeyConstraintStatementsForEntityGroups(NSArray entityGroups)
          Returns an array of EOSQLExpression objects that define the SQL necessary to create the primary key constraints for the entities specified in entityGroups.
 NSArray primaryKeySupportStatementsForEntityGroup(NSArray entityGroup)
          The default implementation returns null.
 NSArray schemaCreationStatementsForEntities(NSArray entities, EOSchemaGenerationOptions options)
          Returns an array of EOSQLExpressions suitable to create the schema based on options for the EOEntity objects in allEntities.
 NSArray statementsToConvertColumnType(String columnName, String tableName, EOSchemaSynchronization.ColumnTypes type, EOSchemaSynchronization.ColumnTypes newType, EOSchemaGenerationOptions options)
          The default implementation returns null.
 NSArray statementsToDropPrimaryKeyConstraintsOnEntityGroups(NSArray entityGroups, EOSchemaSynchronizationModelChanges changes, EOSchemaGenerationOptions options)
          Returns an array of EOSQLExpressions to drop primary key constraints for the table corresponding to entityGroups, which is an array containing arrays of EOEntity objects with the same external name.
 NSArray statementsToModifyColumnNullRule(String columnName, String tableName, boolean allowsNull, EOSchemaGenerationOptions options)
          Returns null by default.
 NSArray statementsToRenameColumnNamed(String columnName, String tableName, String newName, EOSchemaGenerationOptions options)
          The default implementation returns null.
protected  String statementToCreateDataTypeClause(EOSchemaSynchronization.ColumnTypes columntypes)
           
 boolean supportsDirectColumnCoercion()
          The default implementation returns false.
 boolean supportsDirectColumnDeletion()
          The default implementation returns false.
 boolean supportsDirectColumnInsertion()
          The default implementation returns false.
 boolean supportsDirectColumnNullRuleModification()
          The default implementation returns false.
 boolean supportsDirectColumnRenaming()
          The default implementation returns false.
 boolean supportsSchemaSynchronization()
          The default implementation returns false.
 boolean supportsTableDescriptionIntrospection()
          The default implementation returns false.
 EOSchemaTableDescription tableDescriptionForModel(String tableName, EOModel eomodel)
          Return a Table Description object that describe the database schema.
 
Methods inherited from class com.webobjects.eoaccess.synchronization.EOSchemaSynchronizationFactory
adaptor, appendExpressionToScript, attributeInEntityWithColumnName, columnDescriptionForTableAndModel, createIndexExpressionsForEntity, createIndexStatementForEntity, createIndexStatementsForEntityGroup, createIndexStatementsForEntityGroups, dropIndexExpressionsForEntity, dropIndexStatementForEntity, dropIndexStatementsForEntityGroup, dropIndexStatementsForEntityGroups, dropPrimaryKeySupportStatementsForEntityGroup, dropTableStatementsForEntityGroups, formatColumnName, formatTableName, indexDefinitionForEntity, indexDescriptionForTableAndModel, isCaseSensitive, isColumnTypeEquivalentToColumnType, logicalErrorsInChangeDictionaryForModelOptions, newChanges, newOptions, objectStoreChangesFromAttributeToAttribute, phraseCastingColumnNamed, primaryKeyEntityGroupsForEntities, primaryKeySupportStatementsForEntityGroups, schemaCreationScriptForEntities, schemaGenerationDelegate, schemaSynchronizationDelegate, setSchemaGenerationDelegate, setSchemaSynchronizationDelegate, statementsToCopyTableNamed, statementsToDeleteColumnNamed, statementsToDropForeignKeyConstraintsOnEntityGroup, statementsToDropForeignKeyConstraintsOnEntityGroups, statementsToDropPrimaryKeySupportForEntityGroups, statementsToImplementForeignKeyConstraintsOnEntityGroups, statementsToImplementPrimaryKeyConstraintsOnEntityGroups, statementsToImplementPrimaryKeySupportForEntityGroups, statementsToInsertColumnForAttribute, statementsToRenameTableNamed, statementsToUpdateObjectStoreForEntityGroups, statementsToUpdateObjectStoreForModel, tableEntityGroupsForEntities
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FrontbasePlugIn.FrontbaseSynchronizationFactory

public FrontbasePlugIn.FrontbaseSynchronizationFactory(EOAdaptor eoadaptor)
Method Detail

supportsSchemaSynchronization

public boolean supportsSchemaSynchronization()
Description copied from class: EOSchemaSynchronizationFactory
The default implementation returns false. Can be overridden by subclasses to return true if the adaptor can update the database schema to reflect changes in an EOModel.

Specified by:
supportsSchemaSynchronization in interface EOSchemaSynchronization
Overrides:
supportsSchemaSynchronization in class EOSchemaSynchronizationFactory
Returns:
true if the adaptor can update the database schema.

boolValueForKeyDefault

public static boolean boolValueForKeyDefault(NSDictionary nsdictionary,
                                             String s,
                                             boolean flag)

schemaCreationStatementsForEntities

public NSArray schemaCreationStatementsForEntities(NSArray entities,
                                                   EOSchemaGenerationOptions options)
Description copied from class: EOSchemaSynchronizationFactory
Returns an array of EOSQLExpressions suitable to create the schema based on options for the EOEntity objects in allEntities. Returns an empty array if either allEntities or options is null or empty.

options is a dictionary whose keys possible aspects of a schema and whose respective values of "YES" or "NO" determine whether that schema option is enabled for a particular invocation. The possible option keys are:



Used in conjunction with appendExpressionToScript and schemaCreationScriptForEntities to build up the SQL script to generate the specified schema for allEntities.

Specified by:
schemaCreationStatementsForEntities in interface EOSchemaGeneration
Overrides:
schemaCreationStatementsForEntities in class EOSchemaSynchronizationFactory
Parameters:
entities - An array of EOEntity objects.
options - A dictionary describing the schema options for which to generate SQL statements.
Returns:
An array of EOSQLExpressions that define the SQL statements necessary to create a schema for allEntities with the given options.
See Also:
#schemaCreationScriptForEntities( NSArray allEntities, NSDictionary options), EOSchemaSynchronizationFactory.appendExpressionToScript( EOSQLExpression expression, StringBuffer script)

dropPrimaryKeySupportStatementsForEntityGroups

public NSArray dropPrimaryKeySupportStatementsForEntityGroups(NSArray entityGroups)
Description copied from class: EOSchemaSynchronizationFactory
Returns an array of EOSQLExpression objects that define the SQL necessary to drop the primary key generation support for all the entities in each of the the entity groups in entityGroups. Returns an empty array if entityGroups is null or empty. If primary key generation is not supported, returns an array that contains the string "The 'Drop Primary Key Support' option is unavailable."

This method invokes dropPrimaryKeySupportStatementsForEntityGroup for each entity group in entityGroups and returns an array of all the resulting EOSQLExpressions. Since the default implementation of dropPrimaryKeySupportStatementsForEntityGroup returns null, this method returns the "not supported" value (see above) by default, but a subclass need only override dropPrimaryKeySupportStatementsForEntityGroup in order to enable this method as well.

Specified by:
dropPrimaryKeySupportStatementsForEntityGroups in interface EOSchemaGeneration
Overrides:
dropPrimaryKeySupportStatementsForEntityGroups in class EOSchemaSynchronizationFactory
Parameters:
entityGroups - An NSArray of entity groups, which are arrays of EOEntity objects that have the same external name.
Returns:
An array of EOSQLExpressions that define the SQL necessary to drop primary key generation support for entityGroups, or an empty array, or an array containing a string message that the option is not supported.
See Also:
EOSchemaSynchronizationFactory.dropPrimaryKeySupportStatementsForEntityGroup( NSArray entityGroup), #schemaCreationStatementsForEntities( NSArray allEntities, NSDictionary options), EOAdaptorChannel.primaryKeyForNewRowWithEntity( EOEntity entity), EOEntity.externalName()

dropDatabaseStatementsForConnectionDictionary

public NSArray dropDatabaseStatementsForConnectionDictionary(NSDictionary connectionDictionary,
                                                             NSDictionary administrativeConnectionDictionary)
Description copied from class: EOSchemaSynchronizationFactory
The default implementation returns null. Can be overridden by subclasses to generate and return an array of EOSQLExpressions defining the SQL statements to drop a database or user that is accessed by the provided connectionDictionary and administrativeConnectionDictionary.

Specified by:
dropDatabaseStatementsForConnectionDictionary in interface EOSchemaGeneration
Overrides:
dropDatabaseStatementsForConnectionDictionary in class EOSchemaSynchronizationFactory
Parameters:
connectionDictionary - A dictionary of information needed by the adaptor to connect to the database server.
administrativeConnectionDictionary - A dictionary of administrative login information for the database server.
Returns:
null by default.
See Also:
EOSchemaSynchronizationFactory.createDatabaseStatementsForConnectionDictionary( NSDictionary connectionDictionary, NSDictionary administrativeConnectionDictionary)

createDatabaseStatementsForConnectionDictionary

public NSArray createDatabaseStatementsForConnectionDictionary(NSDictionary connectionDictionary,
                                                               NSDictionary administrativeConnectionDictionary)
Description copied from class: EOSchemaSynchronizationFactory
The default implementation returns null. Can be overridden by subclasses to generate and return an array of EOSQLExpressions defining the SQL statements to create a database or user that can be accessed by the provided connectionDictionary and administrativeConnectionDictionary.

Specified by:
createDatabaseStatementsForConnectionDictionary in interface EOSchemaGeneration
Overrides:
createDatabaseStatementsForConnectionDictionary in class EOSchemaSynchronizationFactory
Parameters:
connectionDictionary - A dictionary of information needed by the adaptor to connect to the database server.
administrativeConnectionDictionary - A dictionary of administrative login information for the database server.
Returns:
null by default.
See Also:
EOSchemaSynchronizationFactory.dropDatabaseStatementsForConnectionDictionary( NSDictionary connectionDictionary, NSDictionary administrativeConnectionDictionary)

dropTableStatementsForEntityGroup

public NSArray dropTableStatementsForEntityGroup(NSArray entityGroup)
Description copied from class: EOSchemaSynchronizationFactory
Returns an array of EOSQLExpression objects that define the SQL necessary to drop the table identified by entityGroup. Returns an empty array if entityGroup is null. The drop statement generated by this method should be sufficient to remove the table created by createTableStatementsForEntityGroup's statements.

This method creates a statement of the form:

             
                        DROP TABLE TABLE_NAME
 
 

where TABLE_NAME is the external name of the first entity in entityGroup.

If the database server's drop semantics are different, a subclass should override this method.

Specified by:
dropTableStatementsForEntityGroup in interface EOSchemaGeneration
Overrides:
dropTableStatementsForEntityGroup in class EOSchemaSynchronizationFactory
Parameters:
entityGroup - An array of EOEntity objects that have the same external name.
Returns:
An array of EOSQLExpressions that define the SQL necessary to drop tables for the entities in entityGroup, or an empty array.
See Also:
EOSchemaSynchronizationFactory.createTableStatementsForEntityGroup( NSArray entityGroup), EOEntity.externalName()

primaryKeySupportStatementsForEntityGroup

public NSArray primaryKeySupportStatementsForEntityGroup(NSArray entityGroup)
Description copied from class: EOSchemaSynchronizationFactory
The default implementation returns null. Can be overridden by subclasses to return an array of EOSQLExpression objects that define the SQL necessary to create the primary key generation support for entityGroup.

Specified by:
primaryKeySupportStatementsForEntityGroup in interface EOSchemaGeneration
Overrides:
primaryKeySupportStatementsForEntityGroup in class EOSchemaSynchronizationFactory
Parameters:
entityGroup - An array of EOEntity objects that have the same external name.
Returns:
null by default.
See Also:
EOSchemaSynchronizationFactory.dropPrimaryKeySupportStatementsForEntityGroup( NSArray entityGroup), EOAdaptorChannel.primaryKeyForNewRowWithEntity( EOEntity entity), EOEntity.externalName()

foreignKeyConstraintStatementsForRelationship

public NSArray foreignKeyConstraintStatementsForRelationship(EORelationship relationship)
Description copied from interface: EOSchemaGeneration
Returns an array of EOSQLExpression objects that define the SQL statements necessary to create foreign key constraints for relationship. Returns an empty array if unable to generate foreign key constraints for relationship

Specified by:
foreignKeyConstraintStatementsForRelationship in interface EOSchemaGeneration
Overrides:
foreignKeyConstraintStatementsForRelationship in class EOSchemaSynchronizationFactory
Parameters:
relationship - An EORelationship.
Returns:
An array of EOSQLExpressions to create the foreign key constraints for relationship, or an empty array.
See Also:
EOSQLExpression, EOSchemaSynchronizationFactory.foreignKeyConstraintStatementsForRelationship(EORelationship relationship), #schemaCreationStatementsForEntities( NSArray allEntities, NSDictionary options)

createTableStatementsForEntityGroups

public NSArray createTableStatementsForEntityGroups(NSArray entityGroups)
Description copied from class: EOSchemaSynchronizationFactory
Returns an array of EOSQLExpression objects that define the SQL necessary to create the tables for each of the entity groups in entityGroups. Returns an empty array if entityGroups is empty.

This method invokes createTableStatementsForEntityGroup for each entity group in entityGroups and returns an array of all the resulting EOSQLExpressions.

Specified by:
createTableStatementsForEntityGroups in interface EOSchemaGeneration
Overrides:
createTableStatementsForEntityGroups in class EOSchemaSynchronizationFactory
Parameters:
entityGroups - An NSArray of entity groups, which are arrays of EOEntity objects that have the same external name.
Returns:
An array of EOSQLExpressions that define the SQL necessary to create tables for the entity groups in entityGroups.
See Also:
EOSchemaSynchronizationFactory.createTableStatementsForEntityGroup( NSArray entityGroup), #schemaCreationStatementsForEntities( NSArray allEntities, NSDictionary options), EOEntity.externalName()

createTableStatementsForEntityGroup

public NSArray createTableStatementsForEntityGroup(NSArray entityGroup)
Description copied from class: EOSchemaSynchronizationFactory
Returns an array of EOSQLExpression objects that define the SQL necessary to create a table for entityGroup. Returns an empty array if entityGroup is null or empty.

EOSynchronizationFactory's implementation does the following:

The following is an example of a CREATE TABLE statement produced by this method:

 
                         create table EMPLOYEE (
                           EMP_ID      int not null,
                           DEPT_ID     int null,
                           LAST_NAME   varchar(40) not null,
                           PHONE       char(12) null,
                           HIRE_DATE   date null,
                           SALARY      number(7, 2) null
                         )
 
 

If a database server's table creation semantics are different, a subclass should override this method or one or more of the following methods as appropriate:

Specified by:
createTableStatementsForEntityGroup in interface EOSchemaGeneration
Overrides:
createTableStatementsForEntityGroup in class EOSchemaSynchronizationFactory
Parameters:
entityGroup - An array of EOEntity objects that have the same external name.
Returns:
An array of EOSQLExpressions that define the SQL necessary to create tables for the entities in entityGroup, or an empty array.
See Also:
EOSchemaSynchronizationFactory.dropTableStatementsForEntityGroup(NSArray entityGroup), EOSchemaSynchronizationFactory.dropTableStatementsForEntityGroup(NSArray entityGroup), EOSQLExpression.addCreateClauseForAttribute( EOAttribute anEOAttribute), EOSQLExpression.columnTypeStringForAttribute( EOAttribute anEOAttribute), (boolean aBoolean), EOEntity.externalName()

addCreateClauseForAttribute

public StringBuffer addCreateClauseForAttribute(EOAttribute eoattribute)

columnTypeStringForAttribute

public String columnTypeStringForAttribute(EOAttribute eoattribute)

primaryKeyConstraintStatementsForEntityGroups

public NSArray primaryKeyConstraintStatementsForEntityGroups(NSArray entityGroups)
Description copied from class: EOSchemaSynchronizationFactory
Returns an array of EOSQLExpression objects that define the SQL necessary to create the primary key constraints for the entities specified in entityGroups. Returns an empty array if entityGroups is null or empty.

This method invokes EOSQLExpression's implementation of primaryKeyConstraintStatementsForEntityGroup for each entity group in entityGroups and returns an array of all the resulting EOSQLExpressions.

Specified by:
primaryKeyConstraintStatementsForEntityGroups in interface EOSchemaGeneration
Overrides:
primaryKeyConstraintStatementsForEntityGroups in class EOSchemaSynchronizationFactory
Parameters:
entityGroups - An NSArray of entity groups, which are arrays of EOEntity objects that have the same external name.
Returns:
An array of EOSQLExpressions that define the SQL necessary to create primary key constraints for entityGroups, or an empty array.
See Also:
EOSchemaSynchronizationFactory.primaryKeyConstraintStatementsForEntityGroup( NSArray entityGroup), EOEntity.externalName()

primaryKeyConstraintStatementsForEntityGroup

public NSArray primaryKeyConstraintStatementsForEntityGroup(NSArray entityGroup)
Description copied from class: EOSchemaSynchronizationFactory
Returns an array of EOSQLExpression objects that define the SQL necessary to create the primary key constraints for entityGroup. Returns an empty array if any of the primary key attributes in entityGroup don't have a column name or if entityGroup is null.

This method creates a statement of the form:

     
                        ALTER TABLE TABLE_NAME ADD PRIMARY KEY
                             (PRIMARY_KEY_COLUMN_NAMES)
 

where TABLE_NAME is the external name for the first entity in entityGroup and PRIMARY_KEY_COLUMN_NAMES is a comma-separated list of the column names of the first entity's primary key attributes. If the subclass's database server's primary key constraint semantics are different, the subclass should override this method.

Specified by:
primaryKeyConstraintStatementsForEntityGroup in interface EOSchemaGeneration
Overrides:
primaryKeyConstraintStatementsForEntityGroup in class EOSchemaSynchronizationFactory
Parameters:
entityGroup - An array of EOEntity objects that have the same external name.
Returns:
An array of EOSQLExpressions that define the SQL necessary to create primary key constraints for entityGroup, or an empty array.
See Also:
EOAttribute.columnName(), EOEntity.externalName(), EOEntity.primaryKeyAttributes()

supportsTableDescriptionIntrospection

public boolean supportsTableDescriptionIntrospection()
Description copied from class: EOSchemaSynchronizationFactory
The default implementation returns false. Can be overridden by subclasses to return true if the adaptor can describe the database schema.

Specified by:
supportsTableDescriptionIntrospection in interface EOSchemaSynchronization
Overrides:
supportsTableDescriptionIntrospection in class EOSchemaSynchronizationFactory
Returns:
true if the adaptor can describe the database schema.

tableDescriptionForModel

public EOSchemaTableDescription tableDescriptionForModel(String tableName,
                                                         EOModel eomodel)
Description copied from interface: EOSchemaSynchronization
Return a Table Description object that describe the database schema.

Specified by:
tableDescriptionForModel in interface EOSchemaSynchronization
Overrides:
tableDescriptionForModel in class EOSchemaSynchronizationFactory
Parameters:
tableName - table name to describe
eomodel - model to introscpect
Returns:

fetchTableDescriptionForModel

public NSDictionary fetchTableDescriptionForModel(String tableName,
                                                  EOModel eomodel)

statementsToDropPrimaryKeyConstraintsOnEntityGroups

public NSArray statementsToDropPrimaryKeyConstraintsOnEntityGroups(NSArray entityGroups,
                                                                   EOSchemaSynchronizationModelChanges changes,
                                                                   EOSchemaGenerationOptions options)
Description copied from interface: EOSchemaSynchronization
Returns an array of EOSQLExpressions to drop primary key constraints for the table corresponding to entityGroups, which is an array containing arrays of EOEntity objects with the same external name. The changes dictionary identifies the changes to make to the database schema. The options dictionary describes the aspects of the schema for which to create SQL statements.

Specified by:
statementsToDropPrimaryKeyConstraintsOnEntityGroups in interface EOSchemaSynchronization
Overrides:
statementsToDropPrimaryKeyConstraintsOnEntityGroups in class EOSchemaSynchronizationFactory
Parameters:
entityGroups - An array containing arrays of EOEntity objects with the same external name.
changes - A dictionary of changes to make to the database schema.
options - A dictionary describing the aspects of the schema for which to create SQL statements.
Returns:
An array of the EOSQLExpressions to drop primary key constraints for the table corresponding to entityGroups.
See Also:
EOSchemaSynchronization

supportsDirectColumnCoercion

public boolean supportsDirectColumnCoercion()
Description copied from class: EOSchemaSynchronizationFactory
The default implementation returns false. Can be overridden by subclasses to return true if the adaptor can change the type of an existing column in place.

Specified by:
supportsDirectColumnCoercion in interface EOSchemaSynchronization
Overrides:
supportsDirectColumnCoercion in class EOSchemaSynchronizationFactory
Returns:
true if the adaptor can change the type of an existing column in place.

supportsDirectColumnDeletion

public boolean supportsDirectColumnDeletion()
Description copied from class: EOSchemaSynchronizationFactory
The default implementation returns false. Can be overridden by subclasses to return true if the adaptor can delete columns.

Specified by:
supportsDirectColumnDeletion in interface EOSchemaSynchronization
Overrides:
supportsDirectColumnDeletion in class EOSchemaSynchronizationFactory
Returns:
true if the adaptor can delete columns.

supportsDirectColumnInsertion

public boolean supportsDirectColumnInsertion()
Description copied from class: EOSchemaSynchronizationFactory
The default implementation returns false. Can be overridden by subclasses to return true if the adaptor can add columns to a table.

Specified by:
supportsDirectColumnInsertion in interface EOSchemaSynchronization
Overrides:
supportsDirectColumnInsertion in class EOSchemaSynchronizationFactory
Returns:
true if the adaptor can add columns to a table.

supportsDirectColumnRenaming

public boolean supportsDirectColumnRenaming()
Description copied from class: EOSchemaSynchronizationFactory
The default implementation returns false. Can be overridden by subclasses to return true if the adaptor can rename columns in a table.

Specified by:
supportsDirectColumnRenaming in interface EOSchemaSynchronization
Overrides:
supportsDirectColumnRenaming in class EOSchemaSynchronizationFactory
Returns:
true if the adaptor can rename columns in a table.

supportsDirectColumnNullRuleModification

public boolean supportsDirectColumnNullRuleModification()
Description copied from class: EOSchemaSynchronizationFactory
The default implementation returns false. Can be overridden by subclasses to return true if the adaptor can modify the null rule of an existing column in place.

Specified by:
supportsDirectColumnNullRuleModification in interface EOSchemaSynchronization
Overrides:
supportsDirectColumnNullRuleModification in class EOSchemaSynchronizationFactory
Returns:
true if the adaptor can modify the nullrule of an existing column in place.

statementsToModifyColumnNullRule

public NSArray statementsToModifyColumnNullRule(String columnName,
                                                String tableName,
                                                boolean allowsNull,
                                                EOSchemaGenerationOptions options)
Description copied from class: EOSchemaSynchronizationFactory
Returns null by default. Can be overridden by subclasses to return an array of EOSQLExpressions to modify in place of the column identified by columnName in the table identified by tableName to either allow or not allow NULL values as specified by allowsNull. The options dictionary describes the aspects of the schema for which to create SQL statements.

Specified by:
statementsToModifyColumnNullRule in interface EOSchemaSynchronization
Overrides:
statementsToModifyColumnNullRule in class EOSchemaSynchronizationFactory
Parameters:
columnName - The name of a column to be modified.
tableName - The name of the table containing the specified column.
allowsNull - A Boolean value to determine whether to allow or not allow NULL values in the specified column.
options - A dictionary describing the aspects of the schema for which to create SQL statements.
Returns:
empty array by default.
See Also:
EOSchemaSynchronization

statementsToRenameColumnNamed

public NSArray statementsToRenameColumnNamed(String columnName,
                                             String tableName,
                                             String newName,
                                             EOSchemaGenerationOptions options)
Description copied from class: EOSchemaSynchronizationFactory
The default implementation returns null. Can be overridden by subclasses to return an array of EOSQLExpressions to rename the column indentifed by columnName in the table identified by tableName to newName. options is a dictionary describing the aspects of the schema for which to create SQL statements.

Specified by:
statementsToRenameColumnNamed in interface EOSchemaSynchronization
Overrides:
statementsToRenameColumnNamed in class EOSchemaSynchronizationFactory
Parameters:
columnName - The name of a column to be renamed.
tableName - The name of the table containing the specified column.
newName - The new name for the specified column.
options - A dictionary describing the aspects of the schema for which to create SQL statements.
Returns:
empty array by default.

statementsToConvertColumnType

public NSArray statementsToConvertColumnType(String columnName,
                                             String tableName,
                                             EOSchemaSynchronization.ColumnTypes type,
                                             EOSchemaSynchronization.ColumnTypes newType,
                                             EOSchemaGenerationOptions options)
Description copied from class: EOSchemaSynchronizationFactory
The default implementation returns null. Can be overridden by subclasses to return an array of EOSQLExpressions to convert in place of the type of the column indentifed by columnName in the table identified by tableName from the current type to the type specified by newType. options is a dictionary describing the aspects of the schema for which to create SQL statements.

Specified by:
statementsToConvertColumnType in interface EOSchemaSynchronization
Overrides:
statementsToConvertColumnType in class EOSchemaSynchronizationFactory
Parameters:
columnName - The name of a column to be modified.
tableName - The name of the table containing the specified column.
type - The current type of the specified column.
newType - The type to which to convert the specified column.
options - A dictionary describing the aspects of the schema for which to create SQL statements.
Returns:
empty array by default.

statementToCreateDataTypeClause

protected String statementToCreateDataTypeClause(EOSchemaSynchronization.ColumnTypes columntypes)

Last updated June 2008

Copyright © 2000-2008 Apple Inc.