|
WebObjects 5.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.webobjects.eoaccess.synchronization.EOSchemaSynchronizationFactory
com.webobjects.eoaccess.EOSynchronizationFactory
@Deprecated public class EOSynchronizationFactory
com.webobjects.eoaccess.synchronization.EOSynchronizationFactory
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.webobjects.eoaccess.synchronization.EOSchemaSynchronizationFactory |
---|
EOSchemaSynchronizationFactory.Delegate |
Nested classes/interfaces inherited from interface com.webobjects.eoaccess.synchronization.EOSchemaGeneration |
---|
EOSchemaGeneration.Delegate |
Nested classes/interfaces inherited from interface com.webobjects.eoaccess.synchronization.EOSchemaSynchronization |
---|
EOSchemaSynchronization.ColumnTypes |
Field Summary |
---|
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 | |
---|---|
EOSynchronizationFactory(EOAdaptor adaptor)
Deprecated. |
Method Summary | |
---|---|
boolean |
isColumnTypeEquivalentToColumnType(EOSchemaSynchronization.ColumnTypes candidate,
EOSchemaSynchronization.ColumnTypes columnType,
NSDictionary<String,String> options)
Deprecated. Returns true if the name, precision, width, and scale of candidate are identical to the name, precision, width, and scale of columnType , false otherwise. |
String |
phraseCastingColumnNamed(String columnName,
EOSchemaSynchronization.ColumnTypes type,
EOSchemaSynchronization.ColumnTypes castType,
NSDictionary<String,String> options)
Deprecated. Returns an SQL string to cast the values in the column identified by columnName from the current type to a new type specified by castType . |
String |
schemaCreationScriptForEntities(NSArray<EOEntity> allEntities,
NSDictionary<String,String> options)
Deprecated. Returns a script of SQL statements suitable to create the schema based on options for the EOEntity objects in allEntities . |
NSArray<EOSQLExpression> |
schemaCreationStatementsForEntities(NSArray<EOEntity> allEntities,
NSDictionary<String,String> options)
Deprecated. Returns an array of EOSQLExpressions suitable to create the schema based on options for the EOEntity objects in allEntities . |
NSArray<EOSQLExpression> |
statementsToConvertColumnType(String columnName,
String tableName,
EOSchemaSynchronization.ColumnTypes type,
EOSchemaSynchronization.ColumnTypes newType,
NSDictionary<String,String> options)
Deprecated. Returns 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 . |
NSArray<EOSQLExpression> |
statementsToCopyTableNamed(String tableName,
NSArray<EOEntity> entityGroup,
NSDictionary<String,Object> changes,
NSDictionary<String,String> options)
Deprecated. Returns an array of EOSQLExpressions to copy the specified table into a new table, whose definition is provided by entityGroup , an array of EOEntity objects with the same external name. |
NSArray<EOSQLExpression> |
statementsToDeleteColumnNamed(String columnName,
String tableName,
NSDictionary<String,String> options)
Deprecated. Returns an array of EOSQLExpressions to delete the column indentifed by columnName from the table identified by tableName . |
NSArray<EOSQLExpression> |
statementsToDropForeignKeyConstraintsOnEntityGroups(NSArray<NSArray<EOEntity>> entityGroups,
NSDictionary<String,Object> changes,
NSDictionary<String,String> options)
Deprecated. 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<EOSQLExpression> |
statementsToDropPrimaryKeyConstraintsOnEntityGroups(NSArray<NSArray<EOEntity>> entityGroups,
NSDictionary<String,Object> changes,
NSDictionary<String,String> options)
Deprecated. 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<EOSQLExpression> |
statementsToDropPrimaryKeySupportForEntityGroups(NSArray<NSArray<EOEntity>> entityGroups,
NSDictionary<String,Object> changes,
NSDictionary<String,String> options)
Deprecated. Returns an array of EOSQLExpressions to drop primary key support for the table corresponding to entityGroups , which is an array containing arrays of EOEntity objects with the same external name. |
NSArray<EOSQLExpression> |
statementsToImplementForeignKeyConstraintsOnEntityGroups(NSArray<NSArray<EOEntity>> entityGroups,
NSDictionary<String,Object> changes,
NSDictionary<String,String> options)
Deprecated. Returns an array of EOSQLExpressions to implement foreign key constraints for the table corresponding to entityGroups , which is an array containing arrays of EOEntity objects with the same external name. |
NSArray<EOSQLExpression> |
statementsToImplementPrimaryKeyConstraintsOnEntityGroups(NSArray<NSArray<EOEntity>> entityGroups,
NSDictionary<String,Object> changes,
NSDictionary<String,String> options)
Deprecated. 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<EOSQLExpression> |
statementsToImplementPrimaryKeySupportForEntityGroups(NSArray<NSArray<EOEntity>> entityGroups,
NSDictionary<String,Object> changes,
NSDictionary<String,String> options)
Deprecated. Returns an array of EOSQLExpressions to implement primary key support for the table corresponding to entityGroups , which is an array containing arrays of EOEntity objects with the same external name. |
NSArray<EOSQLExpression> |
statementsToInsertColumnForAttribute(EOAttribute attribute,
NSDictionary<String,String> options)
Deprecated. Returns an array of EOSQLExpressions to insert a column in the database schema for the specified attribute . |
NSArray<EOSQLExpression> |
statementsToModifyColumnNullRule(String columnName,
String tableName,
boolean allowsNull,
NSDictionary<String,String> options)
Deprecated. Returns an array of EOSQLExpressions to modify in place the column identified by columnName in the table identified by tableName to either allow or not allow NULL values as specified by allowsNull . |
NSArray<EOSQLExpression> |
statementsToRenameColumnNamed(String columnName,
String tableName,
String newName,
NSDictionary<String,String> options)
Deprecated. Returns an array of EOSQLExpressions to rename in place of the the column indentifed by tableName to newName . |
NSArray<EOSQLExpression> |
statementsToRenameTableNamed(String tableName,
String newName,
NSDictionary<String,String> options)
Deprecated. Returns an array of EOSQLExpressions to rename in place the the table indentifed by tableName to newName . |
NSArray<EOSQLExpression> |
statementsToUpdateObjectStoreForEntityGroups(NSArray<NSArray<EOEntity>> entityGroups,
NSDictionary<String,Object> changes,
NSDictionary<String,String> options)
Deprecated. Returns an array of EOSQLExpressions to update the database table that corresponds to model according to the changes and SQL generation instructions in the changes and options dictionaries. |
NSArray<EOSQLExpression> |
statementsToUpdateObjectStoreForModel(EOModel model,
NSDictionary<String,Object> changes,
NSDictionary<String,String> options)
Deprecated. Returns an array of EOSQLExpressions to synchronize the database with the EOModel model . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EOSynchronizationFactory(EOAdaptor adaptor)
adaptor
- Method Detail |
---|
public String schemaCreationScriptForEntities(NSArray<EOEntity> allEntities, NSDictionary<String,String> options)
EOSchemaGeneration
options
for the EOEntity objects in allEntities
. Returns an empty string if either options
or allEntities
is empty or null
.
options
is a dictionary whose keys describe 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:
CreateTablesKey
DropTablesKey
CreatePrimaryKeySupportKey
DropPrimaryKeySupportKey
PrimaryKeyConstraintsKey
ForeignKeyConstraintsKey
CreateDatabaseKey
DropDatabaseKey
Used in conjunction with appendExpressionToScript
and schemaCreationStatementsForEntities
to build up the SQL script to generate the specified schema for allEntities
.
allEntities
- An array of EOEntity objects.options
- A dictionary describing the schema options for which to generate SQL statements.
allEntities
with the given options
.EOSchemaGeneration.appendExpressionToScript( EOSQLExpression anSQLExpression, StringBuffer script)
,
EOSchemaGeneration.schemaCreationStatementsForEntities( NSArray allEntities, NSDictionary options)
,
EOSchemaSynchronizationFactory#schemaCreationScriptForEntities( NSArray allEntities, NSDictionary options)
public NSArray<EOSQLExpression> schemaCreationStatementsForEntities(NSArray<EOEntity> allEntities, NSDictionary<String,String> options)
EOSchemaGeneration
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:
CreateTablesKey
DropTablesKey
CreatePrimaryKeySupportKey
DropPrimaryKeySupportKey
PrimaryKeyConstraintsKey
ForeignKeyConstraintsKey
CreateDatabaseKey
DropDatabaseKey
Used in conjunction with appendExpressionToScript
and schemaCreationScriptForEntities
to build up the SQL script to generate the specified schema for allEntities
.
allEntities
- An array of EOEntity objects.options
- A dictionary describing the schema options for which to generate SQL statements.
allEntities
with the given options
.EOSchemaGeneration.schemaCreationScriptForEntities( NSArray allEntities, NSDictionary options)
,
EOSchemaGeneration.appendExpressionToScript( EOSQLExpression expression, StringBuffer script)
,
EOSchemaSynchronizationFactory#schemaCreationStatementsForEntities(NSArray allEntities, NSDictionary options)
public boolean isColumnTypeEquivalentToColumnType(EOSchemaSynchronization.ColumnTypes candidate, EOSchemaSynchronization.ColumnTypes columnType, NSDictionary<String,String> options)
EOSchemaSynchronization
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.
candidate
- A column to potentially copy.columnType
- A column into which to copy candidate
.options
- A dictionary describing the aspects of the schema for which to create SQL statements.
true
if the specified attributes of candidate
are identical to the corresponding attributes of columnType
.public String phraseCastingColumnNamed(String columnName, EOSchemaSynchronization.ColumnTypes type, EOSchemaSynchronization.ColumnTypes castType, NSDictionary<String,String> options)
EOSchemaSynchronization
columnName
from the current type
to a new type specified by castType
. This method is used when the adaptor doesn't support in-place column type coercion, and the table has to be
recreated. To move data from the old table to the new table, sometimes a conversion statement is needed (for example, to convert strings in a VARCHAR column to numbers). options
is a dictionary describing the aspects of the schema for which to create SQL statements.
columnName
- The name of a database column.type
- The type of the values in the specified column.castType
- The new type to which to cast the values in the specified column.options
- A dictionary describing the aspects of the schema for which to create SQL statements.
castType
public NSArray<EOSQLExpression> statementsToCopyTableNamed(String tableName, NSArray<EOEntity> entityGroup, NSDictionary<String,Object> changes, NSDictionary<String,String> options)
EOSchemaSynchronization
entityGroup
, an array of EOEntity objects with the same external name. This method is used when the adaptor doesn't support the in-place table modifications
required to synchronize the database to a model.
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.
tableName
- The name of the table to be copied.entityGroup
- An array of EOEntity objects that defines a new database table into which to copy the named table.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.
tableName
to a new table defined by entityGroup
.EOSchemaSynchronization
public NSArray<EOSQLExpression> statementsToInsertColumnForAttribute(EOAttribute attribute, NSDictionary<String,String> options)
EOSchemaSynchronization
attribute
. The options
dictionary describes the aspects of the schema for which to create SQL statements.
attribute
- An EOAttribute for which to insert a database column.options
- A dictionary describing the aspects of the schema for which to create SQL statements.
attribute
.EOAttribute
,
EOSchemaSynchronization
public NSArray<EOSQLExpression> statementsToModifyColumnNullRule(String columnName, String tableName, boolean allowsNull, NSDictionary<String,String> options)
EOSchemaSynchronization
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.
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.
EOSchemaSynchronization
public NSArray<EOSQLExpression> statementsToConvertColumnType(String columnName, String tableName, EOSchemaSynchronization.ColumnTypes type, EOSchemaSynchronization.ColumnTypes newType, NSDictionary<String,String> options)
EOSchemaSynchronization
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.
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.
public NSArray<EOSQLExpression> statementsToDeleteColumnNamed(String columnName, String tableName, NSDictionary<String,String> options)
EOSchemaSynchronization
columnName
from the table identified by tableName
. options
is a dictionary describing the aspects of the schema for which to create SQL statements.
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.
public NSArray<EOSQLExpression> statementsToRenameColumnNamed(String columnName, String tableName, String newName, NSDictionary<String,String> options)
EOSchemaSynchronization
tableName
to newName
. options
is a dictionary describing the aspects of the schema for which to create SQL
statements.
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.
public NSArray<EOSQLExpression> statementsToDropForeignKeyConstraintsOnEntityGroups(NSArray<NSArray<EOEntity>> entityGroups, NSDictionary<String,Object> changes, NSDictionary<String,String> options)
EOSchemaSynchronization
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.
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.
entityGroups
.EOSchemaSynchronization
public NSArray<EOSQLExpression> statementsToDropPrimaryKeyConstraintsOnEntityGroups(NSArray<NSArray<EOEntity>> entityGroups, NSDictionary<String,Object> changes, NSDictionary<String,String> options)
EOSchemaSynchronization
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.
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.
entityGroups
.EOSchemaSynchronization
public NSArray<EOSQLExpression> statementsToDropPrimaryKeySupportForEntityGroups(NSArray<NSArray<EOEntity>> entityGroups, NSDictionary<String,Object> changes, NSDictionary<String,String> options)
EOSchemaSynchronization
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.
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.
entityGroups
.EOSchemaSynchronization
public NSArray<EOSQLExpression> statementsToImplementForeignKeyConstraintsOnEntityGroups(NSArray<NSArray<EOEntity>> entityGroups, NSDictionary<String,Object> changes, NSDictionary<String,String> options)
EOSchemaSynchronization
entityGroups
, which is an array containing arrays of EOEntity objects with the same external name. The changes
dictionary identifies changes to make to the
database schema. The options
dictionary describes the aspects of the schema for which to create SQL statements.
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.
entityGroups
.EOSchemaSynchronization
public NSArray<EOSQLExpression> statementsToImplementPrimaryKeyConstraintsOnEntityGroups(NSArray<NSArray<EOEntity>> entityGroups, NSDictionary<String,Object> changes, NSDictionary<String,String> options)
EOSchemaSynchronization
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.
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.
entityGroups
.EOSchemaSynchronization
public NSArray<EOSQLExpression> statementsToImplementPrimaryKeySupportForEntityGroups(NSArray<NSArray<EOEntity>> entityGroups, NSDictionary<String,Object> changes, NSDictionary<String,String> options)
EOSchemaSynchronization
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.
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.
entityGroups
.EOSchemaSynchronization
public NSArray<EOSQLExpression> statementsToRenameTableNamed(String tableName, String newName, NSDictionary<String,String> options)
EOSchemaSynchronization
tableName
to newName
. options
is a dictionary describing the aspects of the schema for which to create SQL statements.
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.
public NSArray<EOSQLExpression> statementsToUpdateObjectStoreForModel(EOModel model, NSDictionary<String,Object> changes, NSDictionary<String,String> options)
EOSchemaSynchronization
model
. Prepares the statements to insert and delete new and deleted tables before invoking statementsToUpdateObjectStoreForEntityGroups
for each modified table. 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.
model
- The EOModel with which to sychnronize the database.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.
model
.EOSchemaSynchronization.statementsToUpdateObjectStoreForEntityGroups(com.webobjects.foundation.NSArray>, com.webobjects.foundation.NSDictionary, com.webobjects.foundation.NSDictionary)
,
EOSchemaSynchronization
public NSArray<EOSQLExpression> statementsToUpdateObjectStoreForEntityGroups(NSArray<NSArray<EOEntity>> entityGroups, NSDictionary<String,Object> changes, NSDictionary<String,String> options)
EOSchemaSynchronization
model
according to the changes and SQL generation instructions in the changes
and options
dictionaries. model
is an array of entity groups, which
are arrays of EOEntity objects that have the same external name. Inserts and deletes columns, and updates modified columns.
entityGroups
- An array of entity groups, which are arrays of EOEntity objects that have 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.
model
.EOSchemaSynchronization
|
Last updated Tuesday, October 9, 2007 08:58 PDT | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |