dataManager
Event Callbacks
Overview
Add an event callback to SqlDataManager object.
This feature is only available for Professional and Enterprise editions of screen-scraper.
Before adding an event to the SqlDataManager, you must build the schema of any tables you will use because events are related to table operations such as inserting data
getLastAutoIncrementKey
Description
Retrieve the last autogenerated primary key, if any, for the given table
Parameters
case insensitve table name
Return Values
Returns a com.screenscraper.datamanager.DataObject containing the primary key.
clearAllData
Description
Clear all data from the data manager without writing it to the database. This includes all data previously committed but not yet written.
Parameters
This method does not receive any parameters.
Return Values
Returns void.
addConstraint
Description
Add a constraint that checks the value of new entries against the value of entries already in the database for a given column and table.
register
Description
Create an SqlDuplicateFilter for a specific table and register it with the data manager.
SqlDuplicateFilter
Overview
SqlDuplicateFilters are designed to filter duplicates when more information than just a primary key might define a duplicate entry. For example, you might define a unique person by their SSN, driver's license number, or by their first name, last name, and phone number. It is also possible that a single person may have multiple phone numbers, and if any of them match then the duplicate constraint should be met. Using an SqlDuplicateFilter can check for conditions such as this and correctly recognize duplicate entries.
setAutoManyToMany
Description
Sets whether or not the data manager should automatically take care of many-to-many relationships.
setLoggingLevel
Description
Set the error logging level. Currently only DEBUG and ERROR levels are supported. At the DEBUG level, all queries and results will be output to the log.
addForeignKey
Description
Manually setup table connection (key matching).
getConnection
Description
Retrieve the connection object of the data manager. This can be helpful if you want to do something that the data manager cannot do easily, such as query the database.