|
WebObjects 5.4.2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface EOSchemaGeneration
This interface has been introduced to define API for generating database schemas from EOModel files. None of the API is new in WebObjects 5.x. Rather, it was moved to EOSchemaGeneration from EOSQLExpression. The API is essentially the same as in WebObjects 4.5.x except that methods that were static methods of EOSQLExpression in WebObjects 4.5.x are now instance methods on EOSchemaGeneration.
An implementation of the EOSchemaGeneration interface is provided by EOSynchronizationFactory, a new class introduced in WebObjects 5.0.
EOSchemaGeneration defines a number of constants that are intended for use as keys in options dictionaries. A corresponding value of "YES"
indicates that the EOSQLExpression should generate SQL to perform the corresponding database operation.
EOSQLExpression
,
EOSchemaSynchronizationFactory
Nested Class Summary | |
---|---|
static interface |
EOSchemaGeneration.Delegate
|
Method Summary | |
---|---|
void |
appendExpressionToScript(EOSQLExpression expression,
StringBuffer script)
Appends expression 's statement to script along with any necessary delimiter. |
NSArray |
createDatabaseStatementsForConnectionDictionary(NSDictionary connectionDictionary,
NSDictionary administrativeConnectionDictionary)
Generates and returns an array of EOSQLExpressions containing the SQL statements to create a database or user that can be accessed by the provided connectionDictionary and administrativeConnectionDictionary . |
NSArray |
createIndexStatementsForEntityGroup(NSArray entityGroup)
|
NSArray |
createIndexStatementsForEntityGroups(NSArray entityGroups)
|
NSArray |
createTableStatementsForEntityGroup(NSArray entityGroup)
Returns an array of EOSQLExpression objects that define the SQL necessary to create a table for entityGroup . |
NSArray |
createTableStatementsForEntityGroups(NSArray entityGroups)
Returns an array of EOSQLExpression objects that define the SQL necessary to create the tables for each of the entity groups in entityGroups . |
NSArray |
dropDatabaseStatementsForConnectionDictionary(NSDictionary connectionDictionary,
NSDictionary administrativeConnectionDictionary)
Generates and returns an array of EOSQLExpressions that define the SQL statements to drop a database or user that is accessed by the provided connectionDictionary and administrativeConnectionDictionary . |
NSArray |
dropIndexStatementsForEntityGroup(NSArray entityGroup)
|
NSArray |
dropIndexStatementsForEntityGroups(NSArray entityGroups)
|
NSArray |
dropPrimaryKeySupportStatementsForEntityGroup(NSArray entityGroup)
Returns an array of EOSQLExpression objects that define the SQL necessary to drop the primary key generation support for entityGroup , or null if primary key generation is not supported. |
NSArray |
dropPrimaryKeySupportStatementsForEntityGroups(NSArray entityGroups)
Returns an array of EOSQLExpression objects that define the SQL necessary to drop the primary key generation support for all the entities in each of the the entity groups in entityGroups . |
NSArray |
dropTableStatementsForEntityGroup(NSArray entityGroup)
Returns an array of EOSQLExpression objects that define the SQL necessary to drop the table identified by entityGroup . |
NSArray |
dropTableStatementsForEntityGroups(NSArray entityGroups)
Returns an array of EOSQLExpression objects that define the SQL necessary to drop the tables for all 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 . |
EOSchemaGenerationOptions |
newOptions()
Creates a new Options object, to facilitate subclassing. |
NSArray |
primaryKeyConstraintStatementsForEntityGroup(NSArray entityGroup)
Returns an array of EOSQLExpression objects that define the SQL necessary to create the primary key constraints for entityGroup . |
NSArray |
primaryKeyConstraintStatementsForEntityGroups(NSArray entityGroups)
Returns an array of EOSQLExpression objects that define the SQL necessary to create the primary key constraints for the entities specified in entityGroups . |
NSArray |
primaryKeySupportStatementsForEntityGroup(NSArray entityGroup)
Returns an array of EOSQLExpression objects that define the SQL necessary to create the primary key generation support for entityGroup , or null if primary key generation is not supported. |
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 . |
String |
schemaCreationScriptForEntities(NSArray allEntities,
EOSchemaGenerationOptions options)
Returns a script of SQL statements suitable to create the schema based on options for the EOEntity objects in allEntities . |
NSArray |
schemaCreationStatementsForEntities(NSArray allEntities,
EOSchemaGenerationOptions options)
Returns an array of EOSQLExpressions suitable to create the schema based on options for the EOEntity objects in allEntities . |
EOSchemaGeneration.Delegate |
schemaGenerationDelegate()
|
void |
setSchemaGenerationDelegate(EOSchemaGeneration.Delegate delegate)
|
Method Detail |
---|
void setSchemaGenerationDelegate(EOSchemaGeneration.Delegate delegate)
delegate
- EOSchemaGeneration.Delegate schemaGenerationDelegate()
EOSchemaGenerationOptions newOptions()
NSArray foreignKeyConstraintStatementsForRelationship(EORelationship relationship)
relationship
. Returns an empty array if unable to generate foreign key constraints for relationship
relationship
- An EORelationship.
relationship
, or an empty array.EOSQLExpression
,
EOSchemaSynchronizationFactory.foreignKeyConstraintStatementsForRelationship(EORelationship relationship)
,
#schemaCreationStatementsForEntities( NSArray allEntities, NSDictionary options)
NSArray createTableStatementsForEntityGroup(NSArray entityGroup)
entityGroup
. Returns an empty array if entityGroup
is null
or empty.
entityGroup
- An array of EOEntity objects that have the same external name.
entityGroup
, or an empty array.EOSchemaGeneration.createTableStatementsForEntityGroups( NSArray entityGroup)
,
EOSchemaGeneration.dropTableStatementsForEntityGroup( NSArray entityGroup)
,
EOEntity.externalName()
,
EOSchemaSynchronizationFactory.createTableStatementsForEntityGroup( NSArray entityGroup)
NSArray dropTableStatementsForEntityGroup(NSArray entityGroup)
entityGroup
. Returns an empty array if entityGroup
is null
. The drop statement generated by this method should be sufficient to remove the
table created by createTableStatementsForEntityGroup
's statements.
entityGroup
- An array of EOEntity objects that have the same external name.
entityGroup
, or an empty array.EOSchemaGeneration.createTableStatementsForEntityGroup(NSArray entityGroup)
,
EOSchemaGeneration.dropTableStatementsForEntityGroups(NSArray entityGroups)
,
EOEntity.externalName()
,
EOSchemaSynchronizationFactory.dropTableStatementsForEntityGroup( NSArray entityGroup)
NSArray primaryKeyConstraintStatementsForEntityGroup(NSArray entityGroup)
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
.
entityGroup
- An array of EOEntity objects that have the same external name.
entityGroup
, or an empty array.EOAttribute.columnName()
,
EOEntity.externalName()
,
EOEntity.primaryKeyAttributes()
,
EOSchemaSynchronizationFactory.primaryKeyConstraintStatementsForEntityGroup( NSArray entityGroup)
NSArray primaryKeySupportStatementsForEntityGroup(NSArray entityGroup)
entityGroup
, or null
if primary key generation is not supported.
entityGroup
- An array of EOEntity objects that have the same external name.
entityGroup
, or null>
.EOSchemaGeneration.dropPrimaryKeySupportStatementsForEntityGroup( NSArray entityGroup)
,
EOAdaptorChannel.primaryKeyForNewRowWithEntity( EOEntity entity)
,
EOEntity.externalName()
,
EOSchemaSynchronizationFactory.primaryKeySupportStatementsForEntityGroup( NSArray entityGroup)
NSArray dropPrimaryKeySupportStatementsForEntityGroup(NSArray entityGroup)
entityGroup
, or null
if primary key generation is not supported.
entityGroup
- An array of EOEntity objects that have the same external name.
entityGroup
, or null
.EOSchemaGeneration.primaryKeySupportStatementsForEntityGroup( NSArray entityGroup)
,
EOEntity.externalName()
,
EOSchemaSynchronizationFactory.dropPrimaryKeySupportStatementsForEntityGroup( NSArray entityGroup)
NSArray createTableStatementsForEntityGroups(NSArray entityGroups)
entityGroups
. Returns an empty array if entityGroups
is null
or empty.
entityGroups
- An array of entity groups, which are arrays of EOEntity objects that have the same external name.
entityGroups
, or an empty array.EOSchemaGeneration.createTableStatementsForEntityGroup( NSArray entityGroup)
,
#schemaCreationStatementsForEntities( NSArray allEntities, NSDictionary options)
,
EOEntity.externalName()
,
EOSchemaSynchronizationFactory.createTableStatementsForEntityGroups( NSArray entityGroups)
NSArray dropTableStatementsForEntityGroups(NSArray entityGroups)
entityGroups
. Returns an empty array if entityGroups
is null
or empty.
entityGroups
- An array of entity groups, which are arrays of EOEntity objects that have the same external name.
entityGroups
, or an empty array.EOSchemaGeneration.dropTableStatementsForEntityGroup( NSArray entityGroup)
,
#schemaCreationStatementsForEntities( NSArray allEntities, NSDictionary options)
,
EOEntity.externalName()
,
EOSchemaSynchronizationFactory.dropTableStatementsForEntityGroups( NSArray entityGroups)
NSArray primaryKeyConstraintStatementsForEntityGroups(NSArray entityGroups)
entityGroups
. Returns an empty array if entityGroups
is null
or empty.
entityGroups
- An array of entity groups, which are arrays of EOEntity objects that have the same external name.
entityGroups
, or an empty array.EOSchemaGeneration.primaryKeyConstraintStatementsForEntityGroup( NSArray entityGroup)
,
EOEntity.externalName()
,
EOSchemaSynchronizationFactory.primaryKeyConstraintStatementsForEntityGroups( NSArray entityGroups)
NSArray primaryKeySupportStatementsForEntityGroups(NSArray entityGroups)
entityGroups
. Returns an empty array if entityGroups
is null
or empty.
Returns an array containing an error message if primary key generation support is not available.
entityGroups
- An array of entity groups, which are arrays of EOEntity objects that have the same external name.
entityGroups
, or an empty array, or an array containing an error string.EOSchemaGeneration.primaryKeySupportStatementsForEntityGroup( NSArray entityGroup)
,
EOAdaptorChannel.primaryKeyForNewRowWithEntity( EOEntity entity)
,
EOEntity.externalName()
,
EOSchemaSynchronizationFactory.primaryKeySupportStatementsForEntityGroups( NSArray entityGroups)
NSArray dropPrimaryKeySupportStatementsForEntityGroups(NSArray entityGroups)
entityGroups
. Returns an empty array if entityGroups
is null
or empty.
Returns an array containing an error message if primary key generation support is not available.
entityGroups
- An array of entity groups, which are arrays of EOEntity objects that have the same external name.
entityGroups
, or an empty array, or an array containing an error string.EOSchemaGeneration.dropPrimaryKeySupportStatementsForEntityGroup( NSArray entityGroup)
,
#schemaCreationStatementsForEntities( NSArray allEntities, NSDictionary options)
,
EOAdaptorChannel.primaryKeyForNewRowWithEntity( EOEntity entity)
,
EOEntity.externalName()
,
EOSchemaSynchronizationFactory.dropPrimaryKeySupportStatementsForEntityGroups( NSArray entityGroups)
String schemaCreationScriptForEntities(NSArray allEntities, EOSchemaGenerationOptions options)
options
for the EOEntity objects in allEntities
. Returns an empty string if either options
or allEntities
is empty or null
.
options
is an option object 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 option object 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, EOSchemaGenerationOptions options)
,
EOSchemaSynchronizationFactory.schemaCreationScriptForEntities( NSArray allEntities, EOSchemaGenerationOptions options)
void appendExpressionToScript(EOSQLExpression expression, StringBuffer script)
expression
's statement to script
along with any necessary delimiter. script
is the StringBuffer in which the SQL script is built.
Used in conjunction with schemaCreationStatementsForEntities
and schemaCreationScriptForEntities
to build up the SQL script to generate the specified schema for a set of EOEntities.
expression
- An EOSQLExpression.script
- A StringBuffer used to build the SQL script.EOSchemaGeneration.createTableStatementsForEntityGroup( NSArray entityGroup)
,
EOSchemaSynchronizationFactory.appendExpressionToScript( EOSQLExpression expression, StringBuffer script)
,
EOSQLExpression
NSArray schemaCreationStatementsForEntities(NSArray allEntities, EOSchemaGenerationOptions options)
options
for the EOEntity objects in allEntities
. Returns an empty array if either allEntities
or options
is null
or empty.
options
is an option object 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
- An option object describing the schema options for which to generate SQL statements.
allEntities
with the given options
.#schemaCreationScriptForEntities( NSArray allEntities, NSDictionary options)
,
EOSchemaGeneration.appendExpressionToScript( EOSQLExpression expression, StringBuffer script)
,
EOSchemaSynchronizationFactory.schemaCreationStatementsForEntities(NSArray allEntities, EOSchemaGenerationOptions options)
NSArray createDatabaseStatementsForConnectionDictionary(NSDictionary connectionDictionary, NSDictionary administrativeConnectionDictionary)
connectionDictionary
and administrativeConnectionDictionary
. Returns null
if this feature is not
supported.
connectionDictionary
- A dictionary of information needed by the adaptor to connect to the database server.administrativeConnectionDictionary
- A dictionary of administrative login information for the database server.
EOSchemaGeneration.dropDatabaseStatementsForConnectionDictionary( NSDictionary connectionDictionary, NSDictionary administrativeConnectionDictionary)
NSArray dropDatabaseStatementsForConnectionDictionary(NSDictionary connectionDictionary, NSDictionary administrativeConnectionDictionary)
connectionDictionary
and administrativeConnectionDictionary
. Returns null
if this feature is not
supported.
connectionDictionary
- A dictionary of information needed by the adaptor to connect to the database server.administrativeConnectionDictionary
- A dictionary of administrative login information for the database server.
EOSchemaGeneration.createDatabaseStatementsForConnectionDictionary( NSDictionary connectionDictionary, NSDictionary administrativeConnectionDictionary)
NSArray createIndexStatementsForEntityGroups(NSArray entityGroups)
entityGroups
-
NSArray createIndexStatementsForEntityGroup(NSArray entityGroup)
NSArray dropIndexStatementsForEntityGroups(NSArray entityGroups)
entityGroups
-
NSArray dropIndexStatementsForEntityGroup(NSArray entityGroup)
|
Last updated June 2008 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |