public class KittyFileMigrationFactory extends KittyMigrationFactory
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
assetsPath |
protected android.content.Context |
ctx |
protected static java.lang.String |
IA_MESSAGE |
protected static java.lang.String |
LOG_E_IE |
protected static java.lang.String |
LOG_E_IE_A |
protected static java.lang.String |
LOG_I_SKIPPED_MIGRATION |
protected static java.lang.String |
LOG_I_STARTING |
protected static java.lang.String |
LOG_I_STARTING_ASSETS |
protected static java.lang.String |
LOG_W_BAD_MIGRATION_NAME |
protected static java.lang.String |
LOG_W_BAD_MIGRATION_NAME_IA |
protected static java.lang.String |
LOG_W_BOTH_ASSETS_AND_FS_NOT_ALLOWED_A |
protected static java.lang.String |
LOG_W_BOTH_ASSETS_AND_FS_NOT_ALLOWED_F |
protected static java.lang.String |
LOG_W_CANT_READ_OR_DIR |
protected java.io.File |
migrationFile |
protected static java.lang.String |
NPE_FILE_CANT_BE_NULL |
currentVersionFilter, databaseName, IA_FILTER, logOn, logTag, oldVersionFilter
Constructor and Description |
---|
KittyFileMigrationFactory(android.content.Context ctx,
java.lang.String databaseName,
java.lang.String logTag,
boolean logOn) |
Modifier and Type | Method and Description |
---|---|
KittyMigration |
newMigration()
Returns new
KittyMigration instance from provided file if all ok or null if errors
Use logging on if you need to debug it |
KittyFileMigrationFactory |
setMigrationAssetsPath(java.lang.String assetsPath)
Sets assets path to use in this factory with
newMigration() |
KittyFileMigrationFactory |
setMigrationFile(java.io.File f)
Set migration file to use in this factory with
newMigration() |
setVersionFilter
protected static java.lang.String LOG_I_STARTING
protected static java.lang.String LOG_W_BOTH_ASSETS_AND_FS_NOT_ALLOWED_F
protected static java.lang.String LOG_W_BOTH_ASSETS_AND_FS_NOT_ALLOWED_A
protected static java.lang.String LOG_I_STARTING_ASSETS
protected static java.lang.String LOG_W_CANT_READ_OR_DIR
protected static java.lang.String LOG_W_BAD_MIGRATION_NAME
protected static java.lang.String LOG_W_BAD_MIGRATION_NAME_IA
protected static java.lang.String IA_MESSAGE
protected static java.lang.String LOG_I_SKIPPED_MIGRATION
protected static java.lang.String LOG_E_IE
protected static java.lang.String LOG_E_IE_A
protected static java.lang.String NPE_FILE_CANT_BE_NULL
protected java.io.File migrationFile
protected java.lang.String assetsPath
protected final android.content.Context ctx
public KittyFileMigrationFactory(android.content.Context ctx, java.lang.String databaseName, java.lang.String logTag, boolean logOn)
public KittyFileMigrationFactory setMigrationFile(java.io.File f)
newMigration()
f
- migration filepublic KittyFileMigrationFactory setMigrationAssetsPath(java.lang.String assetsPath)
newMigration()
assetsPath
- public KittyMigration newMigration()
KittyMigration
instance from provided file if all ok or null if errors
Use logging on if you need to debug itnewMigration
in class KittyMigrationFactory