PostgresqlSynchronizationFactory Class Reference

Inherits com::webobjects::eoaccess::EOSynchronizationFactory, com::webobjects::eoaccess::EOSchemaGeneration, and com::webobjects::eoaccess::EOSchemaSynchronization.

Collaboration diagram for PostgresqlSynchronizationFactory:

Collaboration graph
[legend]

List of all members.

Public Member Functions

String _columnCreationClauseForAttribute (EOAttribute attribute)
NSArray _foreignKeyConstraintStatementsForEntityGroup (NSArray group)
StringBuffer addCreateClauseForAttribute (EOAttribute eoattribute)
String columnTypeStringForAttribute (EOAttribute attribute)
NSArray createTableStatementsForEntityGroup (NSArray entityGroup)
NSArray dropPrimaryKeySupportStatementsForEntityGroup (NSArray entityGroup)
NSArray dropTableStatementsForEntityGroup (NSArray entityGroup)
NSArray foreignKeyConstraintStatementsForRelationship (EORelationship relationship)
 PostgresqlSynchronizationFactory (EOAdaptor adaptor)
NSArray primaryKeyConstraintStatementsForEntityGroup (NSArray entityGroup)
NSArray primaryKeySupportStatementsForEntityGroup (NSArray entityGroup)
String schemaCreationScriptForEntities (NSArray allEntities, NSDictionary options)
NSArray schemaCreationStatementsForEntities (NSArray allEntities, NSDictionary options)
NSArray statementsToConvertColumnType (String columnName, String tableName, ColumnTypes oldType, 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)

Static Public Member Functions

static boolean entityUsesSeparateTable (EOEntity entity)
static String replaceStringByStringInString (String old, String newString, String buffer)

Static Public Attributes

static final String USING_KEY = "USING"

Protected Member Functions

boolean _shouldGenerateForeignKeyConstraints (EORelationship rel)
String externalNameForEntityWithoutSchema (EOEntity entity)
String formatColumnName (String name)
String formatTableName (String name)
boolean isInEntityModeler (EOModel model)

Private Member Functions

boolean enableIdentifierQuoting ()

Static Private Member Functions

static PostgresqlExpression createExpression (EOEntity entity, String statement)

Private Attributes

Boolean _enableIdentifierQuoting


Detailed Description

A synchronization factory usable outside EOModeler

Author:
giorgio_v

Constructor & Destructor Documentation

PostgresqlSynchronizationFactory ( EOAdaptor  adaptor  ) 


Member Function Documentation

String _columnCreationClauseForAttribute ( EOAttribute  attribute  ) 

NSArray _foreignKeyConstraintStatementsForEntityGroup ( NSArray  group  ) 

boolean _shouldGenerateForeignKeyConstraints ( EORelationship  rel  )  [protected]

StringBuffer addCreateClauseForAttribute ( EOAttribute  eoattribute  ) 

String columnTypeStringForAttribute ( EOAttribute  attribute  ) 

static PostgresqlExpression createExpression ( EOEntity  entity,
String  statement 
) [static, private]

PostgresqlExpression factory method.

Parameters:
entity the entity to which PostgresqlExpression is to be rooted
statement the SQL statement
Returns:
a PostgresqlExpression rooted to entity

NSArray createTableStatementsForEntityGroup ( NSArray  entityGroup  ) 

Quote table name if necessary

NSArray dropPrimaryKeySupportStatementsForEntityGroup ( NSArray  entityGroup  ) 

Generates the PostgreSQL-specific SQL statements to drop the primary key support.

Parameters:
entityGroup an array of EOEntity objects
Returns:
the array of SQL statements

NSArray dropTableStatementsForEntityGroup ( NSArray  entityGroup  ) 

Generates the PostgreSQL-specific SQL statements to drop tables.

Parameters:
entityGroup an array of EOEntity objects
Returns:
the array of SQL statements

boolean enableIdentifierQuoting (  )  [private]

static boolean entityUsesSeparateTable ( EOEntity  entity  )  [static]

String externalNameForEntityWithoutSchema ( EOEntity  entity  )  [protected]

NSArray foreignKeyConstraintStatementsForRelationship ( EORelationship  relationship  ) 

Generates the PostgreSQL-specific SQL statements to enforce the foreign key constraints for relationship.

Parameters:
relationship the relationship, as represented by EOF
Returns:
the array of SQL statements

String formatColumnName ( String  name  )  [protected]

String formatTableName ( String  name  )  [protected]

boolean isInEntityModeler ( EOModel  model  )  [protected]

Returns true if Entity Modeler is running the operation on this model.

Parameters:
model the model to check
Returns:
true if Entity Modeler is running

NSArray primaryKeyConstraintStatementsForEntityGroup ( NSArray  entityGroup  ) 

Generates the PostgreSQL-specific SQL statements to enforce primary key constraints.

Parameters:
entityGroup an array of EOEntity objects
Returns:
the array of SQL statements

NSArray primaryKeySupportStatementsForEntityGroup ( NSArray  entityGroup  ) 

Generates the PostgreSQL-specific SQL statements to create the primary key support.

Parameters:
entityGroup an array of EOEntity objects
Returns:
the array of SQL statements

static String replaceStringByStringInString ( String  old,
String  newString,
String  buffer 
) [static]

Replaces a given string by another string in a string.

Parameters:
old string to be replaced
newString to be inserted
buffer string to have the replacement done on it
Returns:
string after having all of the replacement done.

String schemaCreationScriptForEntities ( NSArray  allEntities,
NSDictionary  options 
)

NSArray schemaCreationStatementsForEntities ( NSArray  allEntities,
NSDictionary  options 
)

NSArray statementsToConvertColumnType ( String  columnName,
String  tableName,
ColumnTypes  oldType,
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 
)


Member Data Documentation

Boolean _enableIdentifierQuoting [private]

final String USING_KEY = "USING" [static]


The documentation for this class was generated from the following file:

Generated on Sat May 26 06:42:33 2012 for Project Wonder by  doxygen 1.5.8