WebObjects 5.4.2

com.webobjects.jdbcadaptor
Class OpenBasePlugIn.OpenBaseSynchronizationFactory

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

public static class OpenBasePlugIn.OpenBaseSynchronizationFactory
extends EOSchemaSynchronizationFactory


Nested Class Summary
static class OpenBasePlugIn.OpenBaseSynchronizationFactory.OpenBaseColumnDescription
           
static class OpenBasePlugIn.OpenBaseSynchronizationFactory.OpenBaseIndexDescription
           
static class OpenBasePlugIn.OpenBaseSynchronizationFactory.OpenBaseTableDescription
           
 
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
OpenBasePlugIn.OpenBaseSynchronizationFactory(EOAdaptor adaptor)
           
 
Method Summary
protected  NSArray createIndexExpressionsForEntity(EOEntity entity, EOEntityIndex anIndex, EOEntity masterEntity)
           
protected  String createIndexStatementForEntity(EOEntity entity, String indexName, String tableName, NSArray attributeList)
           
protected  String createIndexStatementForEntity(EOEntity entity, String indexName, String tableName, String attributeName)
           
protected  String dropIndexStatementForEntity(EOEntity entity, String indexName, String tableName)
           
 NSArray dropPrimaryKeySupportStatementsForEntityGroup(NSArray entityGroup)
          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 foreignKeyConstraintStatementsForRelationship(EORelationship relationship)
          Returns an array of EOSQLExpression objects that define the SQL statements necessary to create foreign key constraints for relationship.
protected  String formatColumnName(String name)
          Formats the column name for insertion in a select statement.
protected  String formatTableName(String name)
          Formats the table name for insertion in a select statement.
 boolean isColumnTypeEquivalentToColumnType(EOSchemaSynchronization.ColumnTypes candidate, EOSchemaSynchronization.ColumnTypes columnType, EOSchemaGenerationOptions options)
          Returns true if the name, precision, width, and scale of candidate are identical to the name, precision, width, and scale of columnType, false otherwise.
protected  boolean isSinglePrimaryKeyAttribute(EOAttribute attribute)
           
 EOSchemaSynchronizationColumnChanges objectStoreChangesFromAttributeToAttribute(EOAttribute schemaAttribute, EOAttribute modelAttribute)
          Compares schemaAttribute with modelAttribute and returns a change dictionary of state that is different between the the two.
 NSArray primaryKeyConstraintStatementsForEntityGroup(NSArray entityGroup)
          Returns an array of EOSQLExpression objects that define the SQL necessary to create the primary key constraints for entityGroup.
 NSArray primaryKeySupportStatementsForEntityGroup(NSArray entityGroup)
          The default implementation returns null.
 NSArray primaryKeySupportStatementsForEntityGroups(NSArray entityGroups)
          Returns an array of EOSQLExpression objects that define the SQL necessary to create the primary key generation support for all the entities in each of the the entity groups in entityGroups.
 NSArray statementsToDeleteColumnNamed(String columnName, String tableName, EOSchemaGenerationOptions options)
          The default implementation returns null.
 NSArray statementsToDropForeignKeyConstraintsOnEntityGroups(NSArray entityGroups, EOSchemaSynchronizationModelChanges changes, EOSchemaGenerationOptions options)
          Returns an array of EOSQLExpressions to drop foreign key constraints for the table corresponding to entityGroups, which is an array containing arrays of EOEntity objects with the same external name.
 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 statementsToImplementPrimaryKeyConstraintsOnEntityGroups(NSArray entityGroups, EOSchemaSynchronizationModelChanges changes, EOSchemaGenerationOptions options)
          Returns an array of EOSQLExpressions to implement 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.
 NSArray statementsToRenameTableNamed(String tableName, String newName, EOSchemaGenerationOptions options)
          Returns an array of EOSQLExpressions to rename in place the the table indentifed by tableName to newName.
 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, createDatabaseStatementsForConnectionDictionary, createIndexStatementsForEntityGroup, createIndexStatementsForEntityGroups, createTableStatementsForEntityGroup, createTableStatementsForEntityGroups, dropDatabaseStatementsForConnectionDictionary, dropIndexExpressionsForEntity, dropIndexStatementsForEntityGroup, dropIndexStatementsForEntityGroups, dropTableStatementsForEntityGroup, dropTableStatementsForEntityGroups, indexDefinitionForEntity, indexDescriptionForTableAndModel, isCaseSensitive, logicalErrorsInChangeDictionaryForModelOptions, newChanges, newOptions, phraseCastingColumnNamed, primaryKeyConstraintStatementsForEntityGroups, primaryKeyEntityGroupsForEntities, schemaCreationScriptForEntities, schemaCreationStatementsForEntities, schemaGenerationDelegate, schemaSynchronizationDelegate, setSchemaGenerationDelegate, setSchemaSynchronizationDelegate, statementsToConvertColumnType, statementsToCopyTableNamed, statementsToDropForeignKeyConstraintsOnEntityGroup, statementsToDropPrimaryKeySupportForEntityGroups, statementsToImplementForeignKeyConstraintsOnEntityGroups, statementsToImplementPrimaryKeySupportForEntityGroups, statementsToInsertColumnForAttribute, statementsToUpdateObjectStoreForEntityGroups, statementsToUpdateObjectStoreForModel, tableEntityGroupsForEntities
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenBasePlugIn.OpenBaseSynchronizationFactory

