org.qi4j.migration
Interface Migrator

All Known Implementing Classes:
MigrationService.MigrationMixin

public interface Migrator

The Migrator implements this interface, which is invoked by MigrationOperation implementations to perform changes to EntityState during a version migration.


Method Summary
 boolean addAssociation(JSONObject state, String name, String defaultReference)
           
 boolean addManyAssociation(JSONObject state, String name, String... defaultReference)
           
 boolean addProperty(JSONObject state, String name, String defaultValue)
           
 void changeEntityType(JSONObject state, String newEntityType)
           
 boolean removeAssociation(JSONObject state, String name)
           
 boolean removeManyAssociation(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 renameProperty(JSONObject state, String from, String to)
           
 

Method Detail

addProperty

boolean addProperty(JSONObject state,
                    String name,
                    String defaultValue)
                    throws JSONException
Throws:
JSONException

removeProperty

boolean removeProperty(JSONObject state,
                       String name)
                       throws JSONException
Throws:
JSONException

renameProperty

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

addAssociation

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

removeAssociation

boolean removeAssociation(JSONObject state,
                          String name)
                          throws JSONException
Throws:
JSONException

renameAssociation

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

addManyAssociation

boolean addManyAssociation(JSONObject state,
                           String name,
                           String... defaultReference)
                           throws JSONException
Throws:
JSONException

removeManyAssociation

boolean removeManyAssociation(JSONObject state,
                              String name)
                              throws JSONException
Throws:
JSONException

renameManyAssociation

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

changeEntityType

void changeEntityType(JSONObject state,
                      String newEntityType)
                      throws JSONException
Throws:
JSONException