Project Wonder 5.0

er.taggable.migrations
Class ERTaggableEntity0

java.lang.Object
  extended by er.extensions.migration.ERXMigrationDatabase.Migration
      extended by er.taggable.migrations.ERTaggableEntity0
All Implemented Interfaces:
IERXMigration

public class ERTaggableEntity0
extends ERXMigrationDatabase.Migration

ERTaggableEntity0 provides a superclass for creating the join table for your taggable entities.

Author:
mschrag

Field Summary
 
Fields inherited from class er.extensions.migration.ERXMigrationDatabase.Migration
ALLOWS_NULL, NOT_NULL
 
Constructor Summary
ERTaggableEntity0(java.lang.String entityName)
          Constructs an ERTaggableEntity0.
ERTaggableEntity0(java.lang.String entityName, java.lang.String tagsRelationshipName)
          Constructs an ERTaggableEntity0.
ERTaggableEntity0(java.lang.String entityName, java.lang.String tagsRelationshipName, java.lang.String tagEntityName)
          Constructs an ERTaggableEntity0.
 
Method Summary
 void downgrade(com.webobjects.eocontrol.EOEditingContext editingContext, ERXMigrationDatabase database)
           
 com.webobjects.foundation.NSArray<ERXModelVersion> modelDependencies()
          Overridden to return null by default
static void upgrade(com.webobjects.eocontrol.EOEditingContext editingContext, com.webobjects.eoaccess.EOAdaptorChannel channel, com.webobjects.eoaccess.EOModel model, java.lang.String itemEntityName)
           
static void upgrade(com.webobjects.eocontrol.EOEditingContext editingContext, com.webobjects.eoaccess.EOAdaptorChannel channel, com.webobjects.eoaccess.EOModel model, java.lang.String itemEntityName, java.lang.String tagsRelationshipName)
           
static void upgrade(com.webobjects.eocontrol.EOEditingContext editingContext, com.webobjects.eoaccess.EOAdaptorChannel channel, com.webobjects.eoaccess.EOModel model, java.lang.String entityName, java.lang.String tagsRelationshipName, java.lang.String tagEntityName)
          If you don't want to subclass ERTaggableEntity0, you can call this static method from your own migration.
 void upgrade(com.webobjects.eocontrol.EOEditingContext editingContext, ERXMigrationDatabase database)
           
 
Methods inherited from class er.extensions.migration.ERXMigrationDatabase.Migration
downgrade, languages, upgrade
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ERTaggableEntity0

public ERTaggableEntity0(java.lang.String entityName)
Constructs an ERTaggableEntity0.

Parameters:
entityName - the name of your entity to tag

ERTaggableEntity0

public ERTaggableEntity0(java.lang.String entityName,
                         java.lang.String tagsRelationshipName)
Constructs an ERTaggableEntity0.

Parameters:
entityName - the name of your entity to tag
tagsRelationshipName - the name of the flattened to-many relationship to ERTag (defaults to "tags")

ERTaggableEntity0

public ERTaggableEntity0(java.lang.String entityName,
                         java.lang.String tagsRelationshipName,
                         java.lang.String tagEntityName)
Constructs an ERTaggableEntity0.

Parameters:
entityName - the name of your entity to tag
tagsRelationshipName - the name of the flattened to-many relationship to ERTag (defaults to "tags")
tagEntityName - the name of the tag entity (defaults to "ERTag")
Method Detail

modelDependencies

public com.webobjects.foundation.NSArray<ERXModelVersion> modelDependencies()
Description copied from class: ERXMigrationDatabase.Migration
Overridden to return null by default

Specified by:
modelDependencies in interface IERXMigration
Overrides:
modelDependencies in class ERXMigrationDatabase.Migration
Returns:
an array of model versions that this migration depends on

downgrade

public void downgrade(com.webobjects.eocontrol.EOEditingContext editingContext,
                      ERXMigrationDatabase database)
               throws java.lang.Throwable
Specified by:
downgrade in class ERXMigrationDatabase.Migration
Parameters:
editingContext - the editing context
database - the migration database
Throws:
java.lang.Throwable - if anything goes wrong
See Also:
IERXMigration.downgrade

upgrade

public void upgrade(com.webobjects.eocontrol.EOEditingContext editingContext,
                    ERXMigrationDatabase database)
             throws java.lang.Throwable
Specified by:
upgrade in class ERXMigrationDatabase.Migration
Parameters:
editingContext - the editing context
database - the migration database
Throws:
java.lang.Throwable - if anything goes wrong
See Also:
IERXMigration.upgrade

upgrade

public static void upgrade(com.webobjects.eocontrol.EOEditingContext editingContext,
                           com.webobjects.eoaccess.EOAdaptorChannel channel,
                           com.webobjects.eoaccess.EOModel model,
                           java.lang.String itemEntityName)
                    throws java.sql.SQLException
Throws:
java.sql.SQLException

upgrade

public static void upgrade(com.webobjects.eocontrol.EOEditingContext editingContext,
                           com.webobjects.eoaccess.EOAdaptorChannel channel,
                           com.webobjects.eoaccess.EOModel model,
                           java.lang.String itemEntityName,
                           java.lang.String tagsRelationshipName)
                    throws java.sql.SQLException
Throws:
java.sql.SQLException

upgrade

public static void upgrade(com.webobjects.eocontrol.EOEditingContext editingContext,
                           com.webobjects.eoaccess.EOAdaptorChannel channel,
                           com.webobjects.eoaccess.EOModel model,
                           java.lang.String entityName,
                           java.lang.String tagsRelationshipName,
                           java.lang.String tagEntityName)
                    throws java.sql.SQLException
If you don't want to subclass ERTaggableEntity0, you can call this static method from your own migration.

Parameters:
editingContext - the editing context
channel - the adaptor channel
model - the model
entityName - the name of your entity to tag
tagsRelationshipName - the name of the flattened to-many relationship to ERTag (defaults to "tags")
tagEntityName - the name of the tag entity (defaults to "ERTag")
Throws:
java.sql.SQLException - if the update script fails

Last updated: Tue, Feb 21, 2017 • 05:45 PM CET

Copyright © 2002 – 2007 Project Wonder.