Go to the documentation of this file.
19package org.sleuthkit.autopsy.datasourcesummary.datamodel;
21import java.sql.ResultSet;
22import java.sql.SQLException;
23import java.util.Collections;
24import java.util.HashMap;
26import java.util.logging.Level;
27import org.sleuthkit.autopsy.coreutils.Logger;
28import org.sleuthkit.datamodel.CaseDbAccessManager;
35class DataSourceSingleValueCallback
implements CaseDbAccessManager.CaseDbAccessQueryCallback {
37 private static final Logger logger = Logger.getLogger(DataSourceSingleValueCallback.class.getName());
38 private final Map<Long, Long> dataSourceObjIdValues =
new HashMap<>();
41 public void process(ResultSet rs) {
45 dataSourceObjIdValues.put(rs.getLong(
"data_source_obj_id"), rs.getLong(
"value"));
46 }
catch (SQLException ex) {
47 logger.log(Level.WARNING,
"Unable to get data_source_obj_id or value from result set", ex);
50 }
catch (SQLException ex) {
51 logger.log(Level.WARNING,
"Failed to get next result for valuess by datasource", ex);
62 Map<Long, Long> getMapOfValues() {
63 return Collections.unmodifiableMap(dataSourceObjIdValues);
Copyright © 2012-2024 Sleuth Kit Labs. Generated on:
This work is licensed under a
Creative Commons Attribution-Share Alike 3.0 United States License.