ERXMigrator Class Reference

Collaboration diagram for ERXMigrator:

Collaboration graph
[legend]

List of all members.

Classes

class  ERXMigrationAction
class  ModelVersion

Public Member Functions

 ERXMigrator (String lockOwnerName)
void migrateToLatest ()

Static Public Member Functions

static boolean shouldMigrateAtStartup ()

Static Public Attributes

static final int LATEST_VERSION = Integer.MAX_VALUE
static final Logger log = Logger.getLogger(ERXMigrator.class)

Protected Member Functions

void _buildDependenciesForModel (EOModel model, int migrateToVersion, Map< String, Integer > versions, Map< IERXMigration, ERXModelVersion > migrations) throws InstantiationException, IllegalAccessException
Map< IERXMigration,
ERXModelVersion
_buildDependenciesForModelsNamed (NSArray< String > modelNames, NSArray< String > skipModelNames)
boolean canMigrateModel (EOModel model)
IERXMigrationLock databaseLockForModel (EOModel model)
EOEditingContext newEditingContext ()

Private Attributes

String _lockOwnerName


Constructor & Destructor Documentation

ERXMigrator ( String  lockOwnerName  ) 

Constructs an ERXMigrator with the given lock owner. For an application, the lock owner name defaults to appname-instancenumber.

Parameters:
lockOwnerName the name of the lock owner


Member Function Documentation

void _buildDependenciesForModel ( EOModel  model,
int  migrateToVersion,
Map< String, Integer >  versions,
Map< IERXMigration, ERXModelVersion migrations 
) throws InstantiationException, IllegalAccessException [protected]

Map<IERXMigration, ERXModelVersion> _buildDependenciesForModelsNamed ( NSArray< String modelNames,
NSArray< String skipModelNames 
) [protected]

boolean canMigrateModel ( EOModel  model  )  [protected]

IERXMigrationLock databaseLockForModel ( EOModel  model  )  [protected]

void migrateToLatest (  ) 

Migrates all models specified in the default model group to the latest versions.

Exceptions:
IllegalAccessException 
InstantiationException 

EOEditingContext newEditingContext (  )  [protected]

Subclasses can override this to return a different editing context.

Returns:
EOEditingContext to be used for migration

static boolean shouldMigrateAtStartup (  )  [static]

Returns whether or not migration should run at startup. Defaults to false.

Returns:
return true if migrations should run at startup


Member Data Documentation

final int LATEST_VERSION = Integer.MAX_VALUE [static]

Symbolic version number for migrating to "the latest" version.

final Logger log = Logger.getLogger(ERXMigrator.class) [static]


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

Generated on Sat May 26 06:43:17 2012 for Project Wonder by  doxygen 1.5.8