Sleuth Kit Java Bindings (JNI)
4.6
Java bindings for using The Sleuth Kit
|
Classes | |
interface | CaseDbAccessQueryCallback |
Public Member Functions | |
void | alterTable (final String tableName, final String alterSQL) throws TskCoreException |
void | alterTable (final String tableName, final String alterSQL, final CaseDbTransaction transaction) throws TskCoreException |
boolean | columnExists (String tableName, String columnName) throws TskCoreException |
boolean | columnExists (String tableName, String columnName, CaseDbTransaction transaction) throws TskCoreException |
void | createIndex (final String indexName, final String tableName, final String colsSQL) throws TskCoreException |
void | createTable (final String tableName, final String tableSchema) throws TskCoreException |
void | delete (final String tableName, final String sql) throws TskCoreException |
long | insert (final String tableName, final String sql) throws TskCoreException |
long | insert (final String tableName, final String sql, final CaseDbTransaction transaction) throws TskCoreException |
long | insertOrUpdate (final String tableName, final String sql) throws TskCoreException |
long | insertOrUpdate (final String tableName, final String sql, final CaseDbTransaction transaction) throws TskCoreException |
void | select (final String sql, final CaseDbAccessQueryCallback queryCallback) throws TskCoreException |
boolean | tableExists (String tableName) throws TskCoreException |
boolean | tableExists (String tableName, CaseDbTransaction transaction) throws TskCoreException |
void | update (final String tableName, final String sql) throws TskCoreException |
void | update (final String tableName, final String sql, CaseDbTransaction transaction) throws TskCoreException |
This class provides modules with access to the case database to create custom tables/indexes and to query them.
Definition at line 37 of file CaseDbAccessManager.java.
void org.sleuthkit.datamodel.CaseDbAccessManager.alterTable | ( | final String | tableName, |
final String | alterSQL | ||
) | throws TskCoreException |
Alters a table with the specified name.
tableName | name of the table to alter |
alterSQL | SQL to alter the table |
TskCoreException |
Definition at line 277 of file CaseDbAccessManager.java.
References org.sleuthkit.datamodel.SleuthkitCase.beginTransaction(), org.sleuthkit.datamodel.SleuthkitCase.CaseDbTransaction.commit(), and org.sleuthkit.datamodel.SleuthkitCase.CaseDbTransaction.rollback().
void org.sleuthkit.datamodel.CaseDbAccessManager.alterTable | ( | final String | tableName, |
final String | alterSQL, | ||
final CaseDbTransaction | transaction | ||
) | throws TskCoreException |
Alters a table with the specified name.
tableName | name of the table to alter |
alterSQL | SQL to alter the table |
transaction | transaction |
TskCoreException |
Definition at line 304 of file CaseDbAccessManager.java.
References org.sleuthkit.datamodel.SleuthkitCase.getDatabaseType(), and org.sleuthkit.datamodel.TskData.DbType.SQLITE.
boolean org.sleuthkit.datamodel.CaseDbAccessManager.columnExists | ( | String | tableName, |
String | columnName | ||
) | throws TskCoreException |
Checks if a column exists in a table.
tableName | name of the table |
columnName | column name to check |
TskCoreException |
Definition at line 80 of file CaseDbAccessManager.java.
References org.sleuthkit.datamodel.SleuthkitCase.beginTransaction(), org.sleuthkit.datamodel.SleuthkitCase.CaseDbTransaction.commit(), and org.sleuthkit.datamodel.SleuthkitCase.CaseDbTransaction.rollback().
Referenced by org.sleuthkit.datamodel.CaseDbAccessManager.columnExists().
boolean org.sleuthkit.datamodel.CaseDbAccessManager.columnExists | ( | String | tableName, |
String | columnName, | ||
CaseDbTransaction | transaction | ||
) | throws TskCoreException |
Checks if a column exists in a table.
tableName | name of the table |
columnName | column name to check |
transaction | transaction |
TskCoreException |
Definition at line 112 of file CaseDbAccessManager.java.
References org.sleuthkit.datamodel.CaseDbAccessManager.columnExists(), org.sleuthkit.datamodel.SleuthkitCase.getDatabaseType(), and org.sleuthkit.datamodel.TskData.DbType.SQLITE.
void org.sleuthkit.datamodel.CaseDbAccessManager.createIndex | ( | final String | indexName, |
final String | tableName, | ||
final String | colsSQL | ||
) | throws TskCoreException |
Creates an index on the specified table, on specified column(s).
If the index already exists, it does nothing, and no error is generated.
It is recommended that clients of the API use module specific prefixes to prevent name collisions.
indexName | name of index to create |
tableName | name of table to create the index on |
colsSQL | - columns on which to index |
TskCoreException |
Definition at line 349 of file CaseDbAccessManager.java.
References org.sleuthkit.datamodel.SleuthkitCase.acquireSingleUserCaseWriteLock(), and org.sleuthkit.datamodel.SleuthkitCase.releaseSingleUserCaseWriteLock().
void org.sleuthkit.datamodel.CaseDbAccessManager.createTable | ( | final String | tableName, |
final String | tableSchema | ||
) | throws TskCoreException |
Creates a table with the specified name and schema.
If the table already exists, it does nothing, and no error is generated
It is recommended that clients of the API use module specific prefixes to prevent name collisions.
tableName | name of the table to create |
tableSchema | table schema |
TskCoreException |
Definition at line 246 of file CaseDbAccessManager.java.
References org.sleuthkit.datamodel.SleuthkitCase.acquireSingleUserCaseWriteLock(), and org.sleuthkit.datamodel.SleuthkitCase.releaseSingleUserCaseWriteLock().
void org.sleuthkit.datamodel.CaseDbAccessManager.delete | ( | final String | tableName, |
final String | sql | ||
) | throws TskCoreException |
Deletes a row in the specified table.
tableName | table from which to delete the row |
sql | - SQL string specifying the condition to identify the row to delete |
TskCoreException |
Definition at line 638 of file CaseDbAccessManager.java.
References org.sleuthkit.datamodel.SleuthkitCase.acquireSingleUserCaseWriteLock(), and org.sleuthkit.datamodel.SleuthkitCase.releaseSingleUserCaseWriteLock().
long org.sleuthkit.datamodel.CaseDbAccessManager.insert | ( | final String | tableName, |
final String | sql | ||
) | throws TskCoreException |
Inserts a row in the specified table.
tableName | - table to insert into. |
sql | - SQL string specifying column values. |
TskCoreException |
Definition at line 382 of file CaseDbAccessManager.java.
References org.sleuthkit.datamodel.SleuthkitCase.beginTransaction(), org.sleuthkit.datamodel.SleuthkitCase.CaseDbTransaction.commit(), and org.sleuthkit.datamodel.SleuthkitCase.CaseDbTransaction.rollback().
long org.sleuthkit.datamodel.CaseDbAccessManager.insert | ( | final String | tableName, |
final String | sql, | ||
final CaseDbTransaction | transaction | ||
) | throws TskCoreException |
Inserts a row in the specified table, as part of the specified transaction. If the primary key is duplicate, it does nothing.
Note: For PostGreSQL, the caller must include the ON CONFLICT DO NOTHING clause
Caller is responsible for committing the transaction.
tableName | - table to insert into. |
sql | - SQL string specifying column values. |
transaction | transaction in which the insert/update is done |
TskCoreException |
Definition at line 418 of file CaseDbAccessManager.java.
References org.sleuthkit.datamodel.SleuthkitCase.getDatabaseType(), and org.sleuthkit.datamodel.TskData.DbType.SQLITE.
long org.sleuthkit.datamodel.CaseDbAccessManager.insertOrUpdate | ( | final String | tableName, |
final String | sql | ||
) | throws TskCoreException |
Inserts a row in the specified table. If the primary key is duplicate, the existing row is updated.
Note: For PostGreSQL, the caller must include the ON CONFLICT UPDATE clause to handle duplicates
tableName | - table to insert into. |
sql | - SQL string specifying column values. |
TskCoreException |
Definition at line 467 of file CaseDbAccessManager.java.
References org.sleuthkit.datamodel.SleuthkitCase.beginTransaction(), org.sleuthkit.datamodel.SleuthkitCase.CaseDbTransaction.commit(), and org.sleuthkit.datamodel.SleuthkitCase.CaseDbTransaction.rollback().
long org.sleuthkit.datamodel.CaseDbAccessManager.insertOrUpdate | ( | final String | tableName, |
final String | sql, | ||
final CaseDbTransaction | transaction | ||
) | throws TskCoreException |
Inserts a row in the specified table, as part of the specified transaction. If the primary key is duplicate, the existing row is updated. Caller is responsible for committing the transaction.
Note: For PostGreSQL, the caller must include the ON CONFLICT UPDATE clause to handle duplicates
tableName | - table to insert into. |
sql | - SQL string specifying column values. |
transaction | transaction in which the insert/update is done |
TskCoreException |
Definition at line 503 of file CaseDbAccessManager.java.
References org.sleuthkit.datamodel.SleuthkitCase.getDatabaseType(), and org.sleuthkit.datamodel.TskData.DbType.SQLITE.
void org.sleuthkit.datamodel.CaseDbAccessManager.select | ( | final String | sql, |
final CaseDbAccessQueryCallback | queryCallback | ||
) | throws TskCoreException |
Runs the specified SELECT query and then calls the specified callback with the result.
sql | SQL string specifying the columns to select, tables to select from and the WHERE clause. |
queryCallback | Callback object to process the result. |
TskCoreException |
Definition at line 603 of file CaseDbAccessManager.java.
References org.sleuthkit.datamodel.SleuthkitCase.acquireSingleUserCaseReadLock(), and org.sleuthkit.datamodel.SleuthkitCase.releaseSingleUserCaseReadLock().
boolean org.sleuthkit.datamodel.CaseDbAccessManager.tableExists | ( | String | tableName | ) | throws TskCoreException |
Checks if a table exists in the case database.
tableName | name of the table to check |
TskCoreException |
Definition at line 162 of file CaseDbAccessManager.java.
References org.sleuthkit.datamodel.SleuthkitCase.beginTransaction(), org.sleuthkit.datamodel.SleuthkitCase.CaseDbTransaction.commit(), and org.sleuthkit.datamodel.SleuthkitCase.CaseDbTransaction.rollback().
Referenced by org.sleuthkit.datamodel.CaseDbAccessManager.tableExists().
boolean org.sleuthkit.datamodel.CaseDbAccessManager.tableExists | ( | String | tableName, |
CaseDbTransaction | transaction | ||
) | throws TskCoreException |
Checks if a table exists in the case database.
tableName | name of the table to check |
transaction | transaction |
TskCoreException |
Definition at line 193 of file CaseDbAccessManager.java.
References org.sleuthkit.datamodel.SleuthkitCase.getDatabaseType(), org.sleuthkit.datamodel.TskData.DbType.SQLITE, and org.sleuthkit.datamodel.CaseDbAccessManager.tableExists().
void org.sleuthkit.datamodel.CaseDbAccessManager.update | ( | final String | tableName, |
final String | sql | ||
) | throws TskCoreException |
Updates row(s) in the specified table.
tableName | - table to insert into. |
sql | - SQL string specifying column values and conditions. |
TskCoreException |
Definition at line 545 of file CaseDbAccessManager.java.
References org.sleuthkit.datamodel.SleuthkitCase.beginTransaction(), org.sleuthkit.datamodel.SleuthkitCase.CaseDbTransaction.commit(), and org.sleuthkit.datamodel.SleuthkitCase.CaseDbTransaction.rollback().
void org.sleuthkit.datamodel.CaseDbAccessManager.update | ( | final String | tableName, |
final String | sql, | ||
CaseDbTransaction | transaction | ||
) | throws TskCoreException |
Updates row(s) in the specified table, as part of the specified transaction. Caller is responsible for committing the transaction.
tableName | - table to insert into. |
sql | - SQL string specifying column values and conditions. |
transaction | - transaction under which the update is performed. |
TskCoreException |
Definition at line 573 of file CaseDbAccessManager.java.
Copyright © 2011-2018 Brian Carrier. (carrier -at- sleuthkit -dot- org)
This work is licensed under a
Creative Commons Attribution-Share Alike 3.0 United States License.