Top Description Fields Methods
org.hibernate.dialect

public Interface DatabaseVersion

Known Direct Subinterfaces
org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo
Known Direct Implementers
org.hibernate.dialect.SimpleDatabaseVersion

Details about the underlying database, as understood by a Dialect.
See Also
org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo

Field Summary

Modifier and TypeField and Description
public static final int
NO_VERSION

Constant used to indicate that no version is defined

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

The database major version, or -9999 to indicate "no version information"
getDatabaseMajorVersion
()

Obtain access to the database major version, as returned from java.sql.DatabaseMetaData#getDatabaseMajorVersion() for the target database.

public default int

Returns:

The database minor version, or -9999 to indicate "no version information"
getDatabaseMicroVersion
()

Obtain access to the database minor version, as returned from java.sql.DatabaseMetaData#getDatabaseMinorVersion() for the target database.

public int

Returns:

The database minor version, or -9999 to indicate "no version information"
getDatabaseMinorVersion
()

Obtain access to the database minor version, as returned from java.sql.DatabaseMetaData#getDatabaseMinorVersion() for the target database.

public default int
getMajor()

Simpler naming

public default int
getMicro()

Simpler naming

public default int
getMinor()

Simpler naming

public default boolean
isAfter(DatabaseVersion other)

Determine whether this version comes after the passed one

public default boolean
isAfter(Integer major, Integer minor)

Determine whether this version after the passed one

public default boolean
isAfter(int major)

Determine whether this version after the passed one

public default boolean
isAfter(int major, int minor)

Determine whether this version after the passed one

public default boolean
isAfter(int otherMajor, int otherMinor, int otherMicro)

Determine whether this version after the passed one

public default boolean
isBefore(DatabaseVersion other)

Determine whether this version comes before the passed one

public default boolean
isBefore(int major, int minor)

Determine whether this version before the passed one

public default boolean
isBefore(int major)

Determine whether this version before the passed one

public default boolean
isBefore(Integer major, Integer minor)

Determine whether this version before the passed one

public default boolean
isBefore(int otherMajor, int otherMinor, int otherMicro)

Determine whether this version before the passed one

public default boolean
isSame(DatabaseVersion other)

Determine if the versions are the same/equal.

public default boolean
isSame(int otherMajor)

Determine if this version matches the passed one.

public default boolean
isSame(int otherMajor, int otherMinor)

Determine if this version matches the passed one.

public default boolean
isSame(int otherMajor, int otherMinor, int otherMicro)

Determine if this version matches the passed one.

public default boolean
public default boolean
isSameOrAfter(Integer otherMajor, Integer otherMinor)

isSame or isAfter

public default boolean
isSameOrAfter(int otherMajor)

isSame or isAfter

public default boolean
isSameOrAfter(int otherMajor, int otherMinor)

isSame or isAfter

public default boolean
isSameOrAfter(int otherMajor, int otherMinor, int otherMicro)

isSame or isAfter

public static DatabaseVersion
make(Integer major)

Factory for DatabaseVersion based on major version (minor and micro set to zero)

public static DatabaseVersion
make(Integer major, Integer minor)

Factory for DatabaseVersion based on major and minor version (micro set to zero)

public static DatabaseVersion
make(Integer major, Integer minor, Integer micro)

Factory for DatabaseVersion based on major, minor and micro

public default DatabaseVersion
makeCopy()

Make a simple copy of this version object

public default DatabaseVersion
makeCopy(boolean noVersionAsZero)

Make a copy of this version object, possibly converting NO_VERSION to zero

Field Detail

NO_VERSIONback to summary
public static final int NO_VERSION

Constant used to indicate that no version is defined

Method Detail

getDatabaseMajorVersionback to summary
public int getDatabaseMajorVersion()

Obtain access to the database major version, as returned from java.sql.DatabaseMetaData#getDatabaseMajorVersion() for the target database.

Returns:int

The database major version, or -9999 to indicate "no version information"

