Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
e438c4af
Commit
e438c4af
authored
17 years ago
by
felmer
Browse files
Options
Downloads
Patches
Plain Diff
new attribute 'databaseVersion'
SVN: 2347
parent
78e3ab68
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dbmigration/source/java/ch/systemsx/cisd/dbmigration/DatabaseConfigurationContext.java
+27
-0
27 additions, 0 deletions
...stemsx/cisd/dbmigration/DatabaseConfigurationContext.java
with
27 additions
and
0 deletions
dbmigration/source/java/ch/systemsx/cisd/dbmigration/DatabaseConfigurationContext.java
+
27
−
0
View file @
e438c4af
...
@@ -33,6 +33,8 @@ import ch.systemsx.cisd.common.exceptions.ConfigurationFailureException;
...
@@ -33,6 +33,8 @@ 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
;
...
@@ -132,6 +134,31 @@ public class DatabaseConfigurationContext
...
@@ -132,6 +134,31 @@ public class DatabaseConfigurationContext
return
adminDataSource
;
return
adminDataSource
;
}
}
/**
* Returns the database version which should be used. If not set by {@link #setDatabaseVersion(String)}
* <code>defaultDatabaseVersion</code> will be returned.
*
* @throws ConfigurationFailureException if the database version is beyound the default one.
*/
public
final
String
getDatabaseVersion
(
String
defaultDatabaseVersion
)
{
if
(
databaseVersion
==
null
)
{
return
defaultDatabaseVersion
;
}
if
(
databaseVersion
.
compareTo
(
defaultDatabaseVersion
)
>
0
)
{
throw
new
ConfigurationFailureException
(
"Database version "
+
databaseVersion
+
" is not supported. Latest supported database version is "
+
defaultDatabaseVersion
);
}
return
databaseVersion
;
}
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.
*/
*/
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment