Autopsy
4.19.3
Graphical digital forensics platform for The Sleuth Kit and other tools.
|
Inherits AutoCloseable.
Public Member Functions | |
SQLiteDBConnect (String driver, String url) throws SQLException | |
SQLiteDBConnect () | |
void | close () |
void | closeConnection () |
ResultSet | executeQry (String sqlStatement) throws SQLException |
void | executeStmt (String sqlStatement) throws SQLException |
void | executeStmt (String[] sqlStatements) throws SQLException |
Connection | getConnection () |
Statement | getStatement () |
final void | init (String driver, String url) throws SQLException |
void | setConnection () throws SQLException |
void | setStatement () throws SQLException |
Public Attributes | |
Connection | conn = null |
int | iTimeout = STMT_EXEC_TIMEOUT_SECS |
String | sDriver = "" |
Statement | statement = null |
String | sUrl = null |
Static Private Attributes | |
static final Logger | logger = Logger.getLogger(SQLiteDBConnect.class.getName()) |
static final int | STMT_EXEC_TIMEOUT_SECS = 30 |
An abstraction that loads a given SQLite driver, establishes a connection to a given database, and creates a statement for the connection to support basic SQL operations on the database.
Definition at line 37 of file SQLiteDBConnect.java.
org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.SQLiteDBConnect | ( | String | driver, |
String | url | ||
) | throws SQLException |
Constructs an abstraction that loads a given SQLite driver, establishes a connection to a given database, and creates a statement for the connection to support basic SQL operations on the database.
driver | The SQLite driver class name. |
url | The SQLite database URL to which to connect. |
SQLException | If there is an error loading the driver, establishing the connection, or creating a statement for the connection. |
Definition at line 54 of file SQLiteDBConnect.java.
References org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.conn, org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.sDriver, org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.statement, and org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.sUrl.
org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.SQLiteDBConnect | ( | ) |
Definition at line 138 of file SQLiteDBConnect.java.
void org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.close | ( | ) |
Definition at line 126 of file SQLiteDBConnect.java.
References org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.closeConnection().
void org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.closeConnection | ( | ) |
Closes the connection to the database. Should be called when the use of this object is completed, unless the object was constructed in a try with resources statement, in which case the closing is automatic when the object goes out of scope.
Definition at line 114 of file SQLiteDBConnect.java.
References org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.conn, and org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.sUrl.
Referenced by org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.close(), org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.init(), and org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.setConnection().
ResultSet org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.executeQry | ( | String | sqlStatement | ) | throws SQLException |
Executes an SQL query and returns a result set. The caller should close the result set when finished with it, and should not make any other calls on this object until finished with the result set.
sqlStatement | The SQL query to execute. |
SQLException | If there is an error executing the query. |
Definition at line 104 of file SQLiteDBConnect.java.
References org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.statement.
Referenced by org.sleuthkit.autopsy.modules.plaso.PlasoIngestModule.createPlasoArtifacts().
void org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.executeStmt | ( | String | sqlStatement | ) | throws SQLException |
Executes an SQL statement. For use with statements that do not return result sets.
sqlStatement | The SQL statement to execute. |
SQLException | If there is an error executing the statement. |
Definition at line 75 of file SQLiteDBConnect.java.
References org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.statement.
Referenced by org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.executeStmt().
void org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.executeStmt | ( | String[] | sqlStatements | ) | throws SQLException |
Executes one or more SQL statements in sequence. For use with statements that do not return result sets.
sqlStatements | The SQL statements to execute. |
SQLException | If there is an error executing the statements. |
Definition at line 87 of file SQLiteDBConnect.java.
References org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.executeStmt().
Connection org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.getConnection | ( | ) |
Gets the connection, if any, to the database.
Definition at line 193 of file SQLiteDBConnect.java.
References org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.conn.
Statement org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.getStatement | ( | ) |
Gets the statement, if any, associated with the connection to the database, if any.
Definition at line 224 of file SQLiteDBConnect.java.
References org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.statement.
final void org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.init | ( | String | driver, |
String | url | ||
) | throws SQLException |
Loads a given SQLite driver, establishes a connection to a given database, and creates a statement for the connection.
driver | The SQLite driver class name. |
url | The SQLite database URL to which to connect. |
SQLException | If there is an error establishing the connection or creating a statement for the connection. |
Definition at line 154 of file SQLiteDBConnect.java.
References org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.closeConnection(), org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.sDriver, org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.setConnection(), org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.setStatement(), and org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.sUrl.
void org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.setConnection | ( | ) | throws SQLException |
Sets or resets the connection to the SQLite database, if the SQLite driver and the database URL have been set.
SQLException | If there is an error loading the driver or establishing the connection. |
Definition at line 172 of file SQLiteDBConnect.java.
References org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.closeConnection(), org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.conn, org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.sDriver, and org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.sUrl.
Referenced by org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.init(), and org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.setStatement().
void org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.setStatement | ( | ) | throws SQLException |
Creates a connection to the database if there is none, and creates a statement using the connection.
SQLException | If there is an error creating the connection or the staement. |
Definition at line 207 of file SQLiteDBConnect.java.
References org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.conn, org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.iTimeout, org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.setConnection(), and org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.statement.
Referenced by org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.init().
Connection org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.conn = null |
Definition at line 237 of file SQLiteDBConnect.java.
Referenced by org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.closeConnection(), org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.getConnection(), org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.setConnection(), org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.setStatement(), and org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.SQLiteDBConnect().
int org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.iTimeout = STMT_EXEC_TIMEOUT_SECS |
Definition at line 236 of file SQLiteDBConnect.java.
Referenced by org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.setStatement().
|
staticprivate |
Definition at line 39 of file SQLiteDBConnect.java.
String org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.sDriver = "" |
Definition at line 234 of file SQLiteDBConnect.java.
Referenced by org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.init(), org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.setConnection(), and org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.SQLiteDBConnect().
Statement org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.statement = null |
Definition at line 238 of file SQLiteDBConnect.java.
Referenced by org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.executeQry(), org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.executeStmt(), org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.getStatement(), org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.setStatement(), and org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.SQLiteDBConnect().
|
staticprivate |
Definition at line 40 of file SQLiteDBConnect.java.
String org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.sUrl = null |
Definition at line 235 of file SQLiteDBConnect.java.
Referenced by org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.closeConnection(), org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.init(), org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.setConnection(), and org.sleuthkit.autopsy.coreutils.SQLiteDBConnect.SQLiteDBConnect().
Copyright © 2012-2022 Basis Technology. Generated on: Sun Mar 26 2023
This work is licensed under a
Creative Commons Attribution-Share Alike 3.0 United States License.