From 950c552ee09efddbfb95b4c424e3112cff6d4d85 Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Wed, 27 Sep 2017 16:50:33 -0400 Subject: [PATCH] 3087 remove unused and commented out method updateDataSource --- .../datamodel/AbstractSqlEamDb.java | 28 ------------------- .../centralrepository/datamodel/EamDb.java | 7 ----- .../datamodel/SqliteEamDb.java | 17 +---------- 3 files changed, 1 insertion(+), 51 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/AbstractSqlEamDb.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/AbstractSqlEamDb.java index 7c0214ee13..b0442364d5 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/AbstractSqlEamDb.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/AbstractSqlEamDb.java @@ -448,34 +448,6 @@ public abstract class AbstractSqlEamDb implements EamDb { } } - /** - * Updates a Data Source in the database - * - * @param eamDataSource the data source to update - */ -// @Override -// public void updateDataSource(CorrelationDataSource eamDataSource) throws EamDbException { -// Connection conn = connect(); -// BC: This needs to be updated because device_id is not unique. Query needs to also use case_id -// PreparedStatement preparedStatement = null; -// String sql = "UPDATE data_sources SET name=? WHERE device_id=? AND case_id=?"; -// -// try { -// preparedStatement = conn.prepareStatement(sql); -// -// preparedStatement.setString(1, eamDataSource.getName()); -// preparedStatement.setString(2, eamDataSource.getDeviceID()); -// preparedStatement.setInt(3, eamDataSource.getCaseID()); -// -// preparedStatement.executeUpdate(); -// } catch (SQLException ex) { -// throw new EamDbException("Error updating case.", ex); // NON-NLS -// } finally { -// EamDbUtil.closePreparedStatement(preparedStatement); -// EamDbUtil.closeConnection(conn); -// } -// } - /** * Retrieves Data Source details based on data source device ID * diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamDb.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamDb.java index fb2ea168db..58d2e0d6a7 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamDb.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamDb.java @@ -186,13 +186,6 @@ public interface EamDb { */ void newDataSource(CorrelationDataSource eamDataSource) throws EamDbException; - /** - * Updates a Data Source in the database - * - * @param eamDataSource the data source to update - */ - //void updateDataSource(CorrelationDataSource eamDataSource) throws EamDbException; - /** * Retrieves Data Source details based on data source device ID * diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/SqliteEamDb.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/SqliteEamDb.java index 3c821f71be..ff0c2891bd 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/SqliteEamDb.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/SqliteEamDb.java @@ -358,22 +358,7 @@ public class SqliteEamDb extends AbstractSqlEamDb { releaseExclusiveLock(); } } - - /** - * Updates a Data Source in the database - * - * @param eamDataSource the data source to update - */ -// @Override -// public void updateDataSource(CorrelationDataSource eamDataSource) throws EamDbException { -// try{ -// acquireExclusiveLock(); -// super.updateDataSource(eamDataSource); -// } finally { -// releaseExclusiveLock(); -// } -// } - + /** * Retrieves Data Source details based on data source device ID *