|
WebObjects 5.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--com.webobjects.eoaccess.EOSynchronizationFactory
|
+--com.webobjects.jdbcadaptor.OpenBasePlugIn.OpenBaseSynchronizationFactory
| Inner classes inherited from class com.webobjects.eoaccess.EOSynchronizationFactory |
EOSynchronizationFactory.Delegate |
| Inner classes inherited from class com.webobjects.eoaccess.EOSchemaSynchronization |
EOSchemaSynchronization.ColumnTypes |
| Fields inherited from interface com.webobjects.eoaccess.EOSchemaGeneration |
CreateDatabaseKey, CreatePrimaryKeySupportKey, CreateTablesKey, DropDatabaseKey, DropPrimaryKeySupportKey, DropTablesKey, ForeignKeyConstraintsKey, PrimaryKeyConstraintsKey |
| Fields inherited from interface com.webobjects.eoaccess.EOSchemaSynchronization |
AllowsNullKey, ColumnNameKey, ExternalNameKey, ExternalTypeKey, NameKey, PrecisionKey, RelationshipsKey, ScaleKey, SchemaSynchronizationForeignKeyConstraintsKey, SchemaSynchronizationPrimaryKeyConstraintsKey, SchemaSynchronizationPrimaryKeySupportKey, WidthKey |
| Constructor Summary | |
OpenBasePlugIn.OpenBaseSynchronizationFactory(EOAdaptor adaptor)
|
|
| Method Summary | |
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. |
boolean |
isColumnTypeEquivalentToColumnType(EOSchemaSynchronization.ColumnTypes candidate,
EOSchemaSynchronization.ColumnTypes columnType,
NSDictionary 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. |
NSDictionary |
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)
Start Of EOSchemaGeneration |
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 |
statementsToDropForeignKeyConstraintsOnEntityGroups(NSArray entityGroups,
NSDictionary changes,
NSDictionary 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,
NSDictionary changes,
NSDictionary 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,
NSDictionary changes,
NSDictionary 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,
NSDictionary options)
Returns null by default. |
NSArray |
statementsToRenameColumnNamed(String columnName,
String tableName,
String newName,
NSDictionary options)
The default implementation returns null. |
NSArray |
statementsToRenameTableNamed(String tableName,
String newName,
NSDictionary 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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public OpenBasePlugIn.OpenBaseSynchronizationFactory(EOAdaptor adaptor)
| Method Detail |
public NSArray dropPrimaryKeySupportStatementsForEntityGroup(NSArray entityGroup)
EOSynchronizationFactorynull. 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.dropPrimaryKeySupportStatementsForEntityGroup in class EOSynchronizationFactorycom.webobjects.eoaccess.EOSynchronizationFactoryentityGroup - An array of EOEntity objects that have the same
external name.null by default.EOSynchronizationFactory.primaryKeySupportStatementsForEntityGroup(
NSArray entityGroup),
EOEntity.externalName()public NSArray dropPrimaryKeySupportStatementsForEntityGroups(NSArray entityGroups)
EOSynchronizationFactoryentityGroups. 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.
dropPrimaryKeySupportStatementsForEntityGroups in class EOSynchronizationFactorycom.webobjects.eoaccess.EOSynchronizationFactoryentityGroups - An NSArray of entity groups, which are arrays
of EOEntity objects that have the same
external name.entityGroups, or an
empty array, or an array containing a string
message that the option is not supported.EOSynchronizationFactory.dropPrimaryKeySupportStatementsForEntityGroup(
NSArray entityGroup),
EOSynchronizationFactory.schemaCreationStatementsForEntities(
NSArray allEntities, NSDictionary options),
EOAdaptorChannel.primaryKeyForNewRowWithEntity(
EOEntity entity),
EOEntity.externalName()public NSArray foreignKeyConstraintStatementsForRelationship(EORelationship relationship)
EOSynchronizationFactoryrelationship. Returns an empty array if any of
the following are true:
relationship spans models
(relationship's destination entity is in a
different model than its source entity).relationship is a to-many relationship.relationship is
not> a to-many relationship.Foreign key constraint statements are only created for to-one relationships whose inverse is a to-many relationship.
This method generates statements such as the following:
ALTER TABLE EMPLOYEE ADD CONSTRAINT TO_DEPARTMENT FOREIGN KEY
(DEPT_ID) REFERENCES DEPARTMENT(DEPT_ID)
If a subclass's database server's foreign key constraint
semantics are different, the subclass should override this method or
override the method
prepareConstraintStatementForRelationship.
foreignKeyConstraintStatementsForRelationship in class EOSynchronizationFactorycom.webobjects.eoaccess.EOSynchronizationFactoryrelationship - foreign key constraints has to be created for
this relationshipEOSynchronizationFactory.schemaCreationStatementsForEntities(NSArray
allEntities, NSDictionary options)
public boolean isColumnTypeEquivalentToColumnType(EOSchemaSynchronization.ColumnTypes candidate,
EOSchemaSynchronization.ColumnTypes columnType,
NSDictionary options)
EOSynchronizationFactorytrue 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.isColumnTypeEquivalentToColumnType in class EOSynchronizationFactorycom.webobjects.eoaccess.EOSynchronizationFactorycandidate - A column to potentially copy.columnType - A column into which to copy
candidate.options - Unused.true if the specified attributes
of candidate are identical to the
corresponding attributes of
columnType.
public NSDictionary objectStoreChangesFromAttributeToAttribute(EOAttribute schemaAttribute,
EOAttribute modelAttribute)
EOSchemaSynchronizationschemaAttribute with
modelAttribute and returns a change dictionary of
state that is different between the the two. The possible keys in
the change dictionary are:
ExternalTypeKeyAllowsNullKeyPrecisionKeyScaleKeyWidthKeyThe values in the change dictionary are the corresponding
values of schemaAttribute, that is, the values stored
in the database.
objectStoreChangesFromAttributeToAttribute in class EOSynchronizationFactorycom.webobjects.eoaccess.EOSchemaSynchronizationschemaAttribute - An EOAttribute as represented in the
database.modelAttribute - An EOAttribute as represented in the
EOModel.schemaAttribute
and modelAttribute.public NSArray primaryKeyConstraintStatementsForEntityGroup(NSArray entityGroup)
EOSynchronizationFactoryentityGroup. 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.
primaryKeyConstraintStatementsForEntityGroup in class EOSynchronizationFactorycom.webobjects.eoaccess.EOSynchronizationFactoryentityGroup - An array of EOEntity objects that have the
same external name.entityGroup, or an empty array.EOAttribute.columnName(),
EOEntity.externalName(),
EOEntity.primaryKeyAttributes()public NSArray primaryKeySupportStatementsForEntityGroup(NSArray entityGroup)
primaryKeySupportStatementsForEntityGroup in class EOSynchronizationFactorycom.webobjects.eoaccess.EOSynchronizationFactoryentityGroup - An array of EOEntity objects that have the same
external name.null by default.EOSynchronizationFactory.dropPrimaryKeySupportStatementsForEntityGroup(
NSArray entityGroup),
EOAdaptorChannel.primaryKeyForNewRowWithEntity(
EOEntity entity),
EOEntity.externalName()public NSArray primaryKeySupportStatementsForEntityGroups(NSArray entityGroups)
EOSynchronizationFactoryentityGroups. 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.
primaryKeySupportStatementsForEntityGroups in class EOSynchronizationFactorycom.webobjects.eoaccess.EOSynchronizationFactoryentityGroups - An NSArray of entity groups, which are arrays
of EOEntity objects that have the same
external name.entityGroups, or an
empty array, or an array containing a string
message that the option is not supported.EOSynchronizationFactory.primaryKeySupportStatementsForEntityGroup(
NSArray entityGroup),
EOAdaptorChannel.primaryKeyForNewRowWithEntity(
EOEntity entity),
EOEntity.externalName()
public NSArray statementsToDropForeignKeyConstraintsOnEntityGroups(NSArray entityGroups,
NSDictionary changes,
NSDictionary options)
EOSchemaSynchronizationentityGroups, 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.statementsToDropForeignKeyConstraintsOnEntityGroups in class EOSynchronizationFactorycom.webobjects.eoaccess.EOSchemaSynchronizationentityGroups - 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.entityGroups.EOSchemaSynchronization
public NSArray statementsToDropPrimaryKeyConstraintsOnEntityGroups(NSArray entityGroups,
NSDictionary changes,
NSDictionary options)
EOSchemaSynchronizationentityGroups, 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.statementsToDropPrimaryKeyConstraintsOnEntityGroups in class EOSynchronizationFactorycom.webobjects.eoaccess.EOSchemaSynchronizationentityGroups - 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.entityGroups.EOSchemaSynchronization
public NSArray statementsToImplementPrimaryKeyConstraintsOnEntityGroups(NSArray entityGroups,
NSDictionary changes,
NSDictionary options)
EOSchemaSynchronizationentityGroups, 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.statementsToImplementPrimaryKeyConstraintsOnEntityGroups in class EOSynchronizationFactorycom.webobjects.eoaccess.EOSchemaSynchronizationentityGroups - 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.entityGroups.EOSchemaSynchronization
public NSArray statementsToModifyColumnNullRule(String columnName,
String tableName,
boolean allowsNull,
NSDictionary options)
EOSynchronizationFactorynull 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.statementsToModifyColumnNullRule in class EOSynchronizationFactorycom.webobjects.eoaccess.EOSynchronizationFactorycolumnName - 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.null by default.EOSchemaSynchronization
public NSArray statementsToRenameColumnNamed(String columnName,
String tableName,
String newName,
NSDictionary options)
EOSynchronizationFactorynull. 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.statementsToRenameColumnNamed in class EOSynchronizationFactorycom.webobjects.eoaccess.EOSynchronizationFactorycolumnName - 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.null by default.
public NSArray statementsToRenameTableNamed(String tableName,
String newName,
NSDictionary options)
EOSchemaSynchronizationtableName to
newName. options is a dictionary
describing the aspects of the schema for which to create SQL
statements.statementsToRenameTableNamed in class EOSynchronizationFactorycom.webobjects.eoaccess.EOSchemaSynchronizationtableName - 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.public boolean supportsDirectColumnCoercion()
EOSynchronizationFactoryfalse. Can be
overridden by subclasses to return true if the adaptor
can change the type of an existing column in place.supportsDirectColumnCoercion in class EOSynchronizationFactorycom.webobjects.eoaccess.EOSynchronizationFactorytrue if the adaptor can change the type of
an existing column in place.public boolean supportsDirectColumnDeletion()
EOSynchronizationFactoryfalse. Can be
overridden by subclasses to return true if the adaptor
can delete columns.supportsDirectColumnDeletion in class EOSynchronizationFactorycom.webobjects.eoaccess.EOSynchronizationFactorytrue if the adaptor can delete columns.public boolean supportsDirectColumnInsertion()
EOSynchronizationFactoryfalse. Can be
overridden by subclasses to return true if the adaptor
can add columns to a table.supportsDirectColumnInsertion in class EOSynchronizationFactorycom.webobjects.eoaccess.EOSynchronizationFactorytrue if the adaptor can add columns to a table.public boolean supportsDirectColumnNullRuleModification()
EOSynchronizationFactoryfalse. Can be
overridden by subclasses to return true if the adaptor
can modify the null rule of an existing column in
place.supportsDirectColumnNullRuleModification in class EOSynchronizationFactorycom.webobjects.eoaccess.EOSynchronizationFactorytrue if the adaptor can modify the
nullrule of an existing column in place.public boolean supportsDirectColumnRenaming()
EOSynchronizationFactoryfalse. Can be
overridden by subclasses to return true if the adaptor
can rename columns in a table.supportsDirectColumnRenaming in class EOSynchronizationFactorycom.webobjects.eoaccess.EOSynchronizationFactorytrue if the adaptor can rename columns in a
table.public boolean supportsSchemaSynchronization()
EOSynchronizationFactoryfalse. Can be
overridden by subclasses to return true if the adaptor
can update the database schema to reflect changes in an EOModel.supportsSchemaSynchronization in class EOSynchronizationFactorycom.webobjects.eoaccess.EOSynchronizationFactorytrue if the adaptor can update the
database schema.
|
Last updated Thu Jan 10 18:10:21 PST 2002. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||