Package org.utplsql.api.compatibility
Class CompatibilityProxy
- java.lang.Object
-
- org.utplsql.api.compatibility.CompatibilityProxy
-
public class CompatibilityProxy extends Object
Class to check compatibility with database framework and also to give several specific implementations depending on the version of the connected framework. If one skips the compatibility check, the Proxy acts as like the framework has the same version as the API- Author:
- pesse
-
-
Field Summary
Fields Modifier and Type Field Description static StringUTPLSQL_COMPATIBILITY_VERSION
-
Constructor Summary
Constructors Constructor Description CompatibilityProxy(Connection conn)CompatibilityProxy(Connection conn, boolean skipCompatibilityCheck)Deprecated.CompatibilityProxy(Connection conn, boolean skipCompatibilityCheck, DatabaseInformation databaseInformation)Deprecated.CompatibilityProxy(Connection conn, DatabaseInformation databaseInformation)CompatibilityProxy(Connection conn, Version assumedUtPlsVersion)CompatibilityProxy(Connection conn, Version assumedUtPlsqlVersion, DatabaseInformation databaseInformation)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidfailOnNotCompatible()Checks if actual API-version is compatible with utPLSQL database version and throws a DatabaseNotCompatibleException if not Throws a DatabaseNotCompatibleException if version compatibility can not be checked.VersiongetDatabaseVersion()Deprecated.OutputBuffergetOutputBuffer(Reporter reporter, Connection conn)Returns an OutputBuffer compatible with the current frameworkVersiongetRealDbPlsqlVersion()TestRunnerStatementgetTestRunnerStatement(TestRunnerOptions options, Connection conn)Returns a TestRunnerStatement compatible with the current frameworkVersiongetUtPlsqlVersion()StringgetVersionDescription()booleanisCompatible()
-
-
-
Field Detail
-
UTPLSQL_COMPATIBILITY_VERSION
public static final String UTPLSQL_COMPATIBILITY_VERSION
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CompatibilityProxy
public CompatibilityProxy(Connection conn) throws SQLException
- Throws:
SQLException
-
CompatibilityProxy
@Deprecated public CompatibilityProxy(Connection conn, boolean skipCompatibilityCheck) throws SQLException
Deprecated.- Throws:
SQLException
-
CompatibilityProxy
@Deprecated public CompatibilityProxy(Connection conn, boolean skipCompatibilityCheck, @Nullable DatabaseInformation databaseInformation) throws SQLException
Deprecated.- Throws:
SQLException
-
CompatibilityProxy
public CompatibilityProxy(Connection conn, @Nullable DatabaseInformation databaseInformation) throws SQLException
- Throws:
SQLException
-
CompatibilityProxy
public CompatibilityProxy(Connection conn, @Nullable Version assumedUtPlsVersion) throws SQLException
- Throws:
SQLException
-
CompatibilityProxy
public CompatibilityProxy(Connection conn, @Nullable Version assumedUtPlsqlVersion, @Nullable DatabaseInformation databaseInformation) throws SQLException
- Throws:
SQLException
-
-
Method Detail
-
failOnNotCompatible
public void failOnNotCompatible() throws DatabaseNotCompatibleExceptionChecks if actual API-version is compatible with utPLSQL database version and throws a DatabaseNotCompatibleException if not Throws a DatabaseNotCompatibleException if version compatibility can not be checked.- Throws:
DatabaseNotCompatibleException- if versions are not compatible
-
isCompatible
public boolean isCompatible()
-
getDatabaseVersion
@Deprecated public Version getDatabaseVersion()
Deprecated.
-
getUtPlsqlVersion
public Version getUtPlsqlVersion()
-
getRealDbPlsqlVersion
public Version getRealDbPlsqlVersion()
-
getVersionDescription
public String getVersionDescription()
-
getTestRunnerStatement
public TestRunnerStatement getTestRunnerStatement(TestRunnerOptions options, Connection conn) throws SQLException
Returns a TestRunnerStatement compatible with the current framework- Parameters:
options-TestRunnerOptionsconn-Connection- Returns:
- TestRunnerStatement
- Throws:
SQLException- if there are problems with the database access
-
getOutputBuffer
public OutputBuffer getOutputBuffer(Reporter reporter, Connection conn) throws SQLException
Returns an OutputBuffer compatible with the current framework- Parameters:
reporter-Reporterconn-Connection- Returns:
- OutputBuffer
- Throws:
SQLException- if there are problems with the database access
-
-