org.qi4j.migration.assembly
Class EntityMigrationRule

java.lang.Object
  extended by org.qi4j.migration.assembly.AbstractMigrationRule
      extended by org.qi4j.migration.assembly.EntityMigrationRule

public class EntityMigrationRule
extends AbstractMigrationRule

Migration rule for a specific set of entity types


Field Summary
 
Fields inherited from class org.qi4j.migration.assembly.AbstractMigrationRule
fromVersion, toVersion
 
Constructor Summary
EntityMigrationRule(String fromVersion, String toVersion, String[] entityTypes, EntityMigrationOperation operationEntity)
           
 
Method Summary
 boolean appliesTo(String entityType)
           
 boolean downgrade(JSONObject state, StateStore stateStore, Migrator migrator)
           
 String[] getEntityTypes()
           
 String toString()
           
 boolean upgrade(JSONObject state, StateStore stateStore, Migrator migrator)
           
 
Methods inherited from class org.qi4j.migration.assembly.AbstractMigrationRule
fromVersion, toVersion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EntityMigrationRule

public EntityMigrationRule(String fromVersion,
                           String toVersion,
                           String[] entityTypes,
                           EntityMigrationOperation operationEntity)
Method Detail

getEntityTypes

public String[] getEntityTypes()

upgrade

public boolean upgrade(JSONObject state,
                       StateStore stateStore,
                       Migrator migrator)
                throws JSONException
Throws:
JSONException

downgrade

public boolean downgrade(JSONObject state,
                         StateStore stateStore,
                         Migrator migrator)
                  throws JSONException
Throws:
JSONException

appliesTo

public boolean appliesTo(String entityType)

toString

public String toString()
Overrides:
toString in class Object