com.googlecode.flyway.core.api
Class Version

java.lang.Object
  extended by com.googlecode.flyway.core.api.Version
All Implemented Interfaces:
java.lang.Comparable<Version>

public final class Version
extends java.lang.Object
implements java.lang.Comparable<Version>

A version of a database schema.

Author:
Axel Fontaine

Field Summary
static Version EMPTY
          Version for an empty schema.
static Version LATEST
          Latest version.
 
Constructor Summary
Version(java.lang.String version)
          Creates a Version using this version string.
 
Method Summary
 int compareTo(Version o)
           
 boolean equals(java.lang.Object o)
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

EMPTY

public static final Version EMPTY
Version for an empty schema.


LATEST

public static final Version LATEST
Latest version.

Constructor Detail

Version

public Version(java.lang.String version)
Creates a Version using this version string.

Parameters:
version - The version in one of the following formats: 6, 6.0, 005, 1.2.3.4, 201004200021.
null means that this version refers to an empty schema.
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
The version string

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

compareTo

public int compareTo(Version o)
Specified by:
compareTo in interface java.lang.Comparable<Version>


Copyright © 2012. All Rights Reserved.