diff options
author | simonbrandhof <simon.brandhof@gmail.com> | 2010-12-22 19:12:57 +0000 |
---|---|---|
committer | simonbrandhof <simon.brandhof@gmail.com> | 2010-12-22 19:12:57 +0000 |
commit | e8fdc7a09f6356dbcec4a8fd1ab157b0e2097c39 (patch) | |
tree | 1b1c2fc961e20087a7dc5ddb9530ec2c2b7b8344 /sonar-core | |
parent | da01fe793bd8d7b542e358e0a1a98b4313e60b5d (diff) | |
download | sonarqube-e8fdc7a09f6356dbcec4a8fd1ab157b0e2097c39.tar.gz sonarqube-e8fdc7a09f6356dbcec4a8fd1ab157b0e2097c39.zip |
add the server-side component ServerUpgradeStatus to know the database version before starting the server
Diffstat (limited to 'sonar-core')
-rw-r--r-- | sonar-core/src/main/java/org/sonar/jpa/session/AbstractDatabaseConnector.java | 8 | ||||
-rw-r--r-- | sonar-core/src/main/java/org/sonar/jpa/session/DatabaseConnector.java | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/sonar-core/src/main/java/org/sonar/jpa/session/AbstractDatabaseConnector.java b/sonar-core/src/main/java/org/sonar/jpa/session/AbstractDatabaseConnector.java index ac778560a18..9ea59cd7b89 100644 --- a/sonar-core/src/main/java/org/sonar/jpa/session/AbstractDatabaseConnector.java +++ b/sonar-core/src/main/java/org/sonar/jpa/session/AbstractDatabaseConnector.java @@ -88,7 +88,7 @@ public abstract class AbstractDatabaseConnector implements DatabaseConnector { * * @return JDBC transaction isolation */ - public Integer getTransactionIsolation() { + public final Integer getTransactionIsolation() { return transactionIsolation; } @@ -222,15 +222,15 @@ public abstract class AbstractDatabaseConnector implements DatabaseConnector { return databaseVersion == SchemaMigration.LAST_VERSION; } - protected int getDatabaseVersion() { + public final int getDatabaseVersion() { return databaseVersion; } - public Dialect getDialect() { + public final Dialect getDialect() { return dialect; } - public String getDialectClass() { + public final String getDialectClass() { String dialectClass = configuration.getString(DatabaseProperties.PROP_DIALECT_CLASS); if (dialectClass == null && dialect != null) { dialectClass = dialect.getHibernateDialectClass().getName(); diff --git a/sonar-core/src/main/java/org/sonar/jpa/session/DatabaseConnector.java b/sonar-core/src/main/java/org/sonar/jpa/session/DatabaseConnector.java index 952c2529a33..93aa1191504 100644 --- a/sonar-core/src/main/java/org/sonar/jpa/session/DatabaseConnector.java +++ b/sonar-core/src/main/java/org/sonar/jpa/session/DatabaseConnector.java @@ -36,4 +36,6 @@ public interface DatabaseConnector { EntityManager createEntityManager(); + int getDatabaseVersion(); + } |