Skip to content
Snippets Groups Projects
Commit 18f9dfb5 authored by felmer's avatar felmer
Browse files

back to a previous version without version attribute

SVN: 2383
parent 484ebb0a
No related branches found
No related tags found
No related merge requests found
...@@ -33,8 +33,6 @@ import ch.systemsx.cisd.common.exceptions.ConfigurationFailureException; ...@@ -33,8 +33,6 @@ import ch.systemsx.cisd.common.exceptions.ConfigurationFailureException;
*/ */
public class DatabaseConfigurationContext public class DatabaseConfigurationContext
{ {
private String databaseVersion;
private String driver; private String driver;
private LobHandler lobHandler; private LobHandler lobHandler;
...@@ -134,36 +132,6 @@ public class DatabaseConfigurationContext ...@@ -134,36 +132,6 @@ public class DatabaseConfigurationContext
return adminDataSource; return adminDataSource;
} }
/**
* Returns the database version which should be used. If not set by {@link #setDatabaseVersion(String)} or
* does not start with a digit <code>defaultDatabaseVersion</code> will be returned.
*
* @throws ConfigurationFailureException if the database version is beyound the default one.
*/
public final String getDatabaseVersion(String defaultDatabaseVersion)
{
if (isValidDatabaseVersion(databaseVersion) == false)
{
return defaultDatabaseVersion;
}
if (databaseVersion.compareTo(defaultDatabaseVersion) > 0)
{
throw new ConfigurationFailureException("Database version " + databaseVersion
+ " is not supported. Latest supported database version is " + defaultDatabaseVersion);
}
return databaseVersion;
}
private boolean isValidDatabaseVersion(String version)
{
return version != null && version.length() > 0 && Character.isDigit(version.charAt(0));
}
public final void setDatabaseVersion(String databaseVersion)
{
this.databaseVersion = databaseVersion;
}
/** /**
* Returns the user name of the owner of the database. * Returns the user name of the owner of the database.
*/ */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment