public final class MigrationVersion extends Object implements Comparable<MigrationVersion>
| 限定符和类型 | 字段和说明 |
|---|---|
static MigrationVersion |
CURRENT
Current version.
|
static MigrationVersion |
EMPTY
Version for an empty schema.
|
static MigrationVersion |
LATEST
Latest version.
|
| 限定符和类型 | 方法和说明 |
|---|---|
int |
compareTo(MigrationVersion o) |
boolean |
equals(Object o) |
static MigrationVersion |
fromVersion(String version)
Create a MigrationVersion from a version String.
|
BigInteger |
getMajor() |
String |
getMajorAsString() |
String |
getMinorAsString() |
String |
getVersion() |
int |
hashCode() |
boolean |
isAtLeast(String otherVersion)
Convenience method for quickly checking whether this version is at least as new as this other version.
|
boolean |
isMajorNewerThan(String otherVersion)
Convenience method for quickly checking whether this major version is newer than this other major version.
|
boolean |
isNewerThan(String otherVersion)
Convenience method for quickly checking whether this version is newer than this other version.
|
String |
toString() |
public static final MigrationVersion EMPTY
public static final MigrationVersion LATEST
public static final MigrationVersion CURRENT
public static MigrationVersion fromVersion(String version)
version - The version String. The value current will be interpreted as MigrationVersion.CURRENT,
a marker for the latest version that has been applied to the database.public String toString()
public String getVersion()
public boolean isAtLeast(String otherVersion)
otherVersion - The other version.true if this version is equal or newer, false if it is older.public boolean isNewerThan(String otherVersion)
otherVersion - The other version.true if this version is newer, false if it is not.public boolean isMajorNewerThan(String otherVersion)
otherVersion - The other version.true if this major version is newer, false if it is not.public BigInteger getMajor()
public String getMajorAsString()
public String getMinorAsString()
public int compareTo(MigrationVersion o)
compareTo 在接口中 Comparable<MigrationVersion>Copyright © 2022. All rights reserved.