com.simba.dsi.dataengine.impl
Class DSISimpleRowCountResult

java.lang.Object
  extended by com.simba.dsi.dataengine.impl.DSISimpleRowCountResult
All Implemented Interfaces:
IRowCountResult

public class DSISimpleRowCountResult
extends java.lang.Object
implements IRowCountResult

A DSISimpleRowCountResult provides information about a non-result set-generating query, such as DML. The method getRowCount() is used to indicate how many rows were affected by the query.


Constructor Summary
DSISimpleRowCountResult(long rowCount)
          Constructor.
 
Method Summary
 void close()
          Closes the RowCountResult and releases any resources held by it.
 long getRowCount()
          Returns the number of rows affected by query execution.
 boolean hasRowCount()
          Returns true if the RowCountResult has a known row count.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DSISimpleRowCountResult

public DSISimpleRowCountResult(long rowCount)
Constructor.

Parameters:
rowCount - The row count this result represents.
Method Detail

close

public void close()
Closes the RowCountResult and releases any resources held by it.

An IRowCountResult is closed: - just before the parent IQueryExecutor is closed

Specified by:
close in interface IRowCountResult

getRowCount

public long getRowCount()
                 throws com.simba.support.exceptions.ErrorException
Returns the number of rows affected by query execution. The value returned is undefined if the row count is unknown, in which case hasRowCount() should return false.

The value returned must fit into a 32-bit integer when targeting a 32-bit platform, or a 64-bit integer for a 64-bit platform. The value must be non-negative, except if the row count is unknown.

This method will not be called until IQueryExecutor.execute() has been called on the corresponding IQueryExecutor.

Specified by:
getRowCount in interface IRowCountResult
Returns:
Number of rows affected by query execution.
Throws:
com.simba.support.exceptions.ErrorException - If an error occurs.

hasRowCount

public boolean hasRowCount()
Returns true if the RowCountResult has a known row count. Returns false if the number of affected rows is unknown.

Specified by:
hasRowCount in interface IRowCountResult
Returns:
true if the number of rows is known, false otherwise.


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