|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.datatools.sqltools.result.internal.model.ResultInstance
public class ResultInstance
A standard implementation of IResultInstance
| Constructor Summary | |
|---|---|
ResultInstance(IResultManager resultmanager,
OperationCommand command,
java.lang.Runnable terminateHandler)
|
|
ResultInstance(IResultManager resultmanager,
OperationCommand command,
java.lang.Runnable terminateHandler,
IResultInstance parentResult)
|
|
| Method Summary | |
|---|---|
int |
calculateStatus()
Calculates the status of this result instance based on the status of its sub-results |
void |
createSubResult(OperationCommand cmd,
java.lang.Runnable terminateHandler)
Creates a sub results |
void |
dispose()
Disposes resources after the instance terminated. |
long |
getElapsedTime()
|
java.util.Date |
getExecuteDate()
Returns the date-time this result instance was created |
java.lang.String |
getExecuteTime()
Returns the time in string this result instance was created |
java.lang.Throwable[] |
getFailThrowables()
Returns the exceptions thrown when generating the result instance |
java.lang.String |
getFileName()
|
int |
getFrequency()
Returns the execution frequency |
ResultItem |
getItem(int index)
Returns the result item at given index (base on 0) |
int |
getItemCount()
Returns number of result items. |
OperationCommand |
getOperationCommand()
Returns the operation command that produces this result instance. |
java.util.List |
getParameters()
Returns the parameters |
IResultInstance |
getParentResult()
Returns the parent result of this result |
java.util.List |
getResults()
|
int |
getStatus()
Returns the current status. |
java.util.List |
getSubResults()
Returns the sub-results of this result |
boolean |
hasTerminateHandler()
Checks if there is a terminate handler |
void |
increaseFrequency()
Inceases the execution frequency by 1, will only be called when this instance is re-executing |
boolean |
isFinished()
Checks if this result is finished |
boolean |
isMayHaveSubResults()
Return the current flag value which indicates that this IResultInstance object may have sub results. |
boolean |
isParentResult()
Checks if the result instance is a parent result |
void |
morePlainMessage(java.lang.String msg)
Appends a plain message. |
void |
moreResultItem(ResultItem item)
Appends a new result item. |
void |
moreResultSet(IResultSetObject resultset)
Appends a new result set. |
void |
moreResultSet(java.sql.ResultSet resultset)
Appends a new result set. |
void |
moreStatusMessage(java.lang.String msg)
Appends a status message, which will be displayed on 'Status' tab when using multiple tabs display mode |
void |
moreThrowable(java.lang.Throwable th)
Appends an exception |
void |
moreUpdateCount(int updateCount)
Appends a new update count. |
void |
reclaimedTransientThings()
When the detail information of this result instance is not needed, this method should be invoked to wait for reclaiming the detail information. |
void |
resetInstance()
Clears all the result items and parameters |
void |
setElapsedTime(long time)
|
void |
setMayHaveSubResults(boolean mayHaveSubResults)
Set new value to the flag which indicates that this IResultInstance object may have sub results. |
void |
showParameters(java.util.List params)
Shows the given parameters on SQL Results View |
void |
terminate()
Terminates the instance. |
void |
updateStatus(int status)
Updates the status of this result instance |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ResultInstance(IResultManager resultmanager,
OperationCommand command,
java.lang.Runnable terminateHandler)
public ResultInstance(IResultManager resultmanager,
OperationCommand command,
java.lang.Runnable terminateHandler,
IResultInstance parentResult)
| Method Detail |
|---|
public void morePlainMessage(java.lang.String msg)
IResultInstance
morePlainMessage in interface IResultInstancemsg - the plain messagepublic void moreStatusMessage(java.lang.String msg)
IResultInstance
moreStatusMessage in interface IResultInstancemsg - the status messagepublic void moreUpdateCount(int updateCount)
IResultInstance
moreUpdateCount in interface IResultInstanceupdateCount - the update count
public void moreResultSet(java.sql.ResultSet resultset)
throws java.sql.SQLException
IResultInstance
moreResultSet in interface IResultInstanceresultset - instance of JDBC ResultSet
java.sql.SQLException - - if a database access error occurspublic void moreResultItem(ResultItem item)
IResultInstance
moreResultItem in interface IResultInstanceitem - the result itempublic OperationCommand getOperationCommand()
IResultInstance
getOperationCommand in interface IResultInstancepublic int getStatus()
IResultInstance
getStatus in interface IResultInstanceOperationCommand.STATUS_RUNNING,
OperationCommand.STATUS_SUCCEEDED,
OperationCommand.STATUS_FAILED,
OperationCommand.STATUS_TERMINATED,
OperationCommand.STATUS_STARTED,
OperationCommand.STATUS_CRITICAL_ERROR,
OperationCommand.STATUS_WARNINGpublic boolean isFinished()
IResultInstance
isFinished in interface IResultInstancetrue if this instance finishspublic ResultItem getItem(int index)
IResultInstance
getItem in interface IResultInstanceindex - the index
public int getItemCount()
IResultInstance
getItemCount in interface IResultInstancepublic void terminate()
IResultInstance
terminate in interface IResultInstancepublic void dispose()
IResultInstance
dispose in interface IResultInstancepublic java.lang.String getExecuteTime()
IResultInstance
getExecuteTime in interface IResultInstancepublic java.util.Date getExecuteDate()
IResultInstance
getExecuteDate in interface IResultInstancepublic void updateStatus(int status)
IResultInstance
updateStatus in interface IResultInstancestatus - the new statusOperationCommand.STATUS_STARTED,
OperationCommand.STATUS_RUNNING,
OperationCommand.STATUS_SUCCEEDED,
OperationCommand.STATUS_FAILED,
OperationCommand.STATUS_TERMINATED,
OperationCommand.STATUS_WARNING,
OperationCommand.STATUS_CRITICAL_ERRORpublic void resetInstance()
IResultInstance
resetInstance in interface IResultInstancepublic void moreResultSet(IResultSetObject resultset)
IResultInstance
moreResultSet in interface IResultInstanceresultset - the IResultSetObject instancepublic void showParameters(java.util.List params)
IResultInstance
showParameters in interface IResultInstanceparams - the Parameter instances listParameterpublic boolean hasTerminateHandler()
IResultInstance
hasTerminateHandler in interface IResultInstancetrue if there is a terminate handlerpublic java.util.List getParameters()
IResultInstance
getParameters in interface IResultInstanceParameter instances listpublic int getFrequency()
IResultInstance
getFrequency in interface IResultInstancepublic void increaseFrequency()
IResultInstance
increaseFrequency in interface IResultInstancepublic java.lang.Throwable[] getFailThrowables()
IResultInstance
getFailThrowables in interface IResultInstancepublic void moreThrowable(java.lang.Throwable th)
IResultInstance
moreThrowable in interface IResultInstanceth - the exception
public void createSubResult(OperationCommand cmd,
java.lang.Runnable terminateHandler)
IResultInstance
createSubResult in interface IResultInstancecmd - the operation request object of the new resultterminateHandler - the terminate handlerpublic java.util.List getSubResults()
IResultInstance
getSubResults in interface IResultInstancepublic IResultInstance getParentResult()
IResultInstance
getParentResult in interface IResultInstancepublic boolean isParentResult()
IResultInstance
isParentResult in interface IResultInstancetrue if it is a parent result, false if it is a sub-resultpublic int calculateStatus()
IResultInstance
calculateStatus in interface IResultInstancepublic boolean isMayHaveSubResults()
IResultInstance
isMayHaveSubResults in interface IResultInstancepublic void setMayHaveSubResults(boolean mayHaveSubResults)
IResultInstance
setMayHaveSubResults in interface IResultInstancemayHaveSubResults - the new flag valuepublic java.lang.String getFileName()
public long getElapsedTime()
public void setElapsedTime(long time)
public java.util.List getResults()
public void reclaimedTransientThings()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||