org.qi4j.migration.assembly

## Class EntityMigrationRule

- java.lang.Object
- - org.qi4j.migration.assembly.AbstractMigrationRule
  - - 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

    Constructors
    Constructor and Description
    `EntityMigrationRule(String fromVersion, String toVersion, String[] entityTypes, EntityMigrationOperation operationEntity)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `appliesTo(String entityType)`
    `boolean` | `downgrade(JSONObject state, StateStore stateStore, Migrator migrator)`
    `String[]` | `entityTypes()`
    `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

    - #### entityTypes

          public String[] entityTypes()

    - #### 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`