See Also
java.sql.DatabaseMetaData#getDatabaseMajorVersion()
getDatabaseMicroVersionback to summary
public default int getDatabaseMicroVersion()

Obtain access to the database minor version, as returned from java.sql.DatabaseMetaData#getDatabaseMinorVersion() for the target database.

Returns:int

The database minor version, or -9999 to indicate "no version information"

See Also
java.sql.DatabaseMetaData#getDatabaseMinorVersion()
getDatabaseMinorVersionback to summary
public int getDatabaseMinorVersion()

Obtain access to the database minor version, as returned from java.sql.DatabaseMetaData#getDatabaseMinorVersion() for the target database.

Returns:int

The database minor version, or -9999 to indicate "no version information"

See Also
java.sql.DatabaseMetaData#getDatabaseMinorVersion()
getMajorback to summary
public default int getMajor()

Simpler naming

See Also
getDatabaseMajorVersion()
getMicroback to summary
public default int getMicro()

Simpler naming

See Also
getDatabaseMicroVersion()
getMinorback to summary
public default int getMinor()

Simpler naming

See Also
getDatabaseMinorVersion()
isAfterback to summary
public default boolean isAfter(DatabaseVersion other)

Determine whether this version comes after the passed one

isAfterback to summary
public default boolean isAfter(Integer major, Integer minor)

Determine whether this version after the passed one

isAfterback to summary
public default boolean isAfter(int major)

Determine whether this version after the passed one

isAfterback to summary
public default boolean isAfter(int major, int minor)

Determine whether this version after the passed one

isAfterback to summary
public default boolean isAfter(int otherMajor, int otherMinor, int otherMicro)

Determine whether this version after the passed one

isBeforeback to summary
public default boolean isBefore(DatabaseVersion other)

Determine whether this version comes before the passed one

isBeforeback to summary
public default boolean isBefore(int major, int minor)

Determine whether this version before the passed one

isBeforeback to summary
public default boolean isBefore(int major)

Determine whether this version before the passed one

isBeforeback to summary
public default boolean isBefore(Integer major, Integer minor)

Determine whether this version before the passed one

isBeforeback to summary
public default boolean isBefore(int otherMajor, int otherMinor, int otherMicro)

Determine whether this version before the passed one

isSameback to summary
public default boolean isSame(DatabaseVersion other)

Determine if the versions are the same/equal.

isSameback to summary
public default boolean isSame(int otherMajor)

Determine if this version matches the passed one.

isSameback to summary
public default boolean isSame(int otherMajor, int otherMinor)

Determine if this version matches the passed one.

isSameback to summary
public default boolean isSame(int otherMajor, int otherMinor, int otherMicro)

Determine if this version matches the passed one.

isSameOrAfterback to summary
public default boolean isSameOrAfter(DatabaseVersion other)

isSame or isAfter

isSameOrAfterback to summary
public default boolean isSameOrAfter(Integer otherMajor, Integer otherMinor)

isSame or isAfter

isSameOrAfterback to summary
public default boolean isSameOrAfter(int otherMajor)

isSame or isAfter

isSameOrAfterback to summary
public default boolean isSameOrAfter(int otherMajor, int otherMinor)

isSame or isAfter

isSameOrAfterback to summary
public default boolean isSameOrAfter(int otherMajor, int otherMinor, int otherMicro)

isSame or isAfter

makeback to summary
public static DatabaseVersion make(Integer major)

Factory for DatabaseVersion based on major version (minor and micro set to zero)

makeback to summary
public static DatabaseVersion make(Integer major, Integer minor)

Factory for DatabaseVersion based on major and minor version (micro set to zero)

makeback to summary
public static DatabaseVersion make(Integer major, Integer minor, Integer micro)

Factory for DatabaseVersion based on major, minor and micro

makeCopyback to summary
public default DatabaseVersion makeCopy()

Make a simple copy of this version object

makeCopyback to summary
public default DatabaseVersion makeCopy(boolean noVersionAsZero)

Make a copy of this version object, possibly converting NO_VERSION to zero