public static class MigrationService.MigrationMixin extends Object implements MigrationService, Migrator
MigrationService.Activator, MigrationService.MigrationMixin
Modifier and Type | Field and Description |
---|---|
MigrationBuilder |
builder |
org.slf4j.Logger |
log |
Constructor and Description |
---|
MigrationService.MigrationMixin() |
public MigrationBuilder builder
public org.slf4j.Logger log
public boolean migrate(JSONObject state, String toVersion, StateStore stateStore) throws JSONException
migrate
in interface Migration
JSONException
public void initialize() throws Exception
initialize
in interface MigrationService
Exception
public boolean addProperty(JSONObject state, String name, Object defaultValue) throws JSONException
addProperty
in interface Migrator
JSONException
public boolean removeProperty(JSONObject state, String name) throws JSONException
removeProperty
in interface Migrator
JSONException
public boolean renameProperty(JSONObject state, String from, String to) throws JSONException
renameProperty
in interface Migrator
JSONException
public boolean addAssociation(JSONObject state, String name, String defaultReference) throws JSONException
addAssociation
in interface Migrator
JSONException
public boolean removeAssociation(JSONObject state, String name) throws JSONException
removeAssociation
in interface Migrator
JSONException
public boolean renameAssociation(JSONObject state, String from, String to) throws JSONException
renameAssociation
in interface Migrator
JSONException
public boolean addManyAssociation(JSONObject state, String name, String... defaultReferences) throws JSONException
addManyAssociation
in interface Migrator
JSONException
public boolean removeManyAssociation(JSONObject state, String name) throws JSONException
removeManyAssociation
in interface Migrator
JSONException
public boolean renameManyAssociation(JSONObject state, String from, String to) throws JSONException
renameManyAssociation
in interface Migrator
JSONException
public boolean addNamedAssociation(JSONObject state, String name, Map<String,String> defaultReferences) throws JSONException
addNamedAssociation
in interface Migrator
JSONException
public boolean removeNamedAssociation(JSONObject state, String name) throws JSONException
removeNamedAssociation
in interface Migrator
JSONException
public boolean renameNamedAssociation(JSONObject state, String from, String to) throws JSONException
renameNamedAssociation
in interface Migrator
JSONException
public void changeEntityType(JSONObject state, String newEntityType) throws JSONException
changeEntityType
in interface Migrator
JSONException