public OpenBasePlugIn.OpenBaseSynchronizationFactory(EOAdaptor adaptor)
Method Detail

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

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)

primaryKeySupportStatementsForEntityGroups

public NSArray primaryKeySupportStatementsForEntityGroups(NSArray entityGroups)
Description copied from class: EOSchemaSynchronizationFactory
Returns an array of EOSQLExpression objects that define the SQL necessary to create 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 'Create Primary Key Support' option is unavailable."

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

Specified by:
primaryKeySupportStatementsForEntityGroups in interface EOSchemaGeneration
Overrides:
primaryKeySupportStatementsForEntityGroups 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 generation support for entityGroups, or an empty array, or an array containing a string message that the option is not supported.
See Also:
EOSchemaSynchronizationFactory.primaryKeySupportStatementsForEntityGroup( NSArray entityGroup), EOAdaptorChannel.primaryKeyForNewRowWithEntity( EOEntity entity), EOEntity.externalName()

formatTableName

protected String formatTableName(String name)
Description copied from class: EOSchemaSynchronizationFactory
Formats the table name for insertion in a select statement. The default is to return the table name without quotes. Override this in the plugin for custom behavior.

Overrides:
formatTableName in class EOSchemaSynchronizationFactory
Parameters:
name - table name
Returns:
formated name

formatColumnName

protected String formatColumnName(String name)
Description copied from class: EOSchemaSynchronizationFactory
Formats the column name for insertion in a select statement. The default is to return the column name without quotes. Override this in the plugin for custom behavior.

Overrides:
formatColumnName in class EOSchemaSynchronizationFactory
Parameters:
name - column name
Returns:
formated name

isSinglePrimaryKeyAttribute

protected boolean isSinglePrimaryKeyAttribute(EOAttribute attribute)

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

isColumnTypeEquivalentToColumnType

public boolean isColumnTypeEquivalentToColumnType(EOSchemaSynchronization.ColumnTypes candidate,
                                                  EOSchemaSynchronization.ColumnTypes columnType,
                                                  EOSchemaGenerationOptions options)
Description copied from class: EOSchemaSynchronizationFactory
Returns true if the name, precision, width, and scale of candidate are identical to the name, precision, width, and scale of columnType, false otherwise. If the columns are equivalent, the candidate column can be copied to columnType without casting.

Specified by:
isColumnTypeEquivalentToColumnType in interface EOSchemaSynchronization
Overrides:
isColumnTypeEquivalentToColumnType in class EOSchemaSynchronizationFactory
Parameters:
candidate - A column to potentially copy.
columnType - A column into which to copy candidate.
options - Unused.
Returns:
true if the specified attributes of candidate are identical to the corresponding attributes of columnType.

statementsToDropForeignKeyConstraintsOnEntityGroups

public NSArray statementsToDropForeignKeyConstraintsOnEntityGroups(NSArray entityGroups,
                                                                   EOSchemaSynchronizationModelChanges changes,
                                                                   EOSchemaGenerationOptions options)
