org.openqa.selenium.html5
Class ResultSet

java.lang.Object
  extended by org.openqa.selenium.html5.ResultSet

public class ResultSet
extends Object

Represents database result set for SQL transactions and queries.


Constructor Summary
ResultSet(int insertId, int rowsAffected, ResultSetRows rows)
           
 
Method Summary
 int getLastInsertedRowId()
          Gets the row ID of the inserted row if the statement inserted a row.
 int getNumberOfRowsAffected()
          Gets the number of rows that were changed by the SQL statement.
 ResultSetRows rows()
          Returns the rows returned by the statement executed in the order returned by the database.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ResultSet

public ResultSet(int insertId,
                 int rowsAffected,
                 ResultSetRows rows)
Method Detail

getLastInsertedRowId

public int getLastInsertedRowId()
Gets the row ID of the inserted row if the statement inserted a row. If multiple rows were inserted, this returns the row ID of the last row inserted. If the statement did not insert a row this returns -1.

Returns:
An integer representing the index of the last row inserted if any, returns -1 otherwise

getNumberOfRowsAffected

public int getNumberOfRowsAffected()
Gets the number of rows that were changed by the SQL statement. If the statement did not affect any rows then this returns zero.

Returns:
an integer representing the number of rows changed

rows

public ResultSetRows rows()
Returns the rows returned by the statement executed in the order returned by the database. If no rows were returned then the returned object will be empty.

Returns:
A ResultSetRows containing the database results as returned by the database. Returns am empty ResultSetRows if no results were returned (i.e. ResultSetRowList.size() = 0)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012. All Rights Reserved.