org.eclipse.datatools.sqltools.result
Class OperationCommand

java.lang.Object
  extended by org.eclipse.datatools.sqltools.result.OperationCommand
All Implemented Interfaces:
java.io.Serializable

public class OperationCommand
extends java.lang.Object
implements java.io.Serializable

The OperationCommand is used to uniquely identify an execution result in SQL Results View, it is the starting point to use SQL Results View.

The consumer needs to initiate an instance of OperationCommand first, and then uses ResultsViewAPI to append message or result set, or set parameters to SQL Results View. When using the ResultsViewAPI to append result item to SQL Results View, this instance should always be given.

Author:
Dafan Yang
See Also:
ResultsViewAPI, Serialized Form

Field Summary
static int ACTION_AFTER_RUN
           
static int ACTION_BEFORE_RUN
           
static int ACTION_CREATE
           
static int ACTION_DEBUG
           
static int ACTION_DEPLOY
           
static int ACTION_DROP
           
static int ACTION_EDIT
           
static int ACTION_EXECUTE
           
static int ACTION_EXPORT
           
static int ACTION_EXTRACT
           
static int ACTION_IMPORT
           
static int ACTION_LOAD
           
static int ACTION_RUN
           
static int ACTION_VALIDATE
           
static int ACTION_VIEW
           
static int STATUS_CRITICAL_ERROR
           
static int STATUS_FAILED
           
static int STATUS_RUNNING
           
static int STATUS_STARTED
           
static int STATUS_SUCCEEDED
           
static int STATUS_TERMINATED
           
static int STATUS_WARNING
           
 
Constructor Summary
OperationCommand(int type, java.lang.String displayStr, java.lang.String consumerName, java.lang.String profileName, java.lang.String databaseName)
          Constructs an instance of OperationCommand.
OperationCommand(int type, java.lang.String displayStr, java.lang.String consumerName, java.lang.String profileName, java.lang.String databaseName, java.io.Serializable data)
          Construstor
 
Method Summary
static java.lang.String getActionString(int actionId)
          Converts the action id to action string.
 int getActionType()
          Returns the action type
 java.lang.String getConsumerName()
          Returns the consumer's name
 java.io.Serializable getData()
          Returns the data
 java.lang.String getDatabaseName()
          Returns the database name
 java.lang.String getDisplayString()
          Returns the display string of this operation
 java.lang.String getProfileName()
          Returns the connection profile name
static Image getStatusImage(int statusId)
          Returns the image of given status
static java.lang.String getStatusString(int statusId)
          Converts the status id to status string
 void setData(java.io.Serializable _data)
          Sets the data
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATUS_CRITICAL_ERROR

public static final int STATUS_CRITICAL_ERROR
See Also:
Constant Field Values

STATUS_FAILED

public static final int STATUS_FAILED
See Also:
Constant Field Values

STATUS_TERMINATED

public static final int STATUS_TERMINATED
See Also:
Constant Field Values

STATUS_WARNING

public static final int STATUS_WARNING
See Also:
Constant Field Values

STATUS_SUCCEEDED

public static final int STATUS_SUCCEEDED
See Also:
Constant Field Values

STATUS_RUNNING

public static final int STATUS_RUNNING
See Also:
Constant Field Values

STATUS_STARTED

public static final int STATUS_STARTED
See Also:
Constant Field Values

ACTION_EXECUTE

public static final int ACTION_EXECUTE
See Also:
Constant Field Values

ACTION_CREATE

public static final int ACTION_CREATE
See Also:
Constant Field Values

ACTION_DEBUG

public static final int ACTION_DEBUG
See Also:
Constant Field Values

ACTION_DEPLOY

public static final int ACTION_DEPLOY
See Also:
Constant Field Values

ACTION_DROP

public static final int ACTION_DROP
See Also:
Constant Field Values

ACTION_EDIT

public static final int ACTION_EDIT
See Also:
Constant Field Values

ACTION_EXPORT

public static final int ACTION_EXPORT
See Also:
Constant Field Values

ACTION_EXTRACT

public static final int ACTION_EXTRACT
See Also:
Constant Field Values

ACTION_IMPORT

public static final int ACTION_IMPORT
See Also:
Constant Field Values

ACTION_LOAD

public static final int ACTION_LOAD
See Also:
Constant Field Values

ACTION_BEFORE_RUN

public static final int ACTION_BEFORE_RUN
See Also:
Constant Field Values

ACTION_AFTER_RUN

public static final int ACTION_AFTER_RUN
See Also:
Constant Field Values

ACTION_RUN

public static final int ACTION_RUN
See Also:
Constant Field Values

ACTION_VALIDATE

public static final int ACTION_VALIDATE
See Also:
Constant Field Values

ACTION_VIEW

public static final int ACTION_VIEW
See Also:
Constant Field Values
Constructor Detail

OperationCommand

public OperationCommand(int type,
                        java.lang.String displayStr,
                        java.lang.String consumerName,
                        java.lang.String profileName,
                        java.lang.String databaseName)
Constructs an instance of OperationCommand.

Parameters:
type - the action type, should be one of the action types defined in this class
displayStr - string used to display, for example SQL statement, should not be null
consumerName - name of the caller
profileName - connection profile name, should not be null
databaseName - database name, should not be null

OperationCommand

public OperationCommand(int type,
                        java.lang.String displayStr,
                        java.lang.String consumerName,
                        java.lang.String profileName,
                        java.lang.String databaseName,
                        java.io.Serializable data)
Construstor

Parameters:
data - consumer can use this field to store anything
Method Detail

getDisplayString

public java.lang.String getDisplayString()
Returns the display string of this operation

Returns:
the display string of this operation

getActionType

public int getActionType()
Returns the action type

Returns:
the action type

getConsumerName

public java.lang.String getConsumerName()
Returns the consumer's name

Returns:
the consumer's name

getProfileName

public java.lang.String getProfileName()
Returns the connection profile name

Returns:
the connection profile name

getDatabaseName

public java.lang.String getDatabaseName()
Returns the database name

Returns:
the database name

getActionString

public static java.lang.String getActionString(int actionId)
Converts the action id to action string.

Parameters:
actionId - the action type
Returns:
the action string

getStatusImage

public static Image getStatusImage(int statusId)
Returns the image of given status

Parameters:
statusId - the status id
Returns:
the image of this status

getStatusString

public static java.lang.String getStatusString(int statusId)
Converts the status id to status string

Parameters:
statusId - the id of the status
Returns:
the string that describes this status

getData

public java.io.Serializable getData()
Returns the data

Returns:
the data

setData

public void setData(java.io.Serializable _data)
Sets the data

Parameters:
_data - the data


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