public class VersionManager
extends java.lang.Object
VersionManager
| 限定符和类型 | 字段和说明 |
|---|---|
static java.lang.String |
CURRENT_VERSION_KEY
The Constant CURRENT_VERSION_KEY.
|
static Version |
DEFAULT_INIT_VERSION
The Constant DEFAULT_INIT_VERSION.
|
static java.lang.String |
INIT_VERSION_KEY
The Constant INIT_VERSION_KEY.
|
| 构造器和说明 |
|---|
VersionManager(java.io.File dir,
java.lang.String name,
Migrator migrator)
Instantiates a new version manager.
|
VersionManager(java.io.File dir,
java.lang.String name,
Version initVersion,
Migrator migrator)
Instantiates a new version manager.
|
| 限定符和类型 | 方法和说明 |
|---|---|
java.io.File |
createInitSqlFile(java.lang.String version,
java.util.Set<cn.featherfly.common.repository.mapping.ClassMapping<?>> classMappings)
Creates the init sql file.
|
java.io.File |
createUpdateSqlFile(java.lang.String version,
java.util.Set<cn.featherfly.common.repository.mapping.ClassMapping<?>> classMappings)
Creates the update sql file.
|
java.lang.String |
getCurrentVersion()
Gets the current version.
|
Migrator.ModifyType |
getModifyType()
返回modifyType
|
boolean |
isDropNotExist()
返回dropNotExist
|
java.io.File |
next(java.util.Set<cn.featherfly.common.repository.mapping.ClassMapping<?>> classMappings)
Next.
|
java.io.File |
next(java.util.Set<cn.featherfly.common.repository.mapping.ClassMapping<?>> classMappings,
Version next)
Next.
|
void |
setDropNotExist(boolean dropNotExist)
设置dropNotExist
|
void |
setModifyType(Migrator.ModifyType modifyType)
设置modifyType
|
public static final Version DEFAULT_INIT_VERSION
public static final java.lang.String INIT_VERSION_KEY
public static final java.lang.String CURRENT_VERSION_KEY
public VersionManager(java.io.File dir,
java.lang.String name,
Migrator migrator)
dir - the dirname - the file namemigrator - the migratorpublic java.lang.String getCurrentVersion()
public java.io.File next(java.util.Set<cn.featherfly.common.repository.mapping.ClassMapping<?>> classMappings)
classMappings - the class mappingspublic java.io.File next(java.util.Set<cn.featherfly.common.repository.mapping.ClassMapping<?>> classMappings,
Version next)
classMappings - the class mappingsnext - the nextpublic java.io.File createInitSqlFile(java.lang.String version,
java.util.Set<cn.featherfly.common.repository.mapping.ClassMapping<?>> classMappings)
version - the versionclassMappings - the class mappingspublic java.io.File createUpdateSqlFile(java.lang.String version,
java.util.Set<cn.featherfly.common.repository.mapping.ClassMapping<?>> classMappings)
version - the versionclassMappings - the class mappingspublic boolean isDropNotExist()
public void setDropNotExist(boolean dropNotExist)
dropNotExist - dropNotExistpublic Migrator.ModifyType getModifyType()
public void setModifyType(Migrator.ModifyType modifyType)
modifyType - modifyType