Java event handlers for a scripted data set element
The scripted data set interface extends the IDataSetEventHandler interface, which has four methods. The scripted data set interface adds four new methods to the four of the IDataSourceEventHandler interface. Of the four new methods, three must be fully implemented and the fourth may be empty. A Java class that provides scripted data set event handlers must implement the IScriptedDataSetEventHandler interface or extend the ScriptedDataSetAdapter class. A Java class that provides scripted data set event handlers must implement the four methods of the IScriptedDataSetEventHandler interface plus the four methods of the IDataSourceEventHandler interface, which it extends. Table 38‑5 lists the four additional methods that you must implement for a scripted data set element.
Table 38‑5 Scripted data set event handler methods
Method
Description
open( IDataSetInstance dataSet )
Called when the data set is opened. Use this method to initialize variables and to prepare for fetching rows.
fetch( IDataSetInstance dataSet, IUpdatableDataSetRow dataSetRow )
Called at row processing time. Use this method to fetch data with which to populate the row object. This method must return true if the fetch is successful and false if it is not.
close( IDataSetInstance dataSet )
Called upon completion of processing a data set. Use this method to perform clean‑up operations.