com.simba.dsi.dataengine.utilities
Class ExecutionResult

java.lang.Object
  extended by com.simba.dsi.dataengine.utilities.ExecutionResult

public final class ExecutionResult
extends java.lang.Object

An ExecutionResult encapsulates an IErrorResult, an IResultSet or an IRowCountResult, and an indicator marking which type of result the ExecutionResult holds.


Constructor Summary
ExecutionResult(IErrorResult errorResult, boolean isResultSet)
          Constructor.
ExecutionResult(IResultSet resultSet)
          Constructor.
ExecutionResult(IRowCountResult rowCountResult)
          Constructor.
 
Method Summary
 IResultSet getGeneratedResult()
          Returns the generated result held by this ExecutionResult.
 java.lang.Object getResult()
          Returns the result held by this ExecutionResult.
 long getRowCount()
          Gets row count of the result type independent of the type.
 ExecutionResultType getType()
          Gets the type of result held by this ExecutionResult.
 void setGeneratedResult(IResultSet generatedResult)
          Sets the generated result held by this ExecutionResult.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExecutionResult

public ExecutionResult(IErrorResult errorResult,
                       boolean isResultSet)
Constructor.

Makes an ExecutionResult that holds an IErrorResult.

Parameters:
errorResult - The error result which this ExecutionResult will hold.
isResultSet - True if the error is for an IResultSet, otherwise false.

ExecutionResult

public ExecutionResult(IResultSet resultSet)
Constructor.

Makes an ExecutionResult that holds an IResultSet.

Parameters:
resultSet - The result set which this ExecutionResult will hold.

ExecutionResult

public ExecutionResult(IRowCountResult rowCountResult)
Constructor.

Makes an ExecutionResult that holds an IRowCountResult.

Parameters:
rowCountResult - The row count result which this ExecutionResult will hold.
Method Detail

getResult

public java.lang.Object getResult()
Returns the result held by this ExecutionResult.

Returns:
The result held by this ExecutionResult.

getType

public ExecutionResultType getType()
Gets the type of result held by this ExecutionResult.

Returns:
Type of result held by this ExecutionResult.

getRowCount

public long getRowCount()
                 throws com.simba.support.exceptions.ErrorException
Gets row count of the result type independent of the type.

Returns:
the number of rows.
Throws:
com.simba.support.exceptions.ErrorException

getGeneratedResult

public IResultSet getGeneratedResult()
Returns the generated result held by this ExecutionResult.

Returns:
The generated result held by this ExecutionResult.

setGeneratedResult

public void setGeneratedResult(IResultSet generatedResult)
Sets the generated result held by this ExecutionResult.



Copyright © 2006-2014 Simba Technologies Incorporated. All Rights Reserved.