Class ReflectiveVersionMigrationScript<T,E>
- java.lang.Object
-
- software.xdev.micromigration.scripts.ReflectiveVersionMigrationScript<T,E>
-
- All Implemented Interfaces:
MigrationScript<T,E>
public abstract class ReflectiveVersionMigrationScript<T,E> extends java.lang.Object implements MigrationScript<T,E>
Script which creates the target version of the script through the class name.Class name has to be in the scheme:
vM_Classname
Where
vM_m_Classname
vM_m_m_Classname
v
is short for version and is a constant (just a char),
M
is a integer for the major version,
m
is a integer for the minor version
Classname
is a custom String that the user can choose.
This scheme can basically be extended infinetly. For example:v1_1_2_2_MyUpdateScript
Therefore the character
_
can only be used as a seperator of versions and may not be used for other purposes.If the class name has the wrong format, an
Error
is thrown.- Author:
- Johannes Rabauer
-
-
Field Summary
-
Fields inherited from interface software.xdev.micromigration.scripts.MigrationScript
COMPARATOR
-
-
Constructor Summary
Constructors Constructor Description ReflectiveVersionMigrationScript()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MigrationVersion
getTargetVersion()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface software.xdev.micromigration.scripts.MigrationScript
migrate
-
-
-
-
Method Detail
-
getTargetVersion
public MigrationVersion getTargetVersion()
- Specified by:
getTargetVersion
in interfaceMigrationScript<T,E>
- Returns:
- the version of the datastore after this script is executed.
-
-