org.qi4j.migration

## Class MigrationService.MigrationMixin

- java.lang.Object
- - org.qi4j.migration.MigrationService.MigrationMixin

- All Implemented Interfaces:
    MigrationService, Migrator, Migration
  Enclosing interface:
    MigrationService

      public static class MigrationService.MigrationMixin
      extends Object
      implements MigrationService, Migrator

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.qi4j.migration.MigrationService

      `MigrationService.Activator, MigrationService.MigrationMixin`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `MigrationBuilder` | `builder`
    `org.slf4j.Logger` | `log`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MigrationService.MigrationMixin()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `addAssociation(JSONObject state, String name, String defaultReference)`
    `boolean` | `addManyAssociation(JSONObject state, String name, String... defaultReferences)`
    `boolean` | `addNamedAssociation(JSONObject state, String name, Map<String,String> defaultReferences)`
    `boolean` | `addProperty(JSONObject state, String name, Object defaultValue)`
    `void` | `changeEntityType(JSONObject state, String newEntityType)`
    `void` | `initialize()`
    `boolean` | `migrate(JSONObject state, String toVersion, StateStore stateStore)`
    `boolean` | `removeAssociation(JSONObject state, String name)`
    `boolean` | `removeManyAssociation(JSONObject state, String name)`
    `boolean` | `removeNamedAssociation(JSONObject state, String name)`
    `boolean` | `removeProperty(JSONObject state, String name)`
    `boolean` | `renameAssociation(JSONObject state, String from, String to)`
    `boolean` | `renameManyAssociation(JSONObject state, String from, String to)`
    `boolean` | `renameNamedAssociation(JSONObject state, String from, String to)`
    `boolean` | `renameProperty(JSONObject state, String from, String to)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### builder

          public MigrationBuilder builder

    - #### log

          public org.slf4j.Logger log

  - ### Constructor Detail

    - #### MigrationService.MigrationMixin

          public MigrationService.MigrationMixin()

  - ### Method Detail

    - #### migrate

          public boolean migrate(JSONObject state,
                        String toVersion,
                        StateStore stateStore)
                          throws JSONException

      Specified by:
        `migrate` in interface `Migration`
      Throws:
        `JSONException`

    - #### initialize

          public void initialize()
                          throws Exception

      Specified by:
        `initialize` in interface `MigrationService`
      Throws:
        `Exception`

    - #### addProperty

          public boolean addProperty(JSONObject state,
                            String name,
                            Object defaultValue)
                              throws JSONException

      Specified by:
        `addProperty` in interface `Migrator`
      Throws:
        `JSONException`

    - #### removeProperty

          public boolean removeProperty(JSONObject state,
                               String name)
                                 throws JSONException

      Specified by:
        `removeProperty` in interface `Migrator`
      Throws:
        `JSONException`

    - #### renameProperty

          public boolean renameProperty(JSONObject state,
                               String from,
                               String to)
                                 throws JSONException

      Specified by:
        `renameProperty` in interface `Migrator`
      Throws:
        `JSONException`

    - #### addAssociation

          public boolean addAssociation(JSONObject state,
                               String name,
                               String defaultReference)
                                 throws JSONException

      Specified by:
        `addAssociation` in interface `Migrator`
      Throws:
        `JSONException`

    - #### removeAssociation

          public boolean removeAssociation(JSONObject state,
                                  String name)
                                    throws JSONException

      Specified by:
        `removeAssociation` in interface `Migrator`
      Throws:
        `JSONException`

    - #### renameAssociation

          public boolean renameAssociation(JSONObject state,
                                  String from,
                                  String to)
                                    throws JSONException

      Specified by:
        `renameAssociation` in interface `Migrator`
      Throws:
        `JSONException`

    - #### addManyAssociation

          public boolean addManyAssociation(JSONObject state,
                                   String name,
                                   String... defaultReferences)
                                     throws JSONException

      Specified by:
        `addManyAssociation` in interface `Migrator`
      Throws:
        `JSONException`

    - #### removeManyAssociation

          public boolean removeManyAssociation(JSONObject state,
                                      String name)
                                        throws JSONException

      Specified by:
        `removeManyAssociation` in interface `Migrator`
      Throws:
        `JSONException`

    - #### renameManyAssociation

          public boolean renameManyAssociation(JSONObject state,
                                      String from,
                                      String to)
                                        throws JSONException

      Specified by:
        `renameManyAssociation` in interface `Migrator`
      Throws:
        `JSONException`

    - #### addNamedAssociation

          public boolean addNamedAssociation(JSONObject state,
                                    String name,
                                    Map<String,String> defaultReferences)
                                      throws JSONException

      Specified by:
        `addNamedAssociation` in interface `Migrator`
      Throws:
        `JSONException`

    - #### removeNamedAssociation

          public boolean removeNamedAssociation(JSONObject state,
                                       String name)
                                         throws JSONException

      Specified by:
        `removeNamedAssociation` in interface `Migrator`
      Throws:
        `JSONException`

    - #### renameNamedAssociation

          public boolean renameNamedAssociation(JSONObject state,
                                       String from,
                                       String to)
                                         throws JSONException

      Specified by:
        `renameNamedAssociation` in interface `Migrator`
      Throws:
        `JSONException`

    - #### changeEntityType

          public void changeEntityType(JSONObject state,
                              String newEntityType)
                                throws JSONException

      Specified by:
        `changeEntityType` in interface `Migrator`
      Throws:
        `JSONException`