public class DB2SynchronizationFactory
extends com.webobjects.eoaccess.EOSynchronizationFactory
implements com.webobjects.eoaccess.EOSchemaGeneration, com.webobjects.eoaccess.EOSchemaSynchronization
com.webobjects.eoaccess.synchronization.EOSchemaSynchronizationFactory.Delegate
Modifier and Type | Field and Description |
---|---|
static String |
USING_KEY |
_adaptor
CreateDatabaseKey, CreateIndexesKey, CreatePrimaryKeySupportKey, CreateTablesKey, DropDatabaseKey, DropIndexesKey, DropPrimaryKeySupportKey, DropTablesKey, ForeignKeyConstraintsKey, PrimaryKeyConstraintsKey
AllowsNullKey, ColumnNameKey, ExternalNameKey, ExternalTypeKey, NameKey, PrecisionKey, RelationshipsKey, ScaleKey, SchemaSynchronizationForeignKeyConstraintsKey, SchemaSynchronizationPrimaryKeyConstraintsKey, SchemaSynchronizationPrimaryKeySupportKey, WidthKey
Constructor and Description |
---|
DB2SynchronizationFactory(com.webobjects.eoaccess.EOAdaptor adaptor) |
Modifier and Type | Method and Description |
---|---|
NSArray |
_foreignKeyConstraintStatementsForEntityGroup(NSArray group) |
protected boolean |
_shouldGenerateForeignKeyConstraints(com.webobjects.eoaccess.EORelationship rel) |
String |
columnTypeStringForAttribute(EOAttribute attribute) |
NSArray |
createTableStatementsForEntityGroup(NSArray entityGroup)
Quote table name if necessary
|
NSArray |
dropPrimaryKeySupportStatementsForEntityGroup(NSArray entityGroup)
Generates the DB2-specific SQL statements to drop the primary key
support.
|
NSArray |
dropTableStatementsForEntityGroup(NSArray entityGroup)
Generates the DB2-specific SQL statements to drop tables.
|
static boolean |
entityUsesSeparateTable(com.webobjects.eoaccess.EOEntity entity) |
protected String |
externalNameForEntityWithoutSchema(com.webobjects.eoaccess.EOEntity entity) |
NSArray |
foreignKeyConstraintStatementsForRelationship(com.webobjects.eoaccess.EORelationship relationship)
Generates the DB2-specific SQL statements to enforce the foreign
key constraints for
relationship . |
protected String |
formatColumnName(String name) |
protected String |
formatTableName(String name) |
protected boolean |
isInEntityModeler(com.webobjects.eoaccess.EOModel model)
Returns true if Entity Modeler is running the operation on this model.
|
NSArray |
primaryKeyConstraintStatementsForEntityGroup(NSArray entityGroup)
Generates the DB2-specific SQL statements to enforce primary key
constraints.
|
NSArray |
primaryKeySupportStatementsForEntityGroup(NSArray entityGroup)
Generates the DB2-specific SQL statements to create the primary
key support.
|
static String |
replaceStringByStringInString(String old,
String newString,
String buffer)
Replaces a given string by another string in a string.
|
String |
schemaCreationScriptForEntities(NSArray allEntities,
NSDictionary options) |
NSArray |
schemaCreationStatementsForEntities(NSArray allEntities,
NSDictionary options) |
NSArray |
statementsToConvertColumnType(String columnName,
String tableName,
com.webobjects.eoaccess.synchronization.EOSchemaSynchronization.ColumnTypes oldType,
com.webobjects.eoaccess.synchronization.EOSchemaSynchronization.ColumnTypes newType,
NSDictionary options) |
NSArray |
statementsToDeleteColumnNamed(String columnName,
String tableName,
NSDictionary options) |
NSArray |
statementsToInsertColumnForAttribute(EOAttribute attribute,
NSDictionary options) |
NSArray |
statementsToModifyColumnNullRule(String columnName,
String tableName,
boolean allowsNull,
NSDictionary nsdictionary) |
NSArray |
statementsToRenameColumnNamed(String columnName,
String tableName,
String newName,
NSDictionary nsdictionary) |
NSArray |
statementsToRenameTableNamed(String tableName,
String newName,
NSDictionary options) |
isColumnTypeEquivalentToColumnType, phraseCastingColumnNamed, statementsToCopyTableNamed, statementsToDropForeignKeyConstraintsOnEntityGroups, statementsToDropPrimaryKeyConstraintsOnEntityGroups, statementsToDropPrimaryKeySupportForEntityGroups, statementsToImplementForeignKeyConstraintsOnEntityGroups, statementsToImplementPrimaryKeyConstraintsOnEntityGroups, statementsToImplementPrimaryKeySupportForEntityGroups, statementsToUpdateObjectStoreForEntityGroups, statementsToUpdateObjectStoreForModel
_allowsNullForColumnNamed, _alterPhraseCoercingColumnsWithNames, _alterPhraseDeletingColumnsWithNames, _alterPhraseInsertingColumnsWithNames, _alterPhraseInsertionClausePrefixAtIndex, _alterPhraseJoinString, _arePurelyForeignKeyConstraintRelatedChanges, _canConvertColumnOfTypeToTypeOptions, _columnAttributesInEntityGroup, _columnCreationClauseForAttribute, _columnTypeForAttribute, _columnTypeForChangeDictionaryAndAttribute, _columnTypeNamedWithPrecisionScaleAndWidth, _directCoercionsForEntityGroupInTable, _entityGroupInModelForTableNamed, _entityGroupsInModelReferringToTableNamed, _expressionForEntity, _expressionForString, _firstAttributeInEntityGroupWithColumnName, _intForExpressionStringAdaptorChannel, _isPoorlyFormedColumnType, _isSignificantExceptionAtIndexOfSynchronizationStatements, _isTableCopyingRequiredByColumnChangesToEntityGroup, _isTableNamed, _nameInObjectStoreForEntityGroupWithChangeDictionary, _namesOfColumnsCoercedInChangeDictionaryForEntityGroup, _nullCountForColumnNamedInTableNamedBeneathModel, _parameterizedTypes, _prettyDictionary, _primaryKeyEntityGroupsForEntityGroups, _rowCountForTableNamedBeneathModel, _schemaCreationStatementsForEntityGroup, _schemaSynchronizationAdaptor, _schemaSynchronizationAdaptorChannelForModel, _schemaSynchronizationCommentsEnabled, _setSchemaSynchronizationCommentsEnabled, _sqlReplacements, _statementsCommentedWithString, _statementsToCreateTableForEntityGroupOptions, _statementsToDeleteTableNamedOptions, _statementsToDirectlyUpdateObjectStoreForEntityGroup, _statementsToDropPrimaryKeyConstraintsOnTableNamed, _statementsToIndirectlyUpdateObjectStoreForEntityGroupWithChangeDictionaryOptions, _statementsToUpdateObjectStoreForEntityGroup, _tableNameMapInChangeDictionary, _temporaryNameForTableName, adaptor, appendExpressionToScript, attributeInEntityWithColumnName, columnDescriptionForTableAndModel, createDatabaseStatementsForConnectionDictionary, createIndexExpressionsForEntity, createIndexStatementForEntity, createIndexStatementsForEntityGroup, createIndexStatementsForEntityGroups, createTableStatementsForEntityGroups, dropDatabaseStatementsForConnectionDictionary, dropIndexExpressionsForEntity, dropIndexStatementForEntity, dropIndexStatementsForEntityGroup, dropIndexStatementsForEntityGroups, dropPrimaryKeySupportStatementsForEntityGroups, dropTableStatementsForEntityGroups, indexDefinitionForEntity, indexDescriptionForTableAndModel, isCaseSensitive, isColumnTypeEquivalentToColumnType, logicalErrorsInChangeDictionaryForModelOptions, newChanges, newOptions, objectStoreChangesFromAttributeToAttribute, phraseCastingColumnNamed, primaryKeyConstraintStatementsForEntityGroups, primaryKeyEntityGroupsForEntities, primaryKeySupportStatementsForEntityGroups, schemaCreationScriptForEntities, schemaCreationStatementsForEntities, schemaGenerationDelegate, schemaSynchronizationDelegate, setSchemaGenerationDelegate, setSchemaSynchronizationDelegate, statementsToConvertColumnType, statementsToCopyTableNamed, statementsToDeleteColumnNamed, statementsToDropForeignKeyConstraintsOnEntityGroup, statementsToDropForeignKeyConstraintsOnEntityGroups, statementsToDropPrimaryKeyConstraintsOnEntityGroups, statementsToDropPrimaryKeySupportForEntityGroups, statementsToImplementForeignKeyConstraintsOnEntityGroups, statementsToImplementPrimaryKeyConstraintsOnEntityGroups, statementsToImplementPrimaryKeySupportForEntityGroups, statementsToInsertColumnForAttribute, statementsToModifyColumnNullRule, statementsToRenameColumnNamed, statementsToRenameTableNamed, statementsToUpdateObjectStoreForEntityGroups, statementsToUpdateObjectStoreForModel, supportsDirectColumnCoercion, supportsDirectColumnDeletion, supportsDirectColumnInsertion, supportsDirectColumnNullRuleModification, supportsDirectColumnRenaming, supportsSchemaSynchronization, supportsTableDescriptionIntrospection, tableDescriptionForModel, tableEntityGroupsForEntities
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
appendExpressionToScript, createDatabaseStatementsForConnectionDictionary, createIndexStatementsForEntityGroup, createIndexStatementsForEntityGroups, createTableStatementsForEntityGroups, dropDatabaseStatementsForConnectionDictionary, dropIndexStatementsForEntityGroup, dropIndexStatementsForEntityGroups, dropPrimaryKeySupportStatementsForEntityGroups, dropTableStatementsForEntityGroups, newOptions, primaryKeyConstraintStatementsForEntityGroups, primaryKeySupportStatementsForEntityGroups, schemaCreationScriptForEntities, schemaCreationStatementsForEntities, schemaGenerationDelegate, setSchemaGenerationDelegate
isColumnTypeEquivalentToColumnType, phraseCastingColumnNamed, statementsToCopyTableNamed, statementsToDropForeignKeyConstraintsOnEntityGroups, statementsToDropPrimaryKeyConstraintsOnEntityGroups, statementsToDropPrimaryKeySupportForEntityGroups, statementsToImplementForeignKeyConstraintsOnEntityGroups, statementsToImplementPrimaryKeyConstraintsOnEntityGroups, statementsToImplementPrimaryKeySupportForEntityGroups, statementsToUpdateObjectStoreForEntityGroups, statementsToUpdateObjectStoreForModel
columnDescriptionForTableAndModel, indexDescriptionForTableAndModel, isColumnTypeEquivalentToColumnType, newChanges, newOptions, objectStoreChangesFromAttributeToAttribute, phraseCastingColumnNamed, statementsToConvertColumnType, statementsToCopyTableNamed, statementsToDeleteColumnNamed, statementsToDropForeignKeyConstraintsOnEntityGroups, statementsToDropPrimaryKeyConstraintsOnEntityGroups, statementsToDropPrimaryKeySupportForEntityGroups, statementsToImplementForeignKeyConstraintsOnEntityGroups, statementsToImplementPrimaryKeyConstraintsOnEntityGroups, statementsToImplementPrimaryKeySupportForEntityGroups, statementsToInsertColumnForAttribute, statementsToModifyColumnNullRule, statementsToRenameColumnNamed, statementsToRenameTableNamed, statementsToUpdateObjectStoreForEntityGroups, statementsToUpdateObjectStoreForModel, supportsDirectColumnCoercion, supportsDirectColumnDeletion, supportsDirectColumnInsertion, supportsDirectColumnNullRuleModification, supportsDirectColumnRenaming, supportsSchemaSynchronization, supportsTableDescriptionIntrospection, tableDescriptionForModel
public static final String USING_KEY
public DB2SynchronizationFactory(com.webobjects.eoaccess.EOAdaptor adaptor)
protected String formatTableName(String name)
formatTableName
in class com.webobjects.eoaccess.synchronization.EOSchemaSynchronizationFactory
protected String formatColumnName(String name)
formatColumnName
in class com.webobjects.eoaccess.synchronization.EOSchemaSynchronizationFactory
public NSArray _foreignKeyConstraintStatementsForEntityGroup(NSArray group)
_foreignKeyConstraintStatementsForEntityGroup
in class com.webobjects.eoaccess.synchronization.EOSchemaSynchronizationFactory
protected boolean _shouldGenerateForeignKeyConstraints(com.webobjects.eoaccess.EORelationship rel)
public NSArray dropPrimaryKeySupportStatementsForEntityGroup(NSArray entityGroup)
dropPrimaryKeySupportStatementsForEntityGroup
in interface com.webobjects.eoaccess.synchronization.EOSchemaGeneration
dropPrimaryKeySupportStatementsForEntityGroup
in class com.webobjects.eoaccess.synchronization.EOSchemaSynchronizationFactory
entityGroup
- an array of EOEntity
objectspublic NSArray dropTableStatementsForEntityGroup(NSArray entityGroup)
dropTableStatementsForEntityGroup
in interface com.webobjects.eoaccess.synchronization.EOSchemaGeneration
dropTableStatementsForEntityGroup
in class com.webobjects.eoaccess.synchronization.EOSchemaSynchronizationFactory
entityGroup
- an array of EOEntity
objectspublic NSArray foreignKeyConstraintStatementsForRelationship(com.webobjects.eoaccess.EORelationship relationship)
relationship
.foreignKeyConstraintStatementsForRelationship
in interface com.webobjects.eoaccess.synchronization.EOSchemaGeneration
foreignKeyConstraintStatementsForRelationship
in class com.webobjects.eoaccess.synchronization.EOSchemaSynchronizationFactory
relationship
- the relationship, as represented by EOFprotected String externalNameForEntityWithoutSchema(com.webobjects.eoaccess.EOEntity entity)
public NSArray primaryKeyConstraintStatementsForEntityGroup(NSArray entityGroup)
primaryKeyConstraintStatementsForEntityGroup
in interface com.webobjects.eoaccess.synchronization.EOSchemaGeneration
primaryKeyConstraintStatementsForEntityGroup
in class com.webobjects.eoaccess.synchronization.EOSchemaSynchronizationFactory
entityGroup
- an array of EOEntity
objectsprotected boolean isInEntityModeler(com.webobjects.eoaccess.EOModel model)
model
- the model to checkpublic NSArray primaryKeySupportStatementsForEntityGroup(NSArray entityGroup)
primaryKeySupportStatementsForEntityGroup
in interface com.webobjects.eoaccess.synchronization.EOSchemaGeneration
primaryKeySupportStatementsForEntityGroup
in class com.webobjects.eoaccess.synchronization.EOSchemaSynchronizationFactory
entityGroup
- an array of EOEntity
objectspublic static boolean entityUsesSeparateTable(com.webobjects.eoaccess.EOEntity entity)
public NSArray createTableStatementsForEntityGroup(NSArray entityGroup)
createTableStatementsForEntityGroup
in interface com.webobjects.eoaccess.synchronization.EOSchemaGeneration
createTableStatementsForEntityGroup
in class com.webobjects.eoaccess.synchronization.EOSchemaSynchronizationFactory
public static String replaceStringByStringInString(String old, String newString, String buffer)
old
- string to be replacednewString
- to be insertedbuffer
- string to have the replacement done on itpublic String columnTypeStringForAttribute(EOAttribute attribute)
public NSArray statementsToModifyColumnNullRule(String columnName, String tableName, boolean allowsNull, NSDictionary nsdictionary)
statementsToModifyColumnNullRule
in class com.webobjects.eoaccess.EOSynchronizationFactory
public NSArray statementsToConvertColumnType(String columnName, String tableName, com.webobjects.eoaccess.synchronization.EOSchemaSynchronization.ColumnTypes oldType, com.webobjects.eoaccess.synchronization.EOSchemaSynchronization.ColumnTypes newType, NSDictionary options)
statementsToConvertColumnType
in class com.webobjects.eoaccess.EOSynchronizationFactory
public NSArray statementsToRenameColumnNamed(String columnName, String tableName, String newName, NSDictionary nsdictionary)
statementsToRenameColumnNamed
in class com.webobjects.eoaccess.EOSynchronizationFactory
public NSArray statementsToInsertColumnForAttribute(EOAttribute attribute, NSDictionary options)
statementsToInsertColumnForAttribute
in class com.webobjects.eoaccess.EOSynchronizationFactory
public NSArray statementsToRenameTableNamed(String tableName, String newName, NSDictionary options)
statementsToRenameTableNamed
in class com.webobjects.eoaccess.EOSynchronizationFactory
public NSArray statementsToDeleteColumnNamed(String columnName, String tableName, NSDictionary options)
statementsToDeleteColumnNamed
in class com.webobjects.eoaccess.EOSynchronizationFactory
public String schemaCreationScriptForEntities(NSArray allEntities, NSDictionary options)
schemaCreationScriptForEntities
in class com.webobjects.eoaccess.EOSynchronizationFactory
public NSArray schemaCreationStatementsForEntities(NSArray allEntities, NSDictionary options)
schemaCreationStatementsForEntities
in class com.webobjects.eoaccess.EOSynchronizationFactory
Copyright © 2002 – 2020 Project Wonder.