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
 int getActionType()
          Gets the action type for OperationCommand.
abstract  ILaunchConfiguration getConfiguration()
           
 java.lang.String getConsumerName()
          Gets the consumer name for OperationCommand.
 DatabaseIdentifier getDatabaseIdentifier()
           
 OperationCommand getOperationCommand()
          Creates the OperationCommand object which will be used for results view display.
 int getOperationStatus()
           
 OperationCommand getParentOperationCommand()
          Returns the parent operation command
 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()
           
 void setActionType(int type)
          Sets the action type for OperationCommand.
 void setConsumerName(java.lang.String name)
          Sets the consumer name for OperationCommand.
 void setParentOperCommand(OperationCommand operCommand)
           
 
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

getOperationCommand

public OperationCommand getOperationCommand()
Creates the OperationCommand object which will be used for results view display.


getParentOperationCommand

public OperationCommand getParentOperationCommand()
Returns the parent operation command

Returns:

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()

getOperationStatus

public int getOperationStatus()

setParentOperCommand

public void setParentOperCommand(OperationCommand operCommand)

getActionType

public int getActionType()
Gets the action type for OperationCommand. The default value is OperationCommand.ACTION_EXECUTE.


setActionType

public void setActionType(int type)
Sets the action type for OperationCommand. The default value is OperationCommand.ACTION_EXECUTE.

Parameters:
type -
See Also:
OperationCommand

getConsumerName

public java.lang.String getConsumerName()
Gets the consumer name for OperationCommand. The default value is "SQL Editor".


setConsumerName

public void setConsumerName(java.lang.String name)
Sets the consumer name for OperationCommand. The default value is "SQL Editor".

See Also:
OperationCommand


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