Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrbrooks2010-07-24 13:38:31 -0400
committerrbrooks2010-07-24 13:38:31 -0400
commit4081f04850d3eff9eb1bd7241763707bfbb43a45 (patch)
tree258620df94d4b24077ff103a6c4dea9cb78493fb /plugins/org.eclipse.osee.framework.database
parent4ed8bddc791fda93940f238c5135556a07041dc0 (diff)
downloadorg.eclipse.osee-4081f04850d3eff9eb1bd7241763707bfbb43a45.tar.gz
org.eclipse.osee-4081f04850d3eff9eb1bd7241763707bfbb43a45.tar.xz
org.eclipse.osee-4081f04850d3eff9eb1bd7241763707bfbb43a45.zip
applied Eclipse source cleanup
Diffstat (limited to 'plugins/org.eclipse.osee.framework.database')
-rw-r--r--plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/ConnectionHandler.java10
-rw-r--r--plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/IDbConnectionInformationContributor.java1
-rw-r--r--plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/IDbTransactionWork.java4
-rw-r--r--plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/IOseeStatement.java13
-rw-r--r--plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/JoinUtility.java25
-rw-r--r--plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/OseeConnection.java3
-rw-r--r--plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/OseeSql.java13
-rw-r--r--plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/Activator.java4
-rw-r--r--plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/DatabaseInfoProvider.java4
-rw-r--r--plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/core/OseeConnectionPoolImpl.java2
-rw-r--r--plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/core/OseeDatabaseServiceImpl.java8
-rw-r--r--plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/core/OseeSequenceImpl.java29
-rw-r--r--plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/core/OseeStatementImpl.java2
-rw-r--r--plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/core/StatementUtil.java6
-rw-r--r--plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/parser/DbConfigParser.java6
-rw-r--r--plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/parser/DbConnectionData.java9
-rw-r--r--plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/parser/DbDetailData.java12
-rw-r--r--plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/parser/DbSetupData.java8
-rw-r--r--plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/operation/ConsolidateArtifactVersionTxOperation.java41
-rw-r--r--plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/operation/InvalidTxCurrentsAndModTypes.java14
20 files changed, 127 insertions, 87 deletions
diff --git a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/ConnectionHandler.java b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/ConnectionHandler.java
index d4e8381dc18..380b345d284 100644
--- a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/ConnectionHandler.java
+++ b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/ConnectionHandler.java
@@ -22,7 +22,7 @@ import org.eclipse.osee.framework.database.internal.Activator;
/**
* Handles connection recovery in the event of database connection being lost
- *
+ *
* @author Jeff C. Phillips
*/
public final class ConnectionHandler {
@@ -63,7 +63,7 @@ public final class ConnectionHandler {
/**
* This method should only be used when not contained in a DB transaction
- *
+ *
* @param query
* @param data
* @return number of records updated
@@ -75,7 +75,7 @@ public final class ConnectionHandler {
/**
* This method should only be used when not contained in a DB transaction
- *
+ *
* @param query
* @param dataList
* @return number of records updated
@@ -87,7 +87,7 @@ public final class ConnectionHandler {
/**
* This method should only be used when contained in a DB transaction
- *
+ *
* @param connection
* @param query
* @param data
@@ -162,7 +162,7 @@ public final class ConnectionHandler {
/**
* Cause constraint checking to be deferred until the end of the current transaction.
- *
+ *
* @param connection
* @throws OseeDataStoreException
*/
diff --git a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/IDbConnectionInformationContributor.java b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/IDbConnectionInformationContributor.java
index 78f5e7e514a..66ab251803f 100644
--- a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/IDbConnectionInformationContributor.java
+++ b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/IDbConnectionInformationContributor.java
@@ -13,7 +13,6 @@ package org.eclipse.osee.framework.database.core;
import org.eclipse.osee.framework.core.data.IDatabaseInfo;
-
/**
* @author Andrew M. Finkbeiner
*/
diff --git a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/IDbTransactionWork.java b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/IDbTransactionWork.java
index d70eeff18ad..d40bcd682c5 100644
--- a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/IDbTransactionWork.java
+++ b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/IDbTransactionWork.java
@@ -13,6 +13,7 @@ package org.eclipse.osee.framework.database.core;
import org.eclipse.osee.framework.core.data.Named;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
+
/**
* @author Roberto E. Escobar
* @author Jeff C. Phillips
@@ -38,8 +39,7 @@ public interface IDbTransactionWork extends Named {
void handleTxException(Exception ex);
/**
- * This convenience method is provided in case child classes have a portion of code that needs to execute always
- * at
+ * This convenience method is provided in case child classes have a portion of code that needs to execute always at
* the end of the transaction, regardless of exceptions. <br/>
* <b>Override to add additional code to finally block</b>
*
diff --git a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/IOseeStatement.java b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/IOseeStatement.java
index cd2fc79acd3..78cf222f9b7 100644
--- a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/IOseeStatement.java
+++ b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/IOseeStatement.java
@@ -28,7 +28,7 @@ public interface IOseeStatement extends Closeable {
/**
* @param fetchSize hint as to the number of rows that should be fetched from the database at a time. will be limited
- * to 10,000
+ * to 10,000
* @param query
* @param data
* @throws OseeDataStoreException
@@ -38,7 +38,7 @@ public interface IOseeStatement extends Closeable {
/**
* Invokes a stored procedure parameters of type SQL3DataType are registered as Out parameters and all others are set
* as in parameters
- *
+ *
* @param query
* @param data
* @throws OseeDataStoreException
@@ -51,6 +51,7 @@ public interface IOseeStatement extends Closeable {
* The application must call close when it is done using this object; however, it is safe to use this same object
* multiple times, for example calling runPreparedQuery() repeatedly, without any intermediate calls to close
*/
+ @Override
void close();
InputStream getBinaryStream(String columnName) throws OseeDataStoreException;
@@ -90,7 +91,7 @@ public interface IOseeStatement extends Closeable {
/**
* Returns the number of rows in the result set. Once this method returns the result set will be pointing to the last
* row
- *
+ *
* @return the number of rows in the result set
* @throws OseeDataStoreException
*/
@@ -102,7 +103,7 @@ public interface IOseeStatement extends Closeable {
/**
* should not be used by application code because it is less readable than using the column name
- *
+ *
* @param columnIndex
* @return value
* @throws OseeDataStoreException
@@ -113,7 +114,7 @@ public interface IOseeStatement extends Closeable {
/**
* should not be used by application code because it is less readable than using the column name
- *
+ *
* @param columnIndex
* @return value
* @throws OseeDataStoreException
@@ -122,7 +123,7 @@ public interface IOseeStatement extends Closeable {
/**
* should not be used by application code because it is less readable than using the column name
- *
+ *
* @param columnIndex
* @return value
* @throws OseeDataStoreException
diff --git a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/JoinUtility.java b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/JoinUtility.java
index 01d18376efd..47bfec91e9c 100644
--- a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/JoinUtility.java
+++ b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/JoinUtility.java
@@ -27,24 +27,24 @@ import org.eclipse.osee.framework.jdk.core.util.time.GlobalTime;
public class JoinUtility {
private static final String INSERT_INTO_JOIN_ARTIFACT =
- "INSERT INTO osee_join_artifact (query_id, insert_time, art_id, branch_id) VALUES (?, ?, ?, ?)";
+ "INSERT INTO osee_join_artifact (query_id, insert_time, art_id, branch_id) VALUES (?, ?, ?, ?)";
private static final String INSERT_INTO_JOIN_TRANSACTION =
- "INSERT INTO osee_join_transaction (query_id, insert_time, gamma_id, transaction_id) VALUES (?, ?, ?, ?)";
+ "INSERT INTO osee_join_transaction (query_id, insert_time, gamma_id, transaction_id) VALUES (?, ?, ?, ?)";
private static final String INSERT_INTO_JOIN_SEARCH_TAGS =
- "INSERT INTO osee_join_search_tags (query_id, insert_time, coded_tag_id) VALUES (?, ?, ?)";
+ "INSERT INTO osee_join_search_tags (query_id, insert_time, coded_tag_id) VALUES (?, ?, ?)";
private static final String INSERT_INTO_TAG_GAMMA_QUEUE =
- "INSERT INTO osee_tag_gamma_queue (query_id, insert_time, gamma_id) VALUES (?, ?, ?)";
+ "INSERT INTO osee_tag_gamma_queue (query_id, insert_time, gamma_id) VALUES (?, ?, ?)";
private static final String INSERT_INTO_JOIN_EXPORT_IMPORT =
- "INSERT INTO osee_join_export_import (query_id, insert_time, id1, id2) VALUES (?, ?, ?, ?)";
+ "INSERT INTO osee_join_export_import (query_id, insert_time, id1, id2) VALUES (?, ?, ?, ?)";
private static final String INSERT_INTO_JOIN_ID =
- "INSERT INTO osee_join_id (query_id, insert_time, id) VALUES (?, ?, ?)";
+ "INSERT INTO osee_join_id (query_id, insert_time, id) VALUES (?, ?, ?)";
private static final String INSERT_INTO_JOIN_CLEANUP =
- "INSERT INTO osee_join_cleanup (query_id, table_name, session_id) VALUES (?, ?, ?)";
+ "INSERT INTO osee_join_cleanup (query_id, table_name, session_id) VALUES (?, ?, ?)";
private static final String INSERT_INTO_JOIN_CHAR_ID = "INSERT INTO osee_join_char_id (query_id, id) VALUES (?, ?)";
@@ -58,7 +58,7 @@ public class JoinUtility {
private static final String DELETE_FROM_JOIN_CHAR_ID = "DELETE FROM osee_join_char_id WHERE query_id =?";
private static final String SELECT_TAG_GAMMA_QUEUE_QUERIES = "select DISTINCT query_id from osee_tag_gamma_queue";
private static final Random random = new Random();
-
+
public enum JoinItem {
TRANSACTION(INSERT_INTO_JOIN_TRANSACTION, DELETE_FROM_JOIN_TRANSACTION),
ARTIFACT(INSERT_INTO_JOIN_ARTIFACT, DELETE_FROM_JOIN_ARTIFACT),
@@ -181,7 +181,7 @@ public class JoinUtility {
ConnectionHandler.runBatchUpdate(connection, joinItem.getInsertSql(), data);
if (sessionId != null) {
Activator.getInstance().getOseeDatabaseService().runPreparedUpdate(connection, INSERT_INTO_JOIN_CLEANUP,
- getQueryId(), getJoinTableName(), sessionId);
+ getQueryId(), getJoinTableName(), sessionId);
}
this.storedSize = this.entries.size();
this.wasStored = true;
@@ -232,6 +232,7 @@ public class JoinUtility {
private interface IJoinRow {
public Object[] toArray();
+ @Override
public String toString();
}
@@ -244,6 +245,7 @@ public class JoinUtility {
this.id = id;
}
+ @Override
public Object[] toArray() {
return new Object[] {getQueryId(), getInsertTime(), id};
}
@@ -296,6 +298,7 @@ public class JoinUtility {
this.transactionId = transactionId;
}
+ @Override
public Object[] toArray() {
return new Object[] {getQueryId(), getInsertTime(), gammaId, transactionId};
}
@@ -348,6 +351,7 @@ public class JoinUtility {
this.branchId = branchId;
}
+ @Override
public Object[] toArray() {
return new Object[] {getQueryId(), getInsertTime(), artId, branchId};
}
@@ -398,6 +402,7 @@ public class JoinUtility {
this.value = value;
}
+ @Override
public Object[] toArray() {
return new Object[] {getQueryId(), getInsertTime(), value};
}
@@ -448,6 +453,7 @@ public class JoinUtility {
this.gammaId = gammaId;
}
+ @Override
public Object[] toArray() {
return new Object[] {getQueryId(), getInsertTime(), gammaId};
}
@@ -500,6 +506,7 @@ public class JoinUtility {
this.id2 = id2;
}
+ @Override
public Object[] toArray() {
return new Object[] {getQueryId(), getInsertTime(), id1, id2};
}
diff --git a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/OseeConnection.java b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/OseeConnection.java
index ac1e8838caa..da00695b41b 100644
--- a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/OseeConnection.java
+++ b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/OseeConnection.java
@@ -15,12 +15,13 @@ import java.sql.DatabaseMetaData;
import java.sql.SQLException;
import org.eclipse.osee.framework.core.exception.OseeDataStoreException;
-public abstract class OseeConnection implements Closeable{
+public abstract class OseeConnection implements Closeable {
protected OseeConnection() {
}
+ @Override
public abstract void close();
public abstract boolean isClosed() throws OseeDataStoreException;
diff --git a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/OseeSql.java b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/OseeSql.java
index f77e1379751..a6d334a03e4 100644
--- a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/OseeSql.java
+++ b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/OseeSql.java
@@ -64,9 +64,8 @@ public enum OseeSql {
CHANGE_TX_MODIFYING("SELECT arj.art_id, arj.branch_id, txs.transaction_id from osee_join_artifact arj, osee_artifact art, osee_txs txs, osee_branch br where arj.query_id = ? AND arj.art_id = art.art_id AND art.gamma_id = txs.gamma_id AND txs.branch_id = arj.branch_id AND txs.transaction_id <= arj.transaction_id AND txs.branch_id = br.branch_id AND txs.transaction_id <> br.baseline_transaction_id", Strings.HINTS__ORDERED__FIRST_ROWS),
CHANGE_BRANCH_MODIFYING("SELECT count(txs.transaction_id) as tx_count, arj.branch_id, arj.art_id FROM osee_join_artifact arj, osee_artifact art, osee_txs txs, osee_branch br where arj.query_id = ? AND arj.art_id = art.art_id AND art.gamma_id = txs.gamma_id AND txs.branch_id = arj.branch_id and txs.branch_id = br.branch_id AND txs.transaction_id <> br.baseline_transaction_id group by arj.art_id, arj.branch_id", Strings.HINTS__ORDERED__FIRST_ROWS),
- IS_ARTIFACT_ON_BRANCH(
- "SELECT%s count(1) from osee_artifact av1, osee_txs txs1 where av1.art_id = ? and av1.gamma_id = txs1.gamma_id and txs1.branch_id = ?", Strings.HINTS__ORDERED__FIRST_ROWS),
- QUERY_BUILDER("%s", Strings.HINTS__ORDERED__FIRST_ROWS);
+ IS_ARTIFACT_ON_BRANCH("SELECT%s count(1) from osee_artifact av1, osee_txs txs1 where av1.art_id = ? and av1.gamma_id = txs1.gamma_id and txs1.branch_id = ?", Strings.HINTS__ORDERED__FIRST_ROWS),
+ QUERY_BUILDER("%s", Strings.HINTS__ORDERED__FIRST_ROWS);
private final String sql;
private final String hints;
@@ -103,14 +102,14 @@ public enum OseeSql {
private static final String HINTS__THE_INDEX = "/*+ INDEX(txs OSEE_TXS_B_G_C_M_T_IDX) */";
private static final String HINTS__ORDERED__INDEX__ARTIFACT_CONFLICT =
- " /*+ ordered index(atr1) index(atr2) index(txs2) */";
+ " /*+ ordered index(atr1) index(atr2) index(txs2) */";
private static final String HINTS__ORDERED__INDEX__ATTRIBUTE_CONFLICT =
- " /*+ ordered index(atr1) index(atr2) index(txs2) */";
+ " /*+ ordered index(atr1) index(atr2) index(txs2) */";
private static final String SELECT_CURRENT_ATTRIBUTES_PREFIX =
- "SELECT%s att1.art_id, att1.attr_id, att1.value, att1.gamma_id, att1.attr_type_id, att1.uri, al1.branch_id, txs.mod_type, txs.transaction_id FROM osee_join_artifact al1, osee_attribute att1, osee_txs txs WHERE al1.query_id = ? AND al1.art_id = att1.art_id AND att1.gamma_id = txs.gamma_id AND txs.branch_id = al1.branch_id AND txs.tx_current ";
+ "SELECT%s att1.art_id, att1.attr_id, att1.value, att1.gamma_id, att1.attr_type_id, att1.uri, al1.branch_id, txs.mod_type, txs.transaction_id FROM osee_join_artifact al1, osee_attribute att1, osee_txs txs WHERE al1.query_id = ? AND al1.art_id = att1.art_id AND att1.gamma_id = txs.gamma_id AND txs.branch_id = al1.branch_id AND txs.tx_current ";
private static final String SELECT_CURRENT_ARTIFACTS_PREFIX =
- "SELECT%s aj.art_id, txs.gamma_id, mod_type, art_type_id, guid, human_readable_id, txs.branch_id FROM osee_join_artifact aj, osee_artifact art, osee_txs txs WHERE aj.query_id = ? AND aj.art_id = art.art_id AND art.gamma_id = txs.gamma_id AND txs.branch_id = aj.branch_id AND txs.tx_current ";
+ "SELECT%s aj.art_id, txs.gamma_id, mod_type, art_type_id, guid, human_readable_id, txs.branch_id FROM osee_join_artifact aj, osee_artifact art, osee_txs txs WHERE aj.query_id = ? AND aj.art_id = art.art_id AND art.gamma_id = txs.gamma_id AND txs.branch_id = aj.branch_id AND txs.tx_current ";
}
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/Activator.java b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/Activator.java
index 714b4012c64..388d2dfee93 100644
--- a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/Activator.java
+++ b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/Activator.java
@@ -34,12 +34,13 @@ public class Activator implements BundleActivator, IOseeDatabaseServiceProvider
public Activator() {
}
+ @Override
public void start(BundleContext bundleContext) throws Exception {
instance = this;
databaseInfoProvider = new DatabaseInfoProvider(bundleContext);
databaseServiceTracker =
- new ServiceDependencyTracker(bundleContext, new OseeDatabaseServiceRegistrationHandler());
+ new ServiceDependencyTracker(bundleContext, new OseeDatabaseServiceRegistrationHandler());
databaseServiceTracker.open();
dbTracker = new ServiceTracker(bundleContext, IOseeDatabaseService.class.getName(), null);
@@ -59,6 +60,7 @@ public class Activator implements BundleActivator, IOseeDatabaseServiceProvider
return databaseService;
}
+ @Override
public void stop(BundleContext context) throws Exception {
databaseServiceTracker.close();
dbTracker.close();
diff --git a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/DatabaseInfoProvider.java b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/DatabaseInfoProvider.java
index 933dc824a8e..6a9a3416a68 100644
--- a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/DatabaseInfoProvider.java
+++ b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/DatabaseInfoProvider.java
@@ -83,7 +83,7 @@ public class DatabaseInfoProvider {
tracker.close();
}
throw new OseeDatabaseConnectionInfoNotFoundException(String.format(
- "DB connection information was not found for: [%s]\n Available connection ids are: [%s]\n", serverIdToFind,
- infoKeys));
+ "DB connection information was not found for: [%s]\n Available connection ids are: [%s]\n", serverIdToFind,
+ infoKeys));
}
}
diff --git a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/core/OseeConnectionPoolImpl.java b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/core/OseeConnectionPoolImpl.java
index 9ed1f4f9ef5..ee4b2a53e85 100644
--- a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/core/OseeConnectionPoolImpl.java
+++ b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/core/OseeConnectionPoolImpl.java
@@ -68,7 +68,7 @@ public class OseeConnectionPoolImpl {
if (connections.size() >= MAX_CONNECTIONS_PER_CLIENT) {
throw new OseeDataStoreException(
- "This client has reached the maximum number of allowed simultaneous database connections of : " + MAX_CONNECTIONS_PER_CLIENT);
+ "This client has reached the maximum number of allowed simultaneous database connections of : " + MAX_CONNECTIONS_PER_CLIENT);
}
try {
OseeConnectionImpl connection = getOseeConnection();
diff --git a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/core/OseeDatabaseServiceImpl.java b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/core/OseeDatabaseServiceImpl.java
index b436821022b..b753c908244 100644
--- a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/core/OseeDatabaseServiceImpl.java
+++ b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/core/OseeDatabaseServiceImpl.java
@@ -35,7 +35,7 @@ import org.eclipse.osee.framework.logging.OseeLog;
public class OseeDatabaseServiceImpl implements IOseeDatabaseService {
private static final Timer timer = new Timer();
private static final Map<String, OseeConnectionPoolImpl> dbInfoToPools =
- new HashMap<String, OseeConnectionPoolImpl>();
+ new HashMap<String, OseeConnectionPoolImpl>();
private final IOseeSequence oseeSequence;
private final ConnectionFactoryProvider dbConnectionFactory;
@@ -72,8 +72,8 @@ public class OseeDatabaseServiceImpl implements IOseeDatabaseService {
OseeConnectionPoolImpl pool = dbInfoToPools.get(databaseInfo.getId());
if (pool == null) {
pool =
- new OseeConnectionPoolImpl(dbConnectionFactory, databaseInfo.getDriver(),
- databaseInfo.getConnectionUrl(), databaseInfo.getConnectionProperties());
+ new OseeConnectionPoolImpl(dbConnectionFactory, databaseInfo.getDriver(), databaseInfo.getConnectionUrl(),
+ databaseInfo.getConnectionProperties());
dbInfoToPools.put(databaseInfo.getId(), pool);
timer.schedule(new StaleConnectionCloser(pool), 900000, 900000);
}
@@ -159,7 +159,7 @@ public class OseeDatabaseServiceImpl implements IOseeDatabaseService {
OseeLog.log(Activator.class, Level.SEVERE, "This is the nested exception", exlist);
}
throw new OseeDataStoreException(
- "sql update failed: \n" + query + "\n" + StatementUtil.getBatchErrorMessage(dataList), ex);
+ "sql update failed: \n" + query + "\n" + StatementUtil.getBatchErrorMessage(dataList), ex);
} finally {
StatementUtil.close(preparedStatement);
}
diff --git a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/core/OseeSequenceImpl.java b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/core/OseeSequenceImpl.java
index 8d6e8cd4afb..f0d5ad341a5 100644
--- a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/core/OseeSequenceImpl.java
+++ b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/core/OseeSequenceImpl.java
@@ -22,9 +22,9 @@ import org.eclipse.osee.framework.database.core.OseeConnection;
public class OseeSequenceImpl implements IOseeSequence {
private static final String QUERY_SEQUENCE = "SELECT last_sequence FROM osee_sequence WHERE sequence_name = ?";
private static final String INSERT_SEQUENCE =
- "INSERT INTO osee_sequence (last_sequence, sequence_name) VALUES (?,?)";
+ "INSERT INTO osee_sequence (last_sequence, sequence_name) VALUES (?,?)";
private static final String UPDATE_SEQUENCE =
- "UPDATE osee_sequence SET last_sequence = ? WHERE sequence_name = ? AND last_sequence = ?";
+ "UPDATE osee_sequence SET last_sequence = ? WHERE sequence_name = ? AND last_sequence = ?";
private final static HashMap<String, SequenceRange> sequences = new HashMap<String, SequenceRange>(30);
@@ -53,6 +53,7 @@ public class OseeSequenceImpl implements IOseeSequence {
sequences.clear();
}
+ @Override
@SuppressWarnings("unchecked")
public synchronized long getNextSequence(String sequenceName) throws OseeDataStoreException {
SequenceRange range = getRange(sequenceName);
@@ -63,7 +64,7 @@ public class OseeSequenceImpl implements IOseeSequence {
try {
while (!gotSequence) {
long currentValue =
- getDatabase().runPreparedQueryFetchObject(connection, lastValue, QUERY_SEQUENCE, sequenceName);
+ getDatabase().runPreparedQueryFetchObject(connection, lastValue, QUERY_SEQUENCE, sequenceName);
if (currentValue == lastValue) {
internalInitializeSequence(sequenceName);
lastValue = 0;
@@ -71,8 +72,8 @@ public class OseeSequenceImpl implements IOseeSequence {
lastValue = currentValue;
}
gotSequence =
- getDatabase().runPreparedUpdate(connection, UPDATE_SEQUENCE, lastValue + range.prefetchSize,
- sequenceName, lastValue) == 1;
+ getDatabase().runPreparedUpdate(connection, UPDATE_SEQUENCE, lastValue + range.prefetchSize,
+ sequenceName, lastValue) == 1;
}
range.updateRange(lastValue);
} finally {
@@ -93,66 +94,82 @@ public class OseeSequenceImpl implements IOseeSequence {
getDatabase().runPreparedUpdate(INSERT_SEQUENCE, 0, sequenceName);
}
+ @Override
public int getNextSessionId() throws OseeDataStoreException {
return (int) getNextSequence(TTE_SESSION_SEQ);
}
+ @Override
public int getNextTransactionId() throws OseeDataStoreException {
return (int) getNextSequence(TRANSACTION_ID_SEQ);
}
+ @Override
public int getNextArtifactId() throws OseeDataStoreException {
return (int) getNextSequence(ART_ID_SEQ);
}
+ @Override
public int getNextOseeEnumTypeId() throws OseeDataStoreException {
return (int) getNextSequence(ENUM_TYPE_ID_SEQ);
}
+ @Override
public int getNextGammaId() throws OseeDataStoreException {
return (int) getNextSequence(GAMMA_ID_SEQ);
}
+ @Override
public int getNextArtifactTypeId() throws OseeDataStoreException {
return (int) getNextSequence(ART_TYPE_ID_SEQ);
}
+ @Override
public int getNextAttributeBaseTypeId() throws OseeDataStoreException {
return (int) getNextSequence(ATTR_BASE_TYPE_ID_SEQ);
}
+ @Override
public int getNextAttributeProviderTypeId() throws OseeDataStoreException {
return (int) getNextSequence(ATTR_PROVIDER_TYPE_ID_SEQ);
}
+ @Override
public int getNextAttributeId() throws OseeDataStoreException {
return (int) getNextSequence(ATTR_ID_SEQ);
}
+ @Override
public int getNextAttributeTypeId() throws OseeDataStoreException {
return (int) getNextSequence(ATTR_TYPE_ID_SEQ);
}
+ @Override
public int getNextFactoryId() throws OseeDataStoreException {
return (int) getNextSequence(FACTORY_ID_SEQ);
}
+ @Override
public int getNextBranchId() throws OseeDataStoreException {
return (int) getNextSequence(BRANCH_ID_SEQ);
}
+ @Override
public int getNextRelationTypeId() throws OseeDataStoreException {
return (int) getNextSequence(REL_LINK_TYPE_ID_SEQ);
}
+ @Override
public int getNextRelationId() throws OseeDataStoreException {
return (int) getNextSequence(REL_LINK_ID_SEQ);
}
+ @Override
public int getNextImportId() throws OseeDataStoreException {
return (int) getNextSequence(IMPORT_ID_SEQ);
}
+ @Override
public int getNextImportMappedIndexId() throws OseeDataStoreException {
return (int) getNextSequence(IMPORT_MAPPED_INDEX_SEQ);
}
@@ -182,6 +199,4 @@ public class OseeSequenceImpl implements IOseeSequence {
}
}
-
-
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/core/OseeStatementImpl.java b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/core/OseeStatementImpl.java
index 8cb8e56b107..1e65ab87c54 100644
--- a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/core/OseeStatementImpl.java
+++ b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/core/OseeStatementImpl.java
@@ -69,7 +69,7 @@ public final class OseeStatementImpl implements IOseeStatement {
/**
* @param fetchSize hint as to the number of rows that should be fetched from the database at a time. will be limited
- * to 10,000
+ * to 10,000
* @param query
* @param data
* @throws OseeDataStoreException
diff --git a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/core/StatementUtil.java b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/core/StatementUtil.java
index faaf68f5fe3..ae34da7ffb8 100644
--- a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/core/StatementUtil.java
+++ b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/core/StatementUtil.java
@@ -91,13 +91,13 @@ public class StatementUtil {
int length = ((String) dataValue).length();
if (length > 4000) {
throw new OseeDataStoreException(
- "SQL data value length must be <= 4000 not " + length + "\nValue: " + dataValue);
+ "SQL data value length must be <= 4000 not " + length + "\nValue: " + dataValue);
}
}
if (dataValue == null) {
throw new OseeDataStoreException(
- "instead of passing null for an query parameter, pass the corresponding SQL3DataType");
+ "instead of passing null for an query parameter, pass the corresponding SQL3DataType");
} else if (dataValue instanceof SQL3DataType) {
int dataTypeNumber = ((SQL3DataType) dataValue).getSQLTypeNumber();
if (dataTypeNumber == java.sql.Types.BLOB) {
@@ -109,7 +109,7 @@ public class StatementUtil {
}
} else if (dataValue instanceof ByteArrayInputStream) {
preparedStatement.setBinaryStream(preparedIndex, (ByteArrayInputStream) dataValue,
- ((ByteArrayInputStream) dataValue).available());
+ ((ByteArrayInputStream) dataValue).available());
} else {
preparedStatement.setObject(preparedIndex, dataValue);
}
diff --git a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/parser/DbConfigParser.java b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/parser/DbConfigParser.java
index 0459b7f038c..ba3d0f64298 100644
--- a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/parser/DbConfigParser.java
+++ b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/parser/DbConfigParser.java
@@ -57,7 +57,7 @@ public class DbConfigParser {
DbSetupData serviceData = servicesMap.get(id);
DbDetailData dbInfo = dbInfoMap.get(serviceData.getDbInfo());
DbConnectionData connectionData =
- connectionMap.get(serviceData.getServerInfoValue(DbSetupData.ServerInfoFields.connectsWith));
+ connectionMap.get(serviceData.getServerInfoValue(DbSetupData.ServerInfoFields.connectsWith));
if (dbInfo != null && connectionData != null) {
return new DbInformation(dbInfo, serviceData, connectionData);
} else {
@@ -174,10 +174,10 @@ public class DbConfigParser {
break;
case UrlAttributes:
Element urlAttributes =
- Jaxp.getChild(element, DbConnectionData.ConnectionFields.UrlAttributes.name());
+ Jaxp.getChild(element, DbConnectionData.ConnectionFields.UrlAttributes.name());
if (urlAttributes != null) {
NodeList attributes =
- urlAttributes.getElementsByTagName(DbConnectionData.UrlAttributes.Entry.name());
+ urlAttributes.getElementsByTagName(DbConnectionData.UrlAttributes.Entry.name());
if (attributes != null) {
for (int index = 0; index < attributes.getLength(); index++) {
Node node = attributes.item(index);
diff --git a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/parser/DbConnectionData.java b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/parser/DbConnectionData.java
index c32b7bb2c62..e349f7db191 100644
--- a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/parser/DbConnectionData.java
+++ b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/parser/DbConnectionData.java
@@ -30,14 +30,17 @@ public class DbConnectionData implements Serializable {
}
public enum ConnectionFields {
- Url, Driver, UrlAttributes, Property;
+ Url,
+ Driver,
+ UrlAttributes,
+ Property;
}
private String id;
private String databaseDriver;
private String databaseUrl;
- private ArrayList<String> attributesList;
- private Properties properties;
+ private final ArrayList<String> attributesList;
+ private final Properties properties;
public DbConnectionData() {
attributesList = new ArrayList<String>();
diff --git a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/parser/DbDetailData.java b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/parser/DbDetailData.java
index 37635863d7a..34451d140df 100644
--- a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/parser/DbDetailData.java
+++ b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/parser/DbDetailData.java
@@ -25,11 +25,19 @@ public class DbDetailData implements Serializable {
private static final long serialVersionUID = 4610179141542353247L;
public enum ConfigPairField {
- key, value;
+ key,
+ value;
}
public enum ConfigField {
- DatabaseType, DatabaseName, DatabaseHome, Prefix, UserName, Password, Host, Port
+ DatabaseType,
+ DatabaseName,
+ DatabaseHome,
+ Prefix,
+ UserName,
+ Password,
+ Host,
+ Port
}
public enum DescriptionField {
diff --git a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/parser/DbSetupData.java b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/parser/DbSetupData.java
index 42d644bd79e..8b9b06174e8 100644
--- a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/parser/DbSetupData.java
+++ b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/internal/parser/DbSetupData.java
@@ -27,7 +27,13 @@ public class DbSetupData implements Serializable {
}
public enum ServerInfoFields {
- id, dbInfo, hostAddress, port, connectsWith, serverConfig, isProduction;
+ id,
+ dbInfo,
+ hostAddress,
+ port,
+ connectsWith,
+ serverConfig,
+ isProduction;
}
Map<ServerInfoFields, String> serverFieldMap;
diff --git a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/operation/ConsolidateArtifactVersionTxOperation.java b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/operation/ConsolidateArtifactVersionTxOperation.java
index 61d8e8abff0..5129171647a 100644
--- a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/operation/ConsolidateArtifactVersionTxOperation.java
+++ b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/operation/ConsolidateArtifactVersionTxOperation.java
@@ -23,8 +23,8 @@ import org.eclipse.osee.framework.database.IOseeDatabaseServiceProvider;
import org.eclipse.osee.framework.database.core.AbstractDbTxOperation;
import org.eclipse.osee.framework.database.core.IOseeStatement;
import org.eclipse.osee.framework.database.core.JoinUtility;
-import org.eclipse.osee.framework.database.core.OseeConnection;
import org.eclipse.osee.framework.database.core.JoinUtility.ExportImportJoinQuery;
+import org.eclipse.osee.framework.database.core.OseeConnection;
import org.eclipse.osee.framework.database.internal.Activator;
/**
@@ -32,32 +32,32 @@ import org.eclipse.osee.framework.database.internal.Activator;
*/
public class ConsolidateArtifactVersionTxOperation extends AbstractDbTxOperation {
private static final String SELECT_ARTIFACT_VERSIONS =
- "select * from osee_artifact_version order by art_id, gamma_id";
+ "select * from osee_artifact_version order by art_id, gamma_id";
private static final String SELECT_ADDRESSING =
- "select txs.*, idj.id1 as net_gamma_id from osee_join_export_import idj, osee_txs%s txs where idj.query_id = ? and idj.id2 = txs.gamma_id order by net_gamma_id, branch_id, transaction_id, gamma_id desc";
+ "select txs.*, idj.id1 as net_gamma_id from osee_join_export_import idj, osee_txs%s txs where idj.query_id = ? and idj.id2 = txs.gamma_id order by net_gamma_id, branch_id, transaction_id, gamma_id desc";
private static final String UPDATE_CONFLICTS =
- "update osee_conflict set %s = (select gamma_id from osee_artifact_version where conflict_id = art_id) where conflict_type = 3";
+ "update osee_conflict set %s = (select gamma_id from osee_artifact_version where conflict_id = art_id) where conflict_type = 3";
private static final String UPDATE_TXS_GAMMAS =
- "update osee_txs%s set gamma_id = ?, mod_type = ? where transaction_id = ? and gamma_id = ?";
+ "update osee_txs%s set gamma_id = ?, mod_type = ? where transaction_id = ? and gamma_id = ?";
private static final String DELETE_TXS = "delete from osee_txs%s where transaction_id = ? and gamma_id = ?";
private static final String DELETE_ARTIFACT_VERSIONS = "delete from osee_artifact_version where gamma_id = ?";
private static final String SET_BASELINE_TRANSACTION =
- "UPDATE osee_branch ob SET ob.baseline_transaction_id = (SELECT otd.transaction_id FROM osee_tx_details otd WHERE otd.branch_id = ob.branch_id AND otd.tx_type = 1)";
+ "UPDATE osee_branch ob SET ob.baseline_transaction_id = (SELECT otd.transaction_id FROM osee_tx_details otd WHERE otd.branch_id = ob.branch_id AND otd.tx_type = 1)";
private static final String POPULATE_ARTS =
- "insert into osee_artifact(gamma_id, art_id, art_type_id, guid, human_readable_id) select gamma_id, art.art_id, art_type_id, guid, human_readable_id from osee_artifact art, osee_artifact_version arv where art.art_id = arv.art_id and not exists (select 1 from osee_artifact arts where art.art_id = arts.art_id)";
+ "insert into osee_artifact(gamma_id, art_id, art_type_id, guid, human_readable_id) select gamma_id, art.art_id, art_type_id, guid, human_readable_id from osee_artifact art, osee_artifact_version arv where art.art_id = arv.art_id and not exists (select 1 from osee_artifact arts where art.art_id = arts.art_id)";
private static final String FIND_ARTIFACT_MODS =
- "select * from osee_artifact art, osee_txs txs where art.gamma_id = txs.gamma_id order by art_id, branch_id, transaction_id";
+ "select * from osee_artifact art, osee_txs txs where art.gamma_id = txs.gamma_id order by art_id, branch_id, transaction_id";
private static final String UPDATE_TXS_MOD_CURRENT =
- "update osee_txs%s set mod_type = ?, tx_current = ? where transaction_id = ? and gamma_id = ?";
+ "update osee_txs%s set mod_type = ?, tx_current = ? where transaction_id = ? and gamma_id = ?";
private List<Long[]> deleteArtifactVersionData;
private final List<Long> obsoleteGammas = new ArrayList<Long>();
@@ -113,8 +113,7 @@ public class ConsolidateArtifactVersionTxOperation extends AbstractDbTxOperation
previousBranchId = branchId;
}
mods.add(new Address(false, -1, -1, chStmt.getInt("transaction_id"), chStmt.getInt("gamma_id"),
- ModificationType.getMod(chStmt.getInt("mod_type")),
- TxChange.getChangeType(chStmt.getInt("tx_current"))));
+ ModificationType.getMod(chStmt.getInt("mod_type")), TxChange.getChangeType(chStmt.getInt("tx_current"))));
}
} finally {
if (chStmt != null) {
@@ -130,7 +129,7 @@ public class ConsolidateArtifactVersionTxOperation extends AbstractDbTxOperation
if (mod0 == ModificationType.MODIFIED) {
knownCase = true;
updateTxsCurrentModData.add(new Object[] {ModificationType.NEW.getValue(),
- mods.get(0).getTxCurrent().getValue(), mods.get(0).getTransactionId(), mods.get(0).getGammaId()});
+ mods.get(0).getTxCurrent().getValue(), mods.get(0).getTransactionId(), mods.get(0).getGammaId()});
} else {
knownCase = true;
}
@@ -145,7 +144,7 @@ public class ConsolidateArtifactVersionTxOperation extends AbstractDbTxOperation
knownCase = true;
// must purge most recent delete and set previous one to current
updateTxsCurrentModData.add(new Object[] {mods.get(1).getModType().getValue(),
- TxChange.DELETED.getValue(), mods.get(1).getTransactionId(), mods.get(1).getGammaId()});
+ TxChange.DELETED.getValue(), mods.get(1).getTransactionId(), mods.get(1).getGammaId()});
addressingToDelete.add(new Object[] {mods.get(2).getTransactionId(), mods.get(2).getGammaId()});
} else if (mod1 == ModificationType.MERGED && mod2 == ModificationType.DELETED) {
knownCase = true;
@@ -155,7 +154,7 @@ public class ConsolidateArtifactVersionTxOperation extends AbstractDbTxOperation
}
if (!knownCase) {
reporter.report(String.format("unknown case: artifact id: %d branch_id: %d", previousArtifactId,
- previousBranchId));
+ previousBranchId));
}
}
@@ -171,7 +170,7 @@ public class ConsolidateArtifactVersionTxOperation extends AbstractDbTxOperation
reporter.report("addressingToDelete size: " + addressingToDelete.size());
getDatabaseService().runBatchUpdate(connection, prepareSql(UPDATE_TXS_MOD_CURRENT, false),
- updateTxsCurrentModData);
+ updateTxsCurrentModData);
getDatabaseService().runBatchUpdate(connection, prepareSql(DELETE_TXS, false), addressingToDelete);
return;
@@ -181,7 +180,7 @@ public class ConsolidateArtifactVersionTxOperation extends AbstractDbTxOperation
reporter.report("gamma join size: " + gammaJoin.size());
reporter.report("Number of artifact version rows deleted: " + getDatabaseService().runBatchUpdate(connection,
- DELETE_ARTIFACT_VERSIONS, deleteArtifactVersionData));
+ DELETE_ARTIFACT_VERSIONS, deleteArtifactVersionData));
deleteArtifactVersionData = null;
gammaJoin.store(connection);
@@ -248,7 +247,7 @@ public class ConsolidateArtifactVersionTxOperation extends AbstractDbTxOperation
try {
reporter.report("query id: " + gammaJoin.getQueryId());
chStmt.runPreparedQuery(10000, String.format(SELECT_ADDRESSING, archived ? "_archived" : ""),
- gammaJoin.getQueryId());
+ gammaJoin.getQueryId());
while (chStmt.next()) {
long obsoleteGammaId = chStmt.getLong("gamma_id");
@@ -263,7 +262,7 @@ public class ConsolidateArtifactVersionTxOperation extends AbstractDbTxOperation
if (modType == ModificationType.MODIFIED) {
addToUpdateAddresssing(ModificationType.NEW, netGammaId, modType, transactionId, obsoleteGammaId);
} else if (modType.matches(ModificationType.NEW, ModificationType.INTRODUCED, ModificationType.DELETED,
- ModificationType.MERGED)) {
+ ModificationType.MERGED)) {
addToUpdateAddresssing(modType, netGammaId, modType, transactionId, obsoleteGammaId);
} else {
throw new OseeStateException("unexpected mod type: " + modType);
@@ -311,15 +310,15 @@ public class ConsolidateArtifactVersionTxOperation extends AbstractDbTxOperation
String archivedStr = archived ? "_archived" : "";
if (addressingToDelete.size() > 99960 || force) {
deleteTxsCounter +=
- getDatabaseService().runBatchUpdate(connection, prepareSql(DELETE_TXS, archived), addressingToDelete);
+ getDatabaseService().runBatchUpdate(connection, prepareSql(DELETE_TXS, archived), addressingToDelete);
reporter.report("Number of txs" + archivedStr + " rows deleted: " + deleteTxsCounter);
addressingToDelete.clear();
}
if (updateAddressingData.size() > 99960 || force) {
updateTxsCounter +=
- getDatabaseService().runBatchUpdate(connection, prepareSql(UPDATE_TXS_GAMMAS, archived),
- updateAddressingData);
+ getDatabaseService().runBatchUpdate(connection, prepareSql(UPDATE_TXS_GAMMAS, archived),
+ updateAddressingData);
reporter.report("Number of txs" + archivedStr + " rows updated: " + updateTxsCounter);
updateAddressingData.clear();
diff --git a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/operation/InvalidTxCurrentsAndModTypes.java b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/operation/InvalidTxCurrentsAndModTypes.java
index 1a0da3e36a3..a5ab64c82e7 100644
--- a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/operation/InvalidTxCurrentsAndModTypes.java
+++ b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/operation/InvalidTxCurrentsAndModTypes.java
@@ -28,11 +28,11 @@ import org.eclipse.osee.framework.database.internal.Activator;
*/
public class InvalidTxCurrentsAndModTypes extends AbstractOperation {
private static final String SELECT_ADDRESSES =
- "select %s, txs.branch_id, txs.transaction_id, txs.gamma_id, txs.mod_type, txs.tx_current, txd.tx_type from %s t1, osee_txs%s txs, osee_tx_details txd where t1.gamma_id = txs.gamma_id and txd.transaction_id = txs.transaction_id and txs.branch_id = txd.branch_id order by txs.branch_id, %s, txs.transaction_id desc, txs.gamma_id desc";
+ "select %s, txs.branch_id, txs.transaction_id, txs.gamma_id, txs.mod_type, txs.tx_current, txd.tx_type from %s t1, osee_txs%s txs, osee_tx_details txd where t1.gamma_id = txs.gamma_id and txd.transaction_id = txs.transaction_id and txs.branch_id = txd.branch_id order by txs.branch_id, %s, txs.transaction_id desc, txs.gamma_id desc";
private static final String DELETE_ADDRESS = "delete from osee_txs%s where transaction_id = ? and gamma_id = ?";
private static final String UPDATE_ADDRESS =
- "update osee_txs%s set tx_current = ? where transaction_id = ? and gamma_id = ?";
+ "update osee_txs%s set tx_current = ? where transaction_id = ? and gamma_id = ?";
private final List<Address> addresses = new ArrayList<Address>();
private final OperationReporter reporter;
@@ -64,8 +64,8 @@ public class InvalidTxCurrentsAndModTypes extends AbstractOperation {
private void logIssue(String issue, Address address) {
reporter.report(issue, String.valueOf(address.getBranchId()), String.valueOf(address.getItemId()),
- String.valueOf(address.getTransactionId()), String.valueOf(address.getGammaId()),
- address.getModType().toString(), address.getTxCurrent().toString());
+ String.valueOf(address.getTransactionId()), String.valueOf(address.getGammaId()),
+ address.getModType().toString(), address.getTxCurrent().toString());
}
private void consolidateAddressing() {
@@ -82,7 +82,7 @@ public class InvalidTxCurrentsAndModTypes extends AbstractOperation {
} else if (address.getCorrectedTxCurrent() != null) {
logIssue("corrected txCurrent: " + address.getCorrectedTxCurrent(), address);
currentData.add(new Object[] {address.getCorrectedTxCurrent().getValue(), address.getTransactionId(),
- address.getGammaId()});
+ address.getGammaId()});
} else {
System.out.println("would have fixed merge here");
}
@@ -171,8 +171,8 @@ public class InvalidTxCurrentsAndModTypes extends AbstractOperation {
TxChange txCurrent = TxChange.getChangeType(chStmt.getInt("tx_current"));
TransactionDetailsType type = TransactionDetailsType.toEnum(chStmt.getInt("tx_type"));
Address address =
- new Address(type.isBaseline(), chStmt.getInt("branch_id"), chStmt.getInt(columnName),
- chStmt.getInt("transaction_id"), chStmt.getLong("gamma_id"), modType, txCurrent);
+ new Address(type.isBaseline(), chStmt.getInt("branch_id"), chStmt.getInt(columnName),
+ chStmt.getInt("transaction_id"), chStmt.getLong("gamma_id"), modType, txCurrent);
if (!address.isSimilar(previousAddress)) {
if (!addresses.isEmpty()) {

Back to the top