|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ResultSetProducer
Interface that provides all necessary methods for working with any type of WabitObject that can produce a ResultSet.
| Method Summary | |
|---|---|
void |
addResultSetListener(ResultSetListener listener)
Adds the given listener to this result set producer's list of interested parties. |
java.util.concurrent.Future<ResultSetAndUpdateCountCollection> |
execute()
Executes the current query represented by this object, returning the results from the query's execution. |
void |
removeResultSetListener(ResultSetListener listener)
Removes the given listener from the listener list. |
| Methods inherited from interface ca.sqlpower.wabit.WabitBackgroundWorker |
|---|
cancel, isRunning |
| Methods inherited from interface ca.sqlpower.wabit.WabitObject |
|---|
getParent |
| Methods inherited from interface ca.sqlpower.object.SPObject |
|---|
addChild, addSPListener, allowsChildren, begin, childPositionOffset, cleanup, commit, generateNewUUID, getChildren, getChildren, getDependencies, getName, getSession, getUUID, removeChild, removeDependency, removeSPListener, rollback, setName, setParent, setUUID |
| Method Detail |
|---|
java.util.concurrent.Future<ResultSetAndUpdateCountCollection> execute()
throws ResultSetProducerException,
java.lang.InterruptedException
Every call to this method causes a ResultSetEvent to be fired, whether or not the call simply returns the same cached results as a previous invocation.
If the query is in a state where it can't be executed (because it is not sufficiently configured to issue a sensible query, or because the connection to the data source can't be established), the event will still be fired if it results in a state change from the previous execution attempt. In these cases, the event will deliver a null ResultSet to listeners.
Implementations of ResultSetProducer are allowed to fire the ResultSetEvent while the query is locked against concurrent and/or recursive execution, so it is vitally important that ResultSetListeners do not attempt to re-execute the query in response to any ResultSetEvent. Such behaviour by ResultSetListeners is unsafe in general, and may cause deadlock.
ResultSetProducerException - If there was any problem obtaining the result set
java.lang.InterruptedException - If the calling thread is interrupted while blocked waiting
for another call to execute() to complete.
void addResultSetListener(@Nonnull
ResultSetListener listener)
listener - The listener to add (must not be null).void removeResultSetListener(ResultSetListener listener)
listener - The listener to remove. Nulls are ignored.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||