Description copied from interface: EOSchemaSynchronization
Returns an array of EOSQLExpressions to drop foreign 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:
statementsToDropForeignKeyConstraintsOnEntityGroups in interface EOSchemaSynchronization
Overrides:
statementsToDropForeignKeyConstraintsOnEntityGroups 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 foreign key constraints for the table corresponding to entityGroups.
See Also:
EOSchemaSynchronization

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

statementsToImplementPrimaryKeyConstraintsOnEntityGroups

public NSArray statementsToImplementPrimaryKeyConstraintsOnEntityGroups(NSArray entityGroups,
                                                                        EOSchemaSynchronizationModelChanges changes,
                                                                        EOSchemaGenerationOptions options)
Description copied from interface: EOSchemaSynchronization
Returns an array of EOSQLExpressions to implement 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:
statementsToImplementPrimaryKeyConstraintsOnEntityGroups in interface EOSchemaSynchronization
Overrides:
statementsToImplementPrimaryKeyConstraintsOnEntityGroups 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 implement primary key constraints for the table corresponding to entityGroups.
See Also:
EOSchemaSynchronization

createIndexExpressionsForEntity

protected NSArray createIndexExpressionsForEntity(EOEntity entity,
                                                  EOEntityIndex anIndex,
                                                  EOEntity masterEntity)
Overrides:
createIndexExpressionsForEntity in class EOSchemaSynchronizationFactory
Returns:

createIndexStatementForEntity

protected String createIndexStatementForEntity(EOEntity entity,
                                               String indexName,
                                               String tableName,
                                               NSArray attributeList)
Overrides:
createIndexStatementForEntity in class EOSchemaSynchronizationFactory
Returns:

createIndexStatementForEntity

protected String createIndexStatementForEntity(EOEntity entity,
                                               String indexName,
                                               String tableName,
                                               String attributeName)

dropIndexStatementForEntity

protected String dropIndexStatementForEntity(EOEntity entity,
                                             String indexName,
                                             String tableName)
Overrides:
dropIndexStatementForEntity in class EOSchemaSynchronizationFactory
Returns:

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.

statementsToRenameTableNamed

public NSArray statementsToRenameTableNamed(String tableName,
                                            String newName,
                                            EOSchemaGenerationOptions options)
Description copied from interface: EOSchemaSynchronization
Returns an array of EOSQLExpressions to rename in place the the table indentifed by tableName to newName. options is a dictionary describing the aspects of the schema for which to create SQL statements.

Specified by:
statementsToRenameTableNamed in interface EOSchemaSynchronization
Overrides:
statementsToRenameTableNamed in class EOSchemaSynchronizationFactory
Parameters:
tableName - The name of a table to be renamed.
newName - The new name for the specified table.
options - A dictionary describing the aspects of the schema for which to create SQL statements.
Returns:
An array of the EOSQLExpressions to rename in place the specified table.

statementsToDeleteColumnNamed

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

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

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.

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.

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.

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.

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:

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

dropPrimaryKeySupportStatementsForEntityGroup

public NSArray dropPrimaryKeySupportStatementsForEntityGroup(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 drop the primary key generation support for entityGroup.

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

objectStoreChangesFromAttributeToAttribute

public EOSchemaSynchronizationColumnChanges objectStoreChangesFromAttributeToAttribute(EOAttribute schemaAttribute,
                                                                                       EOAttribute modelAttribute)
Description copied from interface: EOSchemaSynchronization
Compares schemaAttribute with modelAttribute and returns a change dictionary of state that is different between the the two. The possible keys in the change dictionary are:

The values in the change dictionary are the corresponding values of schemaAttribute, that is, the values stored in the database.

Specified by:
objectStoreChangesFromAttributeToAttribute in interface EOSchemaSynchronization
Overrides:
objectStoreChangesFromAttributeToAttribute in class EOSchemaSynchronizationFactory
Parameters:
schemaAttribute - An EOAttribute as represented in the database.
modelAttribute - An EOAttribute as represented in the EOModel.
Returns:
A change dictionary for the difference in state between schemaAttribute and modelAttribute.

Last updated June 2008

Copyright © 2000-2008 Apple Inc.