org.qi4j.migration
Class MigrationService.MigrationMixin

java.lang.Object
  extended by org.qi4j.migration.MigrationService.MigrationMixin
All Implemented Interfaces:
Composite, Identity, ServiceComposite, MigrationService, Migrator, Migration
Enclosing interface:
MigrationService

public abstract static class MigrationService.MigrationMixin
extends java.lang.Object
implements MigrationService, Migrator


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.qi4j.migration.MigrationService
MigrationService.Activator, MigrationService.MigrationMixin
 
Nested classes/interfaces inherited from interface org.qi4j.api.entity.Identity
Identity.IdentityMixin
 
Field Summary
 MigrationBuilder builder
           
 org.slf4j.Logger log
           
 
Constructor Summary
MigrationService.MigrationMixin()
           
 
Method Summary
 boolean addAssociation(org.json.JSONObject state, java.lang.String name, java.lang.String defaultReference)
           
 boolean addManyAssociation(org.json.JSONObject state, java.lang.String name, java.lang.String... defaultReferences)
           
 boolean addProperty(org.json.JSONObject state, java.lang.String name, java.lang.Object defaultValue)
           
 void changeEntityType(org.json.JSONObject state, java.lang.String newEntityType)
           
 void initialize()
           
 boolean migrate(org.json.JSONObject state, java.lang.String toVersion, StateStore stateStore)
           
 boolean removeAssociation(org.json.JSONObject state, java.lang.String name)
           
 boolean removeManyAssociation(org.json.JSONObject state, java.lang.String name)
           
 boolean removeProperty(org.json.JSONObject state, java.lang.String name)
           
 boolean renameAssociation(org.json.JSONObject state, java.lang.String from, java.lang.String to)
           
 boolean renameManyAssociation(org.json.JSONObject state, java.lang.String from, java.lang.String to)
           
 boolean renameProperty(org.json.JSONObject state, java.lang.String from, java.lang.String to)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.qi4j.api.entity.Identity
identity
 

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(org.json.JSONObject state,
                       java.lang.String toVersion,
                       StateStore stateStore)
                throws org.json.JSONException
Specified by:
migrate in interface Migration
Throws:
org.json.JSONException

initialize

public void initialize()
                throws java.lang.Exception
Specified by:
initialize in interface MigrationService
Throws:
java.lang.Exception

addProperty

public boolean addProperty(org.json.JSONObject state,
                           java.lang.String name,
                           java.lang.Object defaultValue)
                    throws org.json.JSONException
Specified by:
addProperty in interface Migrator
Throws:
org.json.JSONException

removeProperty

public boolean removeProperty(org.json.JSONObject state,
                              java.lang.String name)
                       throws org.json.JSONException
Specified by:
removeProperty in interface Migrator
Throws:
org.json.JSONException

renameProperty

public boolean renameProperty(org.json.JSONObject state,
                              java.lang.String from,
                              java.lang.String to)
                       throws org.json.JSONException
Specified by:
renameProperty in interface Migrator
Throws:
org.json.JSONException

addAssociation

public boolean addAssociation(org.json.JSONObject state,
                              java.lang.String name,
                              java.lang.String defaultReference)
                       throws org.json.JSONException
Specified by:
addAssociation in interface Migrator
Throws:
org.json.JSONException

removeAssociation

public boolean removeAssociation(org.json.JSONObject state,
                                 java.lang.String name)
                          throws org.json.JSONException
Specified by:
removeAssociation in interface Migrator
Throws:
org.json.JSONException

renameAssociation

public boolean renameAssociation(org.json.JSONObject state,
                                 java.lang.String from,
                                 java.lang.String to)
                          throws org.json.JSONException
Specified by:
renameAssociation in interface Migrator
Throws:
org.json.JSONException

addManyAssociation

public boolean addManyAssociation(org.json.JSONObject state,
                                  java.lang.String name,
                                  java.lang.String... defaultReferences)
                           throws org.json.JSONException
Specified by:
addManyAssociation in interface Migrator
Throws:
org.json.JSONException

removeManyAssociation

public boolean removeManyAssociation(org.json.JSONObject state,
                                     java.lang.String name)
                              throws org.json.JSONException
Specified by:
removeManyAssociation in interface Migrator
Throws:
org.json.JSONException

renameManyAssociation

public boolean renameManyAssociation(org.json.JSONObject state,
                                     java.lang.String from,
                                     java.lang.String to)
                              throws org.json.JSONException
Specified by:
renameManyAssociation in interface Migrator
Throws:
org.json.JSONException

changeEntityType

public void changeEntityType(org.json.JSONObject state,
                             java.lang.String newEntityType)
                      throws org.json.JSONException
Specified by:
changeEntityType in interface Migrator
Throws:
org.json.JSONException