Copyright 2009,2010, Lapetus Systems Ltd. (All rights reserved)
com.lapetus_ltd.api.db.control
Interface ILptsFactoryRowSetListener
- All Known Implementing Classes:
- TLptsRowSetOutputListener, TLptsViewDataDialog
public interface ILptsFactoryRowSetListener
Class Description : The listener for rowset events.
This listener contains two functions which are utilised during the processing of the rowset rows.
The processNewRowSetRows(com.lapetus_ltd.api.db.control.TLptsRowSetEvent)
function is actually a player in the decision making process of the rowsets.
In other words the implementing application could decide that it wishes to have the rowset to itself for internal processing.
This would mean that the TLptsFactoryRowSet
could be informed to either process each row (and send an event) or to just
send the rowset with no further processing (the implementing application decides).
$LastChangedRevision: 1059 $
$LastChangedDate:: 2010-08-30 10:15:35#$
processNewRowSetRows
boolean processNewRowSetRows(TLptsRowSetEvent rowSetEvent)
A new rowset has been created and TLptsFactoryRowSet is asking if it should continue processing the rows.
The reply to this function is only taken into consideration when we are processing a SELECT statement.
The UPDATE, INSERT and DELETE statements provide feedback through this function, but do not process the reply
from the application as the status is given at the end of the operation.
NOTE: We return TRUE from the implementation if we want the factory to process all the rows of this SELECT rowset.
This then causes the factory to send a rowEvent for every row, using rowEvent below.
If we have a primary rowset, which receives a FALSE from this function, then the dynamic(children) rowsets cannot be processed.
We should only return false on full rowsets, which are not primary (rowsetEvent.getStatement().hasDynamicSubStatement() is false).
When false is returned it is the responsibility of the application to process the rowset.
See TLptsRowSetEvent
for more information and examples.
- Parameters:
rowSetEvent
- A new row or null if there is an error.
- Returns:
- True if we want the rows to be processed by the rowset factory.
If we return true, we should not perform actions on the rowset as the row cursor will be moved by TLptsFactoryRowSet.
rowEvent
void rowEvent(TLptsRowEvent rowEvent)
- A new row is ready for consumption by the listener.
Each row of the rowset will provide a rowEvent until an interrupt (TLptsStatement.interruptExecution()) or the rowset ends.
See TLptsFactoryRowSet.executeSelectStatement(com.lapetus_ltd.api.db.control.TLptsStatement, int, int, boolean)
for more information.
- Parameters:
rowEvent
- This is the new row. The event type indicates what kind of action it is.
Copyright 2009,2010, Lapetus Systems Ltd. (All rights reserved)