org.eclipse.datatools.sqltools.sqleditor.result
Class ResultSupportRunnable

java.lang.Object
  extended byJob
      extended byorg.eclipse.datatools.sqltools.sqleditor.result.ResultSupportRunnable
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
CallableSQLResultRunnable, SimpleSQLResultRunnable

public abstract class ResultSupportRunnable
extends Job
implements java.lang.Runnable

This is an utility class, that intended to be used by other parts of the system that want to utilize the result view to display their run information. Child class should override certain methods of this class. TODO add extension point for this class

Author:
Yang Liu
See Also:
Serialized Form

Constructor Summary
ResultSupportRunnable(java.lang.String name, IProgressMonitor parentMonitor, DatabaseIdentifier databaseIdentifier)
           
 
Method Summary
abstract  ILaunchConfiguration getConfiguration()
           
 DatabaseIdentifier getDatabaseIdentifier()
           
 void loopThroughResults(java.sql.Statement cstmt, boolean moreResult)
          loop through the results (update count and result set), push the results into the result instance.
 void run()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResultSupportRunnable

public ResultSupportRunnable(java.lang.String name,
                             IProgressMonitor parentMonitor,
                             DatabaseIdentifier databaseIdentifier)
Parameters:
name -
Method Detail

run

public void run()
Specified by:
run in interface java.lang.Runnable

loopThroughResults

public void loopThroughResults(java.sql.Statement cstmt,
                               boolean moreResult)
                        throws java.sql.SQLException
loop through the results (update count and result set), push the results into the result instance. Here attention should be paid to the statement status, because the status of statement is different after running normal sql command such as select operation and after running stored procedure.

Parameters:
cstmt -
moreResult -
Throws:
java.sql.SQLException

getConfiguration

public abstract ILaunchConfiguration getConfiguration()

getDatabaseIdentifier

public DatabaseIdentifier getDatabaseIdentifier()


Copyright © 2006 Actuate, IBM Corporation, Sybase, Inc. and others. All rights reserved.