Package org.hibernate.dialect
Class SimpleDatabaseVersion
- java.lang.Object
-
- org.hibernate.dialect.SimpleDatabaseVersion
-
- All Implemented Interfaces:
DatabaseVersion
public class SimpleDatabaseVersion extends Object implements DatabaseVersion
Simple version of DatabaseVersion
-
-
Field Summary
Fields Modifier and Type Field Description static SimpleDatabaseVersion
ZERO_VERSION
-
Fields inherited from interface org.hibernate.dialect.DatabaseVersion
NO_VERSION
-
-
Constructor Summary
Constructors Constructor Description SimpleDatabaseVersion(int major, int minor)
SimpleDatabaseVersion(int major, int minor, int micro)
SimpleDatabaseVersion(Integer major, Integer minor)
SimpleDatabaseVersion(DatabaseVersion copySource)
SimpleDatabaseVersion(DatabaseVersion version, boolean noVersionAsZero)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getDatabaseMajorVersion()
Obtain access to the database major version, as returned fromDatabaseMetaData.getDatabaseMajorVersion()
for the target database.int
getDatabaseMicroVersion()
Obtain access to the database minor version, as returned fromDatabaseMetaData.getDatabaseMinorVersion()
for the target database.int
getDatabaseMinorVersion()
Obtain access to the database minor version, as returned fromDatabaseMetaData.getDatabaseMinorVersion()
for the target database.int
getMajor()
Simpler namingint
getMicro()
Simpler namingint
getMinor()
Simpler namingString
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.hibernate.dialect.DatabaseVersion
isAfter, isAfter, isAfter, isAfter, isAfter, isBefore, isBefore, isBefore, isBefore, isBefore, isSame, isSame, isSame, isSame, isSameOrAfter, isSameOrAfter, isSameOrAfter, isSameOrAfter, isSameOrAfter, makeCopy, makeCopy, makeCopyOrDefault
-
-
-
-
Field Detail
-
ZERO_VERSION
public static final SimpleDatabaseVersion ZERO_VERSION
-
-
Constructor Detail
-
SimpleDatabaseVersion
public SimpleDatabaseVersion(DatabaseVersion copySource)
-
SimpleDatabaseVersion
public SimpleDatabaseVersion(DatabaseVersion version, boolean noVersionAsZero)
-
SimpleDatabaseVersion
public SimpleDatabaseVersion(int major, int minor)
-
SimpleDatabaseVersion
public SimpleDatabaseVersion(int major, int minor, int micro)
-
-
Method Detail
-
getDatabaseMajorVersion
public int getDatabaseMajorVersion()
Description copied from interface:DatabaseVersion
Obtain access to the database major version, as returned fromDatabaseMetaData.getDatabaseMajorVersion()
for the target database.- Specified by:
getDatabaseMajorVersion
in interfaceDatabaseVersion
- Returns:
- The database major version, or -9999 to indicate "no version information"
- See Also:
DatabaseMetaData.getDatabaseMajorVersion()
-
getDatabaseMinorVersion
public int getDatabaseMinorVersion()
Description copied from interface:DatabaseVersion
Obtain access to the database minor version, as returned fromDatabaseMetaData.getDatabaseMinorVersion()
for the target database.- Specified by:
getDatabaseMinorVersion
in interfaceDatabaseVersion
- Returns:
- The database minor version, or -9999 to indicate "no version information"
- See Also:
DatabaseMetaData.getDatabaseMinorVersion()
-
getDatabaseMicroVersion
public int getDatabaseMicroVersion()
Description copied from interface:DatabaseVersion
Obtain access to the database minor version, as returned fromDatabaseMetaData.getDatabaseMinorVersion()
for the target database.- Specified by:
getDatabaseMicroVersion
in interfaceDatabaseVersion
- Returns:
- The database minor version, or -9999 to indicate "no version information"
- See Also:
DatabaseMetaData.getDatabaseMinorVersion()
-
getMajor
public int getMajor()
Description copied from interface:DatabaseVersion
Simpler naming- Specified by:
getMajor
in interfaceDatabaseVersion
- See Also:
DatabaseVersion.getDatabaseMajorVersion()
-
getMinor
public int getMinor()
Description copied from interface:DatabaseVersion
Simpler naming- Specified by:
getMinor
in interfaceDatabaseVersion
- See Also:
DatabaseVersion.getDatabaseMinorVersion()
-
getMicro
public int getMicro()
Description copied from interface:DatabaseVersion
Simpler naming- Specified by:
getMicro
in interfaceDatabaseVersion
- See Also:
DatabaseVersion.getDatabaseMicroVersion()
-
-