public class IndexMigrator extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
IndexMigrator.Result
Migration result.
|
| Constructor and Description |
|---|
IndexMigrator(Entity entity,
Index index,
Backend backend,
IndexMetaData indexMetaData)
Creates a migrator.
|
| Modifier and Type | Method and Description |
|---|---|
Backend |
getBackend()
Gets the backend.
|
Index |
getIndex()
Gets the index to migrate.
|
IndexMetaData |
getIndexMetaData()
Gets the index metadata.
|
static boolean |
isLogicallyDifferent(Index modelIndex,
IndexMetaData dbIndex,
StringBuilder commentBuf)
Compares an model index with an existing database index.
|
IndexMigrator.Result |
migrate()
Migrates the index.
|
public IndexMigrator(Entity entity, Index index, Backend backend, IndexMetaData indexMetaData)
entity - the entityindex - the index to migrate, null if no such index in modelbackend - the backendindexMetaData - the foreign meta data, null if key does not existpublic Backend getBackend()
public Index getIndex()
public IndexMetaData getIndexMetaData()
public IndexMigrator.Result migrate()
public static boolean isLogicallyDifferent(Index modelIndex, IndexMetaData dbIndex, StringBuilder commentBuf)
modelIndex - the index as defined in the modeldbIndex - the index existing in the databasecommentBuf - comment buffer to show the difference, null if noneTentackle - distributed, domain- and model-driven