-
- Type Parameters:
T
- the type of report to handle
- All Superinterfaces:
DatabaseConnectionProvider
,DatabaseConnectionUser
public interface BulkReportUpdater<T extends Report> extends DatabaseConnectionProvider
Interface for table classes that support bulk report updates.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
AbstractIndexedTable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
bulkStore(T[] records, DataType[] types, String skipFields, int batchSize, boolean autoCommit, boolean newConnection)
Stores the records.void
stopBulkStore()
Interrupts a currently running bulk store, if possible.-
Methods inherited from interface adams.db.DatabaseConnectionProvider
getDatabaseConnection
-
-
-
-
Method Detail
-
bulkStore
boolean bulkStore(T[] records, DataType[] types, String skipFields, int batchSize, boolean autoCommit, boolean newConnection)
Stores the records. Removes any previously existing reference values.- Parameters:
records
- the reporttypes
- the data types to importskipFields
- the fields to skip (regular expression), null to accept allbatchSize
- the maximum number of records in one batchautoCommit
- whether to use auto-commit or not (turning off may impact other transactions!)newConnection
- uses a separate database connection just for this connection (then no auto-commit doesn't affect the rest)- Returns:
- true if successfully inserted/updated
-
stopBulkStore
void stopBulkStore()
Interrupts a currently running bulk store, if possible.
-
-