org.eclipse.datatools.sqltools.result
Class ResultManager

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

public class ResultManager
extends java.lang.Object
implements IResultManager

A standard implementation of IResultManager.

Author:
Dafan Yang
See Also:
Serialized Form

Method Summary
 void addResultManagerListener(IResultManagerListener listener)
          Adds listener
 void fireAdded(IResultInstance instance)
          Notifies all the listeners of this result instance added event
 void fireAppended(IResultInstance instance, ResultItem r, int index)
          Notifies all the listeners of this append event
 void fireInstanceReset(IResultInstance instance)
          Notifies all the listeners of this instance reset event
 void fireParametersShow(IResultInstance instance, java.util.List params)
          Notifies all the listeners of this parameters show event
 void fireStatusUpdated(IResultInstance instance)
          Notifies all the listeners of this status change event
 IResultInstance[] getAllResults()
          Returns all currently available result instances.
 IResultInstance getInstance(OperationCommand cmd)
          Given the OperationCommand, returns the instance.
 void initializeContent(IResultManager manager)
           
 void removeAllFinished()
          Removes all finished result instance.
 void removeResultInstance(IResultInstance instance)
          Removes the specified result instance.
 void removeResultInstances(IResultInstance[] instances)
          Removes the specified result instances.
 void removeResultManagerListener(IResultManagerListener listener)
          Removes listener
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addResultManagerListener

public void addResultManagerListener(IResultManagerListener listener)
Description copied from interface: IResultManager
Adds listener

Specified by:
addResultManagerListener in interface IResultManager
Parameters:
listener - the listener

fireAdded

public void fireAdded(IResultInstance instance)
Description copied from interface: IResultManager
Notifies all the listeners of this result instance added event

Specified by:
fireAdded in interface IResultManager
Parameters:
instance - the result instance

fireAppended

public void fireAppended(IResultInstance instance,
                         ResultItem r,
                         int index)
Description copied from interface: IResultManager
Notifies all the listeners of this append event

Specified by:
fireAppended in interface IResultManager
Parameters:
instance - the result instance
r - the result item
index - the index of this item

fireInstanceReset

public void fireInstanceReset(IResultInstance instance)
Description copied from interface: IResultManager
Notifies all the listeners of this instance reset event

Specified by:
fireInstanceReset in interface IResultManager
Parameters:
instance - the result instance

fireParametersShow

public void fireParametersShow(IResultInstance instance,
                               java.util.List params)
Description copied from interface: IResultManager
Notifies all the listeners of this parameters show event

Specified by:
fireParametersShow in interface IResultManager
Parameters:
instance - the result instance
params - the Parameter instances list

fireStatusUpdated

public void fireStatusUpdated(IResultInstance instance)
Description copied from interface: IResultManager
Notifies all the listeners of this status change event

Specified by:
fireStatusUpdated in interface IResultManager
Parameters:
instance - the result instance

getAllResults

public IResultInstance[] getAllResults()
Description copied from interface: IResultManager
Returns all currently available result instances.

Specified by:
getAllResults in interface IResultManager
Returns:
a list of IResultInstance instances

getInstance

public IResultInstance getInstance(OperationCommand cmd)
Description copied from interface: IResultManager
Given the OperationCommand, returns the instance. The returned instance can be a nested result (sub-result)

Specified by:
getInstance in interface IResultManager
Parameters:
cmd - the operation command
Returns:
the result instance

removeAllFinished

public void removeAllFinished()
Description copied from interface: IResultManager
Removes all finished result instance.

Specified by:
removeAllFinished in interface IResultManager

removeResultInstance

public void removeResultInstance(IResultInstance instance)
Description copied from interface: IResultManager
Removes the specified result instance.

Specified by:
removeResultInstance in interface IResultManager
Parameters:
instance - the result instance

removeResultInstances

public void removeResultInstances(IResultInstance[] instances)
Description copied from interface: IResultManager
Removes the specified result instances.

Specified by:
removeResultInstances in interface IResultManager
Parameters:
instances - the result instances

removeResultManagerListener

public void removeResultManagerListener(IResultManagerListener listener)
Description copied from interface: IResultManager
Removes listener

Specified by:
removeResultManagerListener in interface IResultManager
Parameters:
listener - the listener

initializeContent

public void initializeContent(IResultManager manager)