Package io.ebean.migration
Class MigrationVersion
- java.lang.Object
-
- io.ebean.migration.MigrationVersion
-
- All Implemented Interfaces:
Comparable<MigrationVersion>
public class MigrationVersion extends Object implements Comparable<MigrationVersion>
The version of a migration used so that migrations are processed in order.
-
-
Field Summary
Fields Modifier and Type Field Description static StringBOOTINIT_TYPEstatic StringVERSION_TYPE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringasString()Return the trimmed version excluding version comment and un-parsable string.intcompareTo(MigrationVersion other)StringgetComment()Return the version comment.StringgetFull()Return the full version.StringgetRaw()Return the version in raw form.StringgetType()Return the version type (I, R or V).booleanisRepeatable()Return true if this is a "repeatable" version.booleanisRepeatableInit()Return true if this is a "repeatable init" verision.booleanisRepeatableLast()Return true if this is a "repeatable last" verision.StringnextVersion()Return the next version based on this version.Stringnormalised()Return the trimmed version with any underscores replaced with '.'static MigrationVersionparse(String raw)Parse the raw version string into a MigrationVersion.StringtoString()static Stringtrim(String raw)Parse the raw version string and just return the leading version number;
-
-
-
Field Detail
-
BOOTINIT_TYPE
public static final String BOOTINIT_TYPE
- See Also:
- Constant Field Values
-
VERSION_TYPE
public static final String VERSION_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
isRepeatable
public boolean isRepeatable()
Return true if this is a "repeatable" version.
-
isRepeatableInit
public boolean isRepeatableInit()
Return true if this is a "repeatable init" verision.
-
isRepeatableLast
public boolean isRepeatableLast()
Return true if this is a "repeatable last" verision.
-
getComment
public String getComment()
Return the version comment.
-
asString
public String asString()
Return the trimmed version excluding version comment and un-parsable string.
-
normalised
public String normalised()
Return the trimmed version with any underscores replaced with '.'
-
nextVersion
public String nextVersion()
Return the next version based on this version.
-
compareTo
public int compareTo(MigrationVersion other)
- Specified by:
compareToin interfaceComparable<MigrationVersion>
-
trim
public static String trim(String raw)
Parse the raw version string and just return the leading version number;
-
parse
public static MigrationVersion parse(String raw)
Parse the raw version string into a MigrationVersion.
-
-