Java Doc for ResultSet.java in  » Apache-Harmony-Java-SE » java-package » java » sql » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Apache Harmony Java SE » java package » java.sql 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.sql.ResultSet

ResultSet
public interface ResultSet (Code)
An interface to an Object which represents a Table of Data, typically returned as the result of a Query to a Database.

ResultSets have a Cursor which points to a current row of data. When a ResultSet is created, the Cursor is positioned before the first row. To move the Cursor to the next row in the table, use the next method. The next method returns true until there are no more rows in the ResultSet, when it returns false.

The default type of ResultSet cannot be updated and its cursor can only move forward through the rows of data. This means that it is only possible to read through it once. However, it is possible to create types of ResultSet that can be updated and also types where the cursor can be scrolled forward and backward through the rows of data. This is shown in the following code example: Connection con; Statement aStatement = con.createStatement( ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE ); ResultSet theResultSet = theStatement.executeQuery("SELECT price, quantity FROM STOCKTABLE"); // theResultSet will be both scrollable and updateable

The ResultSet interface provides a series of methods for retrieving data from columns in the current row, such as getDate, getFloat. The columns are identified either by their index number (starting at 1) or by their name - there are separate methods for both techniques of column addressing. The column names are case insensitive. If several columns have the same name, then the getter methods use the first matching column. This means that if column names are used, it is not possible to guarantee that the name will retrieve data from the intended column - for certainty it is better to use column indexes. Ideally the columns should be read left-to-right and read once only, since not all * databases are optimized to handle other techniques of reading the data.

When reading data, the JDBC driver maps the SQL data retrieved from the database to the Java type implied by the method invoked by the application. The JDBC specification has a table of allowable mappings from SQL types to Java types.

There are also methods for writing data into the ResultSet, such as updateInt, updateString. The update methods can be used either to modify the data of an existing row or to insert new data rows into the ResultSet. Modification of existing data involves moving the Cursor to the row which needs modification and then using the update methods to modify the data, followed by calling the ResultSet.updateRow method. For insertion of new rows, the cursor is first moved to a special row called the Insert Row, data is added using the update methods, followed by calling the ResultSet.insertRow method.

A ResultSet is closed if the Statement object which generated it closed, executed again or is used to retrieve the next result from a sequence of results.



Field Summary
final public static  intCLOSE_CURSORS_AT_COMMIT
     A constant used to indicate that a ResultSet object must be closed when the method Connection.commit is invoked.
final public static  intCONCUR_READ_ONLY
     A constant used to indicate the Concurrency Mode for a ResultSet object that cannot be updated.
final public static  intCONCUR_UPDATABLE
     A constant used to indicate the Concurrency Mode for a ResultSet object that can be updated.
final public static  intFETCH_FORWARD
    
final public static  intFETCH_REVERSE
    
final public static  intFETCH_UNKNOWN
     A constant used to indicate that the order of processing of the rows of a ResultSet is unknown.
final public static  intHOLD_CURSORS_OVER_COMMIT
     A constant used to indicate that a ResultSet object must not be closed when the method Connection.commit is invoked.
final public static  intTYPE_FORWARD_ONLY
    
final public static  intTYPE_SCROLL_INSENSITIVE
    
final public static  intTYPE_SCROLL_SENSITIVE
    


Method Summary
public  booleanabsolute(int row)
     Moves the Cursor to a specified row number in the ResultSet.
public  voidafterLast()
     Moves the Cursor to the end of the ResultSet, after the last row.
public  voidbeforeFirst()
     Moves the Cursor to the start of the ResultSet, before the first row.
public  voidcancelRowUpdates()
     Cancels any updates made to the current row in the ResultSet.
public  voidclearWarnings()
     Clears all the warnings related to this ResultSet.
public  voidclose()
     Releases this ResultSet's database and JDBC resources.
public  voiddeleteRow()
     Deletes the current row from the ResultSet and from the underlying database.
public  intfindColumn(String columnName)
     Gets the index number for a column in the ResultSet from the provided Column Name.
public  booleanfirst()
     Shifts the cursor position to the first row in the ResultSet.
public  ArraygetArray(int columnIndex)
     Gets the content of a column specified as a column index in the current row of this ResultSet as a java.sql.Array.
public  ArraygetArray(String colName)
     Gets the value of a column specified as a column name as a java.sql.Array.
public  InputStreamgetAsciiStream(int columnIndex)
     Gets the value of a column specified as a column index as an ASCII character stream.
public  InputStreamgetAsciiStream(String columnName)
     Gets the value of a column specified as a column name as an ASCII character stream.
public  BigDecimalgetBigDecimal(int columnIndex)
     Gets the value of a column specified as a column index as a java.math.BigDecimal.
public  BigDecimalgetBigDecimal(int columnIndex, int scale)
    
public  BigDecimalgetBigDecimal(String columnName)
     Gets the value of a column specified as a column name, as a java.math.BigDecimal.
public  BigDecimalgetBigDecimal(String columnName, int scale)
    
public  InputStreamgetBinaryStream(int columnIndex)
     Gets the value of a column specified as a column index as a binary stream.

This method can be used to read LONGVARBINARY values.

public  InputStreamgetBinaryStream(String columnName)
     Gets the value of a column specified as a column name as a binary stream.

This method can be used to read LONGVARBINARY values.

public  BlobgetBlob(int columnIndex)
     Gets the value of a column specified as a column index as a java.sql.Blob object.
public  BlobgetBlob(String columnName)
     Gets the value of a column specified as a column name, as a java.sql.Blob object.
public  booleangetBoolean(int columnIndex)
     Gets the value of a column specified as a column index as a boolean.
Parameters:
  columnIndex - the index of the column to read a boolean value from the column.
public  booleangetBoolean(String columnName)
     Gets the value of a column specified as a column name, as a boolean.
Parameters:
  columnName - the name of the column to read a boolean value from the column.
public  bytegetByte(int columnIndex)
     Gets the value of a column specified as a column index as a byte.
Parameters:
  columnIndex - the index of the column to read a byte containing the value of the column.
public  bytegetByte(String columnName)
     Gets the value of a column specified as a column name as a byte.
Parameters:
  columnName - the name of the column to read a byte containing the value of the column.
public  byte[]getBytes(int columnIndex)
     Gets the value of a column specified as a column index as a byte array.
Parameters:
  columnIndex - the index of the column to read a byte array containing the value of the column.
public  byte[]getBytes(String columnName)
     Gets the value of a column specified as a column name as a byte array.
Parameters:
  columnName - the name of the column to read a byte array containing the value of the column.
public  ReadergetCharacterStream(int columnIndex)
     Gets the value of a column specified as a column index as a java.io.Reader object.
Parameters:
  columnIndex - the index of the column to read a Reader holding the value of the column.
public  ReadergetCharacterStream(String columnName)
     Gets the value of a column specified as a column name as a java.io.Reader object.
Parameters:
  columnName - the name of the column to read a Reader holding the value of the column.
public  ClobgetClob(int columnIndex)
     Gets the value of a column specified as a column index as a java.sql.Clob.
Parameters:
  columnIndex - the index of the column to read a Clob object representing the value in the column.
public  ClobgetClob(String colName)
     Gets the value of a column specified as a column name as a java.sql.Clob.
Parameters:
  colName - the name of the column to read a Clob object representing the value in the column.
public  intgetConcurrency()
     Gets the concurrency mode of this ResultSet.
public  StringgetCursorName()
     Gets the name of the SQL cursor of this ResultSet.
public  DategetDate(int columnIndex)
     Gets the value of a column specified as a column index as a java.sql.Date.
Parameters:
  columnIndex - the index of the column to read a java.sql.Date matching the column value.
public  DategetDate(int columnIndex, Calendar cal)
     Gets the value of a column specified as a column index as a java.sql.Date.
public  DategetDate(String columnName)
     Gets the value of a column specified as a column name as a java.sql.Date.
Parameters:
  columnName - the name of the column to read a java.sql.Date matching the column value.
public  DategetDate(String columnName, Calendar cal)
     Gets the value of a column specified as a column name, as a java.sql.Date object.
Parameters:
  columnName - the name of the column to read
Parameters:
  cal - java.util.Calendar to use in constructing the Date.
public  doublegetDouble(int columnIndex)
     Gets the value of a column specified as a column index as a double value.
Parameters:
  columnIndex - the index of the column to read a double containing the column value.
public  doublegetDouble(String columnName)
     Gets the value of a column specified as a column name as a double value.
Parameters:
  columnName - the name of the column to read a double containing the column value.
public  intgetFetchDirection()
     Gets the direction in which rows are fetched for this ResultSet object. the fetch direction.
public  intgetFetchSize()
    
public  floatgetFloat(int columnIndex)
     Gets the value of a column specified as a column index as a float value.
Parameters:
  columnIndex - the index of the column to read a float containing the column value.
public  floatgetFloat(String columnName)
     Gets the value of a column specified as a column name as a float value.
Parameters:
  columnName - the name of the column to read a float containing the column value.
public  intgetInt(int columnIndex)
     Gets the value of a column specified as a column index as an int value.
Parameters:
  columnIndex - the index of the column to read an int containing the column value.
public  intgetInt(String columnName)
     Gets the value of a column specified as a column name, as an int value.
Parameters:
  columnName - the name of the column to read an int containing the column value.
public  longgetLong(int columnIndex)
     Gets the value of a column specified as a column index as a long value.
Parameters:
  columnIndex - the index of the column to read a long containing the column value.
public  longgetLong(String columnName)
     Gets the value of a column specified as a column name, as a long value.
Parameters:
  columnName - the name of the column to read a long containing the column value.
public  ResultSetMetaDatagetMetaData()
     Gets the Metadata for this ResultSet.
public  ObjectgetObject(int columnIndex)
     Gets the value of a specified column as a Java Object.
public  ObjectgetObject(int columnIndex, Map<String, Class<?>> map)
     Gets the value of a column specified as a column index as a Java Object.

The type of the Java object will be determined by the supplied Map to perform the mapping of SQL Struct or Distinct types into Java objects.
Parameters:
  columnIndex - the index of the column to read
Parameters:
  map - a java.util.Map containing a mapping from SQL Type names toJava classes.

public  ObjectgetObject(String columnName)
     Gets the value of a specified column as a Java Object.
public  ObjectgetObject(String columnName, Map<String, Class<?>> map)
     Gets the value of a column specified as a column name as a Java Object.

The type of the Java object will be determined by the supplied Map to perform the mapping of SQL Struct or Distinct types into Java objects.
Parameters:
  columnName - the name of the column to read
Parameters:
  map - a java.util.Map containing a mapping from SQL Type names toJava classes.

public  RefgetRef(int columnIndex)
     Gets the value of a column specified as a column index as a Java java.sql.Ref.
public  RefgetRef(String colName)
     Gets the value of a column specified as a column name as a Java java.sql.Ref.
public  intgetRow()
     Gets the number of the current row in the ResultSet.
public  shortgetShort(int columnIndex)
     Gets the value of a column specified as a column index as a short value.
Parameters:
  columnIndex - the index of the column to read a short value containing the value of the column.
public  shortgetShort(String columnName)
     Gets the value of a column specified as a column name, as a short value.
Parameters:
  columnName - the name of the column to read a short value containing the value of the column.
public  StatementgetStatement()
     Gets the Statement that produced this ResultSet.
public  StringgetString(int columnIndex)
     Gets the value of a column specified as a column index as a String.
public  StringgetString(String columnName)
     Gets the value of a column specified as a column name, as a String.
public  TimegetTime(int columnIndex)
     Gets the value of a column specified as a column index as a java.sql.Time value.
public  TimegetTime(int columnIndex, Calendar cal)
     Gets the value of a column specified as a column index as a java.sql.Time value.
public  TimegetTime(String columnName)
     Gets the value of a column specified as a column name, as a java.sql.Time value.
public  TimegetTime(String columnName, Calendar cal)
     Gets the value of a column specified as a column index, as a java.sql.Time value.
public  TimestampgetTimestamp(int columnIndex)
     Gets the value of a column specified as a column index as a java.sql.Timestamp value.
public  TimestampgetTimestamp(int columnIndex, Calendar cal)
     Gets the value of a column specified as a column index, as a java.sql.Timestamp value.
public  TimestampgetTimestamp(String columnName)
     Gets the value of a column specified as a column name, as a java.sql.Timestamp value.
public  TimestampgetTimestamp(String columnName, Calendar cal)
     Gets the value of a column specified as a column name, as a java.sql.Timestamp value.
public  intgetType()
     Gets the type of the ResultSet.
public  URLgetURL(int columnIndex)
     Gets the value of a column specified as a column index as a java.net.URL.
Parameters:
  columnIndex - the index of the column to read a URL.
public  URLgetURL(String columnName)
     Gets the value of a column specified as a column name as a java.net.URL object.
Parameters:
  columnName - the name of the column to read a URL.
public  InputStreamgetUnicodeStream(int columnIndex)
    
Parameters:
  columnIndex - the index of the column to read an InputStream holding the value of the column.
public  InputStreamgetUnicodeStream(String columnName)
    
Parameters:
  columnName - the name of the column to read an InputStream holding the value of the column.
public  SQLWarninggetWarnings()
     Gets the first warning generated by calls on this ResultSet.
public  voidinsertRow()
     Insert the insert row into the ResultSet and into the underlying database.
public  booleanisAfterLast()
     Gets if the cursor is after the last row of the ResultSet.
public  booleanisBeforeFirst()
     Gets if the cursor is before the first row of the ResultSet.
public  booleanisFirst()
     Gets if the cursor is on the first row of the ResultSet.
public  booleanisLast()
    
public  booleanlast()
     Shifts the cursor position to the last row of the ResultSet.
public  voidmoveToCurrentRow()
     Moves the cursor to the remembered position, usually the current row.
public  voidmoveToInsertRow()
     Moves the cursor position to the Insert row.
public  booleannext()
     Shifts the cursor position down one row in this ResultSet object.
public  booleanprevious()
     Relocates the cursor position to the preceding row in this ResultSet.
public  voidrefreshRow()
     Refreshes the current row with its most up to date value in the database.
public  booleanrelative(int rows)
     Moves the cursor position up or down by a specified number of rows.
public  booleanrowDeleted()
     Indicates whether a row has been deleted.
public  booleanrowInserted()
     Indicates whether the current row has had an insertion operation.
public  booleanrowUpdated()
     Indicates whether the current row has been updated.
public  voidsetFetchDirection(int direction)
     Indicates which direction (forward/reverse) will be used to process the rows of this ResultSet object.
public  voidsetFetchSize(int rows)
     Indicates the amount of rows to fetch from the database when extra rows are required for this ResultSet.
public  voidupdateArray(int columnIndex, Array x)
     Updates a column specified by a column index with a java.sql.Array value.
public  voidupdateArray(String columnName, Array x)
     Updates a column specified by a column name with a java.sql.Array value.
public  voidupdateAsciiStream(int columnIndex, InputStream x, int length)
     Updates a column specified by a column index with an ASCII stream value.
public  voidupdateAsciiStream(String columnName, InputStream x, int length)
     Updates a column specified by a column name with an Ascii stream value.
public  voidupdateBigDecimal(int columnIndex, BigDecimal x)
     Updates a column specified by a column index with a java.sql.BigDecimal value.
public  voidupdateBigDecimal(String columnName, BigDecimal x)
     Updates a column specified by a column name with a java.sql.BigDecimal value.
public  voidupdateBinaryStream(int columnIndex, InputStream x, int length)
     Updates a column specified by a column index with a binary stream value.
public  voidupdateBinaryStream(String columnName, InputStream x, int length)
     Updates a column specified by a column name with a binary stream value.
public  voidupdateBlob(int columnIndex, Blob x)
     Updates a column specified by a column index with a java.sql.Blob value.
public  voidupdateBlob(String columnName, Blob x)
     Updates a column specified by a column name with a java.sql.Blob value.
public  voidupdateBoolean(int columnIndex, boolean x)
     Updates a column specified by a column index with a boolean value.
public  voidupdateBoolean(String columnName, boolean x)
     Updates a column specified by a column name with a boolean value.
public  voidupdateByte(int columnIndex, byte x)
     Updates a column specified by a column index with a byte value.
public  voidupdateByte(String columnName, byte x)
     Updates a column specified by a column name with a byte value.
public  voidupdateBytes(int columnIndex, byte[] x)
     Updates a column specified by a column index with a byte array value.
public  voidupdateBytes(String columnName, byte[] x)
     Updates a column specified by a column name with a byte array value.
public  voidupdateCharacterStream(int columnIndex, Reader x, int length)
     Updates a column specified by a column index with a character stream value.
public  voidupdateCharacterStream(String columnName, Reader reader, int length)
     Updates a column specified by a column name with a character stream value.
public  voidupdateClob(int columnIndex, Clob x)
     Updates a column specified by a column index with a java.sql.Clob value.
public  voidupdateClob(String columnName, Clob x)
     Updates a column specified by a column name with a java.sql.Clob value.
public  voidupdateDate(int columnIndex, Date x)
     Updates a column specified by a column index with a java.sql.Date value.
public  voidupdateDate(String columnName, Date x)
     Updates a column specified by a column name with a java.sql.Date value.
public  voidupdateDouble(int columnIndex, double x)
     Updates a column specified by a column index with a double value.
public  voidupdateDouble(String columnName, double x)
     Updates a column specified by a column name with a double value.
public  voidupdateFloat(int columnIndex, float x)
     Updates a column specified by a column index with a float value.
public  voidupdateFloat(String columnName, float x)
     Updates a column specified by a column name with a float value.
public  voidupdateInt(int columnIndex, int x)
     Updates a column specified by a column index with an int value.
public  voidupdateInt(String columnName, int x)
     Updates a column specified by a column name with an int value.
public  voidupdateLong(int columnIndex, long x)
     Updates a column specified by a column index with a long value.
public  voidupdateLong(String columnName, long x)
     Updates a column specified by a column name with a long value.
public  voidupdateNull(int columnIndex)
     Updates a column specified by a column index with a null value.
public  voidupdateNull(String columnName)
     Updates a column specified by a column name with a null value.
public  voidupdateObject(int columnIndex, Object x)
     Updates a column specified by a column index with an Object value.
public  voidupdateObject(int columnIndex, Object x, int scale)
     Updates a column specified by a column index with an Object value.
public  voidupdateObject(String columnName, Object x)
     Updates a column specified by a column name with an Object value.
public  voidupdateObject(String columnName, Object x, int scale)
     Updates a column specified by a column name with an Object value.
public  voidupdateRef(int columnIndex, Ref x)
     Updates a column specified by a column index with a java.sql.Ref value.
public  voidupdateRef(String columnName, Ref x)
     Updates a column specified by a column name with a java.sql.Ref value.
public  voidupdateRow()
     Updates the database with the new contents of the current row of this ResultSet object.
public  voidupdateShort(int columnIndex, short x)
     Updates a column specified by a column index with a short value.
public  voidupdateShort(String columnName, short x)
     Updates a column specified by a column name with a short value.
public  voidupdateString(int columnIndex, String x)
     Updates a column specified by a column index with a String value.
public  voidupdateString(String columnName, String x)
     Updates a column specified by a column name with a String value.
public  voidupdateTime(int columnIndex, Time x)
     Updates a column specified by a column index with a Time value.
public  voidupdateTime(String columnName, Time x)
     Updates a column specified by a column name with a Time value.
public  voidupdateTimestamp(int columnIndex, Timestamp x)
     Updates a column specified by a column index with a Timestamp value.
public  voidupdateTimestamp(String columnName, Timestamp x)
     Updates a column specified by column name with a Timestamp value.
public  booleanwasNull()
     Determines if the last column read from this ResultSet contained SQL NULL.

Field Detail
CLOSE_CURSORS_AT_COMMIT
final public static int CLOSE_CURSORS_AT_COMMIT(Code)
A constant used to indicate that a ResultSet object must be closed when the method Connection.commit is invoked.



CONCUR_READ_ONLY
final public static int CONCUR_READ_ONLY(Code)
A constant used to indicate the Concurrency Mode for a ResultSet object that cannot be updated.



CONCUR_UPDATABLE
final public static int CONCUR_UPDATABLE(Code)
A constant used to indicate the Concurrency Mode for a ResultSet object that can be updated.



FETCH_FORWARD
final public static int FETCH_FORWARD(Code)
A constant used to indicate processing of the rows of a ResultSet in the forward direction, first to last



FETCH_REVERSE
final public static int FETCH_REVERSE(Code)
A constant used to indicate processing of the rows of a ResultSet in the reverse direction, last to first



FETCH_UNKNOWN
final public static int FETCH_UNKNOWN(Code)
A constant used to indicate that the order of processing of the rows of a ResultSet is unknown.



HOLD_CURSORS_OVER_COMMIT
final public static int HOLD_CURSORS_OVER_COMMIT(Code)
A constant used to indicate that a ResultSet object must not be closed when the method Connection.commit is invoked.



TYPE_FORWARD_ONLY
final public static int TYPE_FORWARD_ONLY(Code)
A constant used to indicate a ResultSet object whose Cursor can only move forward



TYPE_SCROLL_INSENSITIVE
final public static int TYPE_SCROLL_INSENSITIVE(Code)
A constant used to indicate a ResultSet object which is Scrollable but which is not sensitive to changes made by others



TYPE_SCROLL_SENSITIVE
final public static int TYPE_SCROLL_SENSITIVE(Code)
A constant used to indicate a ResultSet object which is Scrollable but which is sensitive to changes made by others





Method Detail
absolute
public boolean absolute(int row) throws SQLException(Code)
Moves the Cursor to a specified row number in the ResultSet.
Parameters:
  row - The new row number for the Cursor true if the new Cursor position is on the ResultSet, falseotherwise
throws:
  SQLException - if a database error happens



afterLast
public void afterLast() throws SQLException(Code)
Moves the Cursor to the end of the ResultSet, after the last row.
throws:
  SQLException - if a database error happens



beforeFirst
public void beforeFirst() throws SQLException(Code)
Moves the Cursor to the start of the ResultSet, before the first row.
throws:
  SQLException - if a database error happens



cancelRowUpdates
public void cancelRowUpdates() throws SQLException(Code)
Cancels any updates made to the current row in the ResultSet.
throws:
  SQLException - if a database error happens



clearWarnings
public void clearWarnings() throws SQLException(Code)
Clears all the warnings related to this ResultSet.
throws:
  SQLException - if a database error happens



close
public void close() throws SQLException(Code)
Releases this ResultSet's database and JDBC resources. You are strongly advised to use this method rather than relying on the release being done when the ResultSet's finalize method is called during garbage collection process. Note that the close() method might take some time to complete since it is dependent on the behaviour of the connection to the database and the database itself.
throws:
  SQLException - if a database error happens



deleteRow
public void deleteRow() throws SQLException(Code)
Deletes the current row from the ResultSet and from the underlying database.
throws:
  SQLException - if a database error happens



findColumn
public int findColumn(String columnName) throws SQLException(Code)
Gets the index number for a column in the ResultSet from the provided Column Name.
Parameters:
  columnName - the column name the index of the column in the ResultSet for the column name
throws:
  SQLException - if a database error happens



first
public boolean first() throws SQLException(Code)
Shifts the cursor position to the first row in the ResultSet. true if the position is in a legitimate row, false if theResultSet contains no rows.
throws:
  SQLException - if a database error happens



getArray
public Array getArray(int columnIndex) throws SQLException(Code)
Gets the content of a column specified as a column index in the current row of this ResultSet as a java.sql.Array.
Parameters:
  columnIndex - the index of the column to read a java.sql.Array with the data from the column
throws:
  SQLException - if a database error happens



getArray
public Array getArray(String colName) throws SQLException(Code)
Gets the value of a column specified as a column name as a java.sql.Array.
Parameters:
  colName - the name of the column to read a java.sql.Array with the data from the column
throws:
  SQLException - if a database error happens



getAsciiStream
public InputStream getAsciiStream(int columnIndex) throws SQLException(Code)
Gets the value of a column specified as a column index as an ASCII character stream.
Parameters:
  columnIndex - the index of the column to read an InputStream with the data from the column
throws:
  SQLException - if a database error happens



getAsciiStream
public InputStream getAsciiStream(String columnName) throws SQLException(Code)
Gets the value of a column specified as a column name as an ASCII character stream.
Parameters:
  columnName - the name of the column to read an InputStream with the data from the column
throws:
  SQLException - if a database error happens



getBigDecimal
public BigDecimal getBigDecimal(int columnIndex) throws SQLException(Code)
Gets the value of a column specified as a column index as a java.math.BigDecimal.
Parameters:
  columnIndex - the index of the column to read a BigDecimal with the value of the column
throws:
  SQLException - if a database error happens



getBigDecimal
public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException(Code)

Parameters:
  columnIndex - the index of the column to read
Parameters:
  scale - the number of digits after the decimal point a BigDecimal with the value of the column
throws:
  SQLException - if a database error happens



getBigDecimal
public BigDecimal getBigDecimal(String columnName) throws SQLException(Code)
Gets the value of a column specified as a column name, as a java.math.BigDecimal.
Parameters:
  columnName - the name of the column to read a BigDecimal with the value of the column
throws:
  SQLException - if a database error happens



getBigDecimal
public BigDecimal getBigDecimal(String columnName, int scale) throws SQLException(Code)

Parameters:
  columnName - the name of the column to read
Parameters:
  scale - the number of digits after the decimal point a BigDecimal with the value of the column
throws:
  SQLException - if a database error happens



getBinaryStream
public InputStream getBinaryStream(int columnIndex) throws SQLException(Code)
Gets the value of a column specified as a column index as a binary stream.

This method can be used to read LONGVARBINARY values. All of the data in the InputStream should be read before getting data from any other column. A further call to a getter method will implicitly close the InputStream.
Parameters:
  columnIndex - the index of the column to read an InputStream with the data from the column. If the column valueis SQL NULL, null is returned.
throws:
  SQLException - if a database error happens




getBinaryStream
public InputStream getBinaryStream(String columnName) throws SQLException(Code)
Gets the value of a column specified as a column name as a binary stream.

This method can be used to read LONGVARBINARY values. All of the data in the InputStream should be read before getting data from any other column. A further call to a getter method will implicitly close the InputStream.
Parameters:
  columnName - the name of the column to read an InputStream with the data from the column If the column valueis SQL NULL, null is returned.
throws:
  SQLException - if a database error happens




getBlob
public Blob getBlob(int columnIndex) throws SQLException(Code)
Gets the value of a column specified as a column index as a java.sql.Blob object.
Parameters:
  columnIndex - the index of the column to read a java.sql.Blob with the value of the column
throws:
  SQLException - if a database error happens



getBlob
public Blob getBlob(String columnName) throws SQLException(Code)
Gets the value of a column specified as a column name, as a java.sql.Blob object.
Parameters:
  columnName - the name of the column to read a java.sql.Blob with the value of the column
throws:
  SQLException - if a database error happens



getBoolean
public boolean getBoolean(int columnIndex) throws SQLException(Code)
Gets the value of a column specified as a column index as a boolean.
Parameters:
  columnIndex - the index of the column to read a boolean value from the column. If the column is SQL NULL, falseis returned.
throws:
  SQLException - if a database error happens



getBoolean
public boolean getBoolean(String columnName) throws SQLException(Code)
Gets the value of a column specified as a column name, as a boolean.
Parameters:
  columnName - the name of the column to read a boolean value from the column. If the column is SQL NULL, falseis returned.
throws:
  SQLException - if a database error happens



getByte
public byte getByte(int columnIndex) throws SQLException(Code)
Gets the value of a column specified as a column index as a byte.
Parameters:
  columnIndex - the index of the column to read a byte containing the value of the column. 0 if the value is SQLNULL.
throws:
  SQLException - if a database error happens



getByte
public byte getByte(String columnName) throws SQLException(Code)
Gets the value of a column specified as a column name as a byte.
Parameters:
  columnName - the name of the column to read a byte containing the value of the column. 0 if the value is SQLNULL.
throws:
  SQLException - if a database error happens



getBytes
public byte[] getBytes(int columnIndex) throws SQLException(Code)
Gets the value of a column specified as a column index as a byte array.
Parameters:
  columnIndex - the index of the column to read a byte array containing the value of the column. null if thecolumn contains SQL NULL.
throws:
  SQLException - if a database error happens



getBytes
public byte[] getBytes(String columnName) throws SQLException(Code)
Gets the value of a column specified as a column name as a byte array.
Parameters:
  columnName - the name of the column to read a byte array containing the value of the column. null if thecolumn contains SQL NULL.
throws:
  SQLException - if a database error happens



getCharacterStream
public Reader getCharacterStream(int columnIndex) throws SQLException(Code)
Gets the value of a column specified as a column index as a java.io.Reader object.
Parameters:
  columnIndex - the index of the column to read a Reader holding the value of the column. null if the columnvalue is SQL NULL.
throws:
  SQLException - if a database error happens



getCharacterStream
public Reader getCharacterStream(String columnName) throws SQLException(Code)
Gets the value of a column specified as a column name as a java.io.Reader object.
Parameters:
  columnName - the name of the column to read a Reader holding the value of the column. null if the columnvalue is SQL NULL.
throws:
  SQLException - if a database error happens



getClob
public Clob getClob(int columnIndex) throws SQLException(Code)
Gets the value of a column specified as a column index as a java.sql.Clob.
Parameters:
  columnIndex - the index of the column to read a Clob object representing the value in the column. null if thevalue is SQL NULL.
throws:
  SQLException - if a database error happens



getClob
public Clob getClob(String colName) throws SQLException(Code)
Gets the value of a column specified as a column name as a java.sql.Clob.
Parameters:
  colName - the name of the column to read a Clob object representing the value in the column. null if thevalue is SQL NULL.
throws:
  SQLException - if a database error happens



getConcurrency
public int getConcurrency() throws SQLException(Code)
Gets the concurrency mode of this ResultSet. the concurrency mode - one of: ResultSet.CONCUR_READ_ONLY,ResultSet.CONCUR_UPDATABLE
throws:
  SQLException - if a database error happens



getCursorName
public String getCursorName() throws SQLException(Code)
Gets the name of the SQL cursor of this ResultSet. a String containing the SQL cursor name
throws:
  SQLException - if a database error happens



getDate
public Date getDate(int columnIndex) throws SQLException(Code)
Gets the value of a column specified as a column index as a java.sql.Date.
Parameters:
  columnIndex - the index of the column to read a java.sql.Date matching the column value. null if the column isSQL NULL.
throws:
  SQLException - if a database error happens



getDate
public Date getDate(int columnIndex, Calendar cal) throws SQLException(Code)
Gets the value of a column specified as a column index as a java.sql.Date. This method uses a supplied calendar to compute the Date.
Parameters:
  columnIndex - the index of the column to read
Parameters:
  cal - a java.util.Calendar to use in constructing the Date. a java.sql.Date matching the column value. null if the column isSQL NULL.
throws:
  SQLException - if a database error happens



getDate
public Date getDate(String columnName) throws SQLException(Code)
Gets the value of a column specified as a column name as a java.sql.Date.
Parameters:
  columnName - the name of the column to read a java.sql.Date matching the column value. null if the column isSQL NULL.
throws:
  SQLException - if a database error happens



getDate
public Date getDate(String columnName, Calendar cal) throws SQLException(Code)
Gets the value of a column specified as a column name, as a java.sql.Date object.
Parameters:
  columnName - the name of the column to read
Parameters:
  cal - java.util.Calendar to use in constructing the Date. a java.sql.Date matching the column value. null if the column isSQL NULL.
throws:
  SQLException - if a database error happens



getDouble
public double getDouble(int columnIndex) throws SQLException(Code)
Gets the value of a column specified as a column index as a double value.
Parameters:
  columnIndex - the index of the column to read a double containing the column value. 0.0 if the column is SQLNULL.
throws:
  SQLException - if a database error happens



getDouble
public double getDouble(String columnName) throws SQLException(Code)
Gets the value of a column specified as a column name as a double value.
Parameters:
  columnName - the name of the column to read a double containing the column value. 0.0 if the column is SQLNULL.
throws:
  SQLException - if a database error happens



getFetchDirection
public int getFetchDirection() throws SQLException(Code)
Gets the direction in which rows are fetched for this ResultSet object. the fetch direction. Will be: ResultSet.FETCH_FORWARD,ResultSet.FETCH_REVERSE or ResultSet.FETCH_UNKNOWN
throws:
  SQLException - if a database error happens



getFetchSize
public int getFetchSize() throws SQLException(Code)
Gets the fetch size (in number of rows) for this ResultSet the fetch size as an int
throws:
  SQLException - if a database error happens



getFloat
public float getFloat(int columnIndex) throws SQLException(Code)
Gets the value of a column specified as a column index as a float value.
Parameters:
  columnIndex - the index of the column to read a float containing the column value. 0.0 if the column is SQLNULL.
throws:
  SQLException - if a database error happens



getFloat
public float getFloat(String columnName) throws SQLException(Code)
Gets the value of a column specified as a column name as a float value.
Parameters:
  columnName - the name of the column to read a float containing the column value. 0.0 if the column is SQLNULL.
throws:
  SQLException - if a database error happens



getInt
public int getInt(int columnIndex) throws SQLException(Code)
Gets the value of a column specified as a column index as an int value.
Parameters:
  columnIndex - the index of the column to read an int containing the column value. 0 if the column is SQL NULL.
throws:
  SQLException - if a database error happens



getInt
public int getInt(String columnName) throws SQLException(Code)
Gets the value of a column specified as a column name, as an int value.
Parameters:
  columnName - the name of the column to read an int containing the column value. 0 if the column is SQL NULL.
throws:
  SQLException - if a database error happens



getLong
public long getLong(int columnIndex) throws SQLException(Code)
Gets the value of a column specified as a column index as a long value.
Parameters:
  columnIndex - the index of the column to read a long containing the column value. 0 if the column is SQL NULL.
throws:
  SQLException - if a database error happens



getLong
public long getLong(String columnName) throws SQLException(Code)
Gets the value of a column specified as a column name, as a long value.
Parameters:
  columnName - the name of the column to read a long containing the column value. 0 if the column is SQL NULL.
throws:
  SQLException - if a database error happens



getMetaData
public ResultSetMetaData getMetaData() throws SQLException(Code)
Gets the Metadata for this ResultSet. This defines the number, types and properties of the columns in the ResultSet. a ResultSetMetaData object with information about this ResultSet.
throws:
  SQLException - if a database error happens



getObject
public Object getObject(int columnIndex) throws SQLException(Code)
Gets the value of a specified column as a Java Object. The type of the returned object will be the default according to the column's SQL type, following the JDBC specification for built-in types.

For SQL User Defined Types, if a column value is Structured or Distinct, this method behaves the same as a call to: getObject(columnIndex, this.getStatement().getConnection().getTypeMap())
Parameters:
  columnIndex - the index of the column to read an Object containing the value of the column. null if the columnvalue is SQL NULL.
throws:
  SQLException - if a database error happens




getObject
public Object getObject(int columnIndex, Map<String, Class<?>> map) throws SQLException(Code)
Gets the value of a column specified as a column index as a Java Object.

The type of the Java object will be determined by the supplied Map to perform the mapping of SQL Struct or Distinct types into Java objects.
Parameters:
  columnIndex - the index of the column to read
Parameters:
  map - a java.util.Map containing a mapping from SQL Type names toJava classes. an Object containing the value of the column. null if the columnvalue is SQL NULL.
throws:
  SQLException - if a database error happens




getObject
public Object getObject(String columnName) throws SQLException(Code)
Gets the value of a specified column as a Java Object. The type of the returned object will be the default according to the column's SQL type, following the JDBC specification for built-in types.

For SQL User Defined Types, if a column value is Structured or Distinct, this method behaves the same as a call to: getObject(columnIndex, this.getStatement().getConnection().getTypeMap())
Parameters:
  columnName - the name of the column to read an Object containing the value of the column. null if the columnvalue is SQL NULL.
throws:
  SQLException - if a database error happens




getObject
public Object getObject(String columnName, Map<String, Class<?>> map) throws SQLException(Code)
Gets the value of a column specified as a column name as a Java Object.

The type of the Java object will be determined by the supplied Map to perform the mapping of SQL Struct or Distinct types into Java objects.
Parameters:
  columnName - the name of the column to read
Parameters:
  map - a java.util.Map containing a mapping from SQL Type names toJava classes. an Object containing the value of the column. null if the columnvalue is SQL NULL.
throws:
  SQLException - if a database error happens




getRef
public Ref getRef(int columnIndex) throws SQLException(Code)
Gets the value of a column specified as a column index as a Java java.sql.Ref.
Parameters:
  columnIndex - the index of the column to read a Ref representing the value of the SQL REF in the column
throws:
  SQLException - if a database error happens



getRef
public Ref getRef(String colName) throws SQLException(Code)
Gets the value of a column specified as a column name as a Java java.sql.Ref.
Parameters:
  colName - the name of the column to read a Ref representing the value of the SQL REF in the column
throws:
  SQLException - if a database error happens



getRow
public int getRow() throws SQLException(Code)
Gets the number of the current row in the ResultSet. Row numbers start at 1 for the first row. the index number of the current row. 0 is returned if there is nocurrent row.
throws:
  SQLException - if a database error happens



getShort
public short getShort(int columnIndex) throws SQLException(Code)
Gets the value of a column specified as a column index as a short value.
Parameters:
  columnIndex - the index of the column to read a short value containing the value of the column. 0 if the valueis SQL NULL.
throws:
  SQLException - if a database error happens



getShort
public short getShort(String columnName) throws SQLException(Code)
Gets the value of a column specified as a column name, as a short value.
Parameters:
  columnName - the name of the column to read a short value containing the value of the column. 0 if the valueis SQL NULL.
throws:
  SQLException - if a database error happens



getStatement
public Statement getStatement() throws SQLException(Code)
Gets the Statement that produced this ResultSet. If the ResultSet was not created by a Statement (eg it was returned from one of the DatabaseMetaData methods), null is returned. the Statement which produced this ResultSet, or null if theResultSet was not created by a Statement.
throws:
  SQLException -



getString
public String getString(int columnIndex) throws SQLException(Code)
Gets the value of a column specified as a column index as a String.
Parameters:
  columnIndex - the index of the column to read the String representing the value of the column, null if thecolumn is SQL NULL.
throws:
  SQLException - if a database error happens



getString
public String getString(String columnName) throws SQLException(Code)
Gets the value of a column specified as a column name, as a String.
Parameters:
  columnName - the name of the column to read the String representing the value of the column, null if thecolumn is SQL NULL.
throws:
  SQLException - if a database error happens



getTime
public Time getTime(int columnIndex) throws SQLException(Code)
Gets the value of a column specified as a column index as a java.sql.Time value.
Parameters:
  columnIndex - the index of the column to read a Time representing the column value, null if the column value isSQL NULL.
throws:
  SQLException - if a database error happens



getTime
public Time getTime(int columnIndex, Calendar cal) throws SQLException(Code)
Gets the value of a column specified as a column index as a java.sql.Time value. The supplied Calendar is used to map between the SQL Time value and the Java Time value.
Parameters:
  columnIndex - the index of the column to read
Parameters:
  cal - a Calendar to use in creating the Java Time value. a Time representing the column value, null if the column value isSQL NULL.
throws:
  SQLException - if a database error happens



getTime
public Time getTime(String columnName) throws SQLException(Code)
Gets the value of a column specified as a column name, as a java.sql.Time value.
Parameters:
  columnName - the name of the column to read a Time representing the column value, null if the column value isSQL NULL.
throws:
  SQLException - if a database error happens



getTime
public Time getTime(String columnName, Calendar cal) throws SQLException(Code)
Gets the value of a column specified as a column index, as a java.sql.Time value. The supplied Calendar is used to map between the SQL Time value and the Java Time value.
Parameters:
  columnName - the name of the column to read
Parameters:
  cal - a Calendar to use in creating the Java Time value. a Time representing the column value, null if the column value isSQL NULL.
throws:
  SQLException - if a database error happens



getTimestamp
public Timestamp getTimestamp(int columnIndex) throws SQLException(Code)
Gets the value of a column specified as a column index as a java.sql.Timestamp value.
Parameters:
  columnIndex - the index of the column to read a Timestamp representing the column value, null if the columnvalue is SQL NULL.
throws:
  SQLException - if a database error happens



getTimestamp
public Timestamp getTimestamp(int columnIndex, Calendar cal) throws SQLException(Code)
Gets the value of a column specified as a column index, as a java.sql.Timestamp value. The supplied Calendar is used to map between the SQL Timestamp value and the Java Timestamp value.
Parameters:
  columnIndex - the index of the column to read
Parameters:
  cal - Calendar to use in creating the Java Timestamp value. a Timestamp representing the column value, null if the columnvalue is SQL NULL.
throws:
  SQLException - if a database error happens



getTimestamp
public Timestamp getTimestamp(String columnName) throws SQLException(Code)
Gets the value of a column specified as a column name, as a java.sql.Timestamp value.
Parameters:
  columnName - the name of the column to read a Timestamp representing the column value, null if the columnvalue is SQL NULL.
throws:
  SQLException - if a database error happens



getTimestamp
public Timestamp getTimestamp(String columnName, Calendar cal) throws SQLException(Code)
Gets the value of a column specified as a column name, as a java.sql.Timestamp value. The supplied Calendar is used to map between the SQL Timestamp value and the Java Timestamp value.
Parameters:
  columnName - the name of the column to read
Parameters:
  cal - Calendar to use in creating the Java Timestamp value. a Timestamp representing the column value, null if the columnvalue is SQL NULL.
throws:
  SQLException - if a database error happens



getType
public int getType() throws SQLException(Code)
Gets the type of the ResultSet. The ResultSet type, one of: ResultSet.TYPE_FORWARD_ONLY,ResultSet.TYPE_SCROLL_INSENSITIVE, orResultSet.TYPE_SCROLL_SENSITIVE
throws:
  SQLException - if there is a database error



getURL
public URL getURL(int columnIndex) throws SQLException(Code)
Gets the value of a column specified as a column index as a java.net.URL.
Parameters:
  columnIndex - the index of the column to read a URL. null if the column value is SQL NULL.
throws:
  SQLException - if a database error happens



getURL
public URL getURL(String columnName) throws SQLException(Code)
Gets the value of a column specified as a column name as a java.net.URL object.
Parameters:
  columnName - the name of the column to read a URL. null if the column value is SQL NULL.
throws:
  SQLException - if a database error happens



getUnicodeStream
public InputStream getUnicodeStream(int columnIndex) throws SQLException(Code)

Parameters:
  columnIndex - the index of the column to read an InputStream holding the value of the column. null if thecolumn value is SQL NULL.
throws:
  SQLException - if a database error happens



getUnicodeStream
public InputStream getUnicodeStream(String columnName) throws SQLException(Code)

Parameters:
  columnName - the name of the column to read an InputStream holding the value of the column. null if thecolumn value is SQL NULL.
throws:
  SQLException - if a database error happens



getWarnings
public SQLWarning getWarnings() throws SQLException(Code)
Gets the first warning generated by calls on this ResultSet. Subsequent warnings on this ResultSet are chained to the first one.

The warnings are cleared when a new Row is read from the ResultSet. The warnings returned by this method are only the warnings generated by ResultSet method calls - warnings generated by Statement methods are held by the Statement.

An SQLException is generated if this method is called on a closed ResultSet. an SQLWarning which is the first warning for this ResultSet. nullif there are no warnings.
throws:
  SQLException - if a database error happens




insertRow
public void insertRow() throws SQLException(Code)
Insert the insert row into the ResultSet and into the underlying database. The Cursor must be set to the Insert Row before this method is invoked.
throws:
  SQLException - if a database error happens. Particular cases include theCursor not being on the Insert Row or if any Columns in theRow do not have a value where the column is declared asnot-nullable.



isAfterLast
public boolean isAfterLast() throws SQLException(Code)
Gets if the cursor is after the last row of the ResultSet. true if the Cursor is after the last Row in the ResultSet, falseif the cursor is at any other position in the ResultSet.
throws:
  SQLException - if a database error happens



isBeforeFirst
public boolean isBeforeFirst() throws SQLException(Code)
Gets if the cursor is before the first row of the ResultSet. true if the Cursor is before the last Row in the ResultSet, falseif the cursor is at any other position in the ResultSet.
throws:
  SQLException - if a database error happens



isFirst
public boolean isFirst() throws SQLException(Code)
Gets if the cursor is on the first row of the ResultSet. true if the Cursor is on the first Row in the ResultSet, false ifthe cursor is at any other position in the ResultSet.
throws:
  SQLException - if a database error happens



isLast
public boolean isLast() throws SQLException(Code)
Gets if the cursor is on the last row of the ResultSet true if the Cursor is on the last Row in the ResultSet, false ifthe cursor is at any other position in the ResultSet.
throws:
  SQLException -



last
public boolean last() throws SQLException(Code)
Shifts the cursor position to the last row of the ResultSet. true if the new position is in a legitimate row, false if theResultSet contains no rows.
throws:
  SQLException - if there is a database error



moveToCurrentRow
public void moveToCurrentRow() throws SQLException(Code)
Moves the cursor to the remembered position, usually the current row. This only applies if the cursor is on the Insert row.
throws:
  SQLException - if a database error happens



moveToInsertRow
public void moveToInsertRow() throws SQLException(Code)
Moves the cursor position to the Insert row. The current position is remembered and the cursor is positioned at the Insert row. The columns in the Insert row should be filled in with the appropriate update methods, before calling insertRow to insert the new row into the database.
throws:
  SQLException - if a database error happens



next
public boolean next() throws SQLException(Code)
Shifts the cursor position down one row in this ResultSet object.

Any InputStreams associated with the current row are closed and any warnings are cleared. true if the updated cursor position is pointing to a valid row,false otherwise (ie when the cursor is after the last row in theResultSet).
throws:
  SQLException - if a database error happens




previous
public boolean previous() throws SQLException(Code)
Relocates the cursor position to the preceding row in this ResultSet. true if the new position is in a legitimate row, false if thecursor is now before the first row.
throws:
  SQLException - if a database error happens



refreshRow
public void refreshRow() throws SQLException(Code)
Refreshes the current row with its most up to date value in the database. Must not be called when the cursor is on the Insert row.

If any columns in the current row have been updated but the updateRow has not been called, then the updates are lost when this method is called.
throws:
  SQLException - if a database error happens, including if the current row isthe Insert row.




relative
public boolean relative(int rows) throws SQLException(Code)
Moves the cursor position up or down by a specified number of rows. If the new position is beyond the start or end rows, the cursor position is set before the first row/after the last row.
Parameters:
  rows - a number of rows to move the cursor - may be positive ornegative true if the new cursor position is on a row, false otherwise
throws:
  SQLException - if a database error happens



rowDeleted
public boolean rowDeleted() throws SQLException(Code)
Indicates whether a row has been deleted. This method depends on whether the JDBC driver and database can detect deletions. true if a row has been deleted and if deletions are detected,false otherwise.
throws:
  SQLException - if a database error happens



rowInserted
public boolean rowInserted() throws SQLException(Code)
Indicates whether the current row has had an insertion operation. This method depends on whether the JDBC driver and database can detect insertions. true if a row has been inserted and if insertions are detected,false otherwise.
throws:
  SQLException - if a database error happens



rowUpdated
public boolean rowUpdated() throws SQLException(Code)
Indicates whether the current row has been updated. This method depends on whether the JDBC driver and database can detect updates. true if the current row has been updated and if updates can bedetected, false otherwise.
throws:
  SQLException - if a database error happens



setFetchDirection
public void setFetchDirection(int direction) throws SQLException(Code)
Indicates which direction (forward/reverse) will be used to process the rows of this ResultSet object. This is treated as a hint by the JDBC driver.
Parameters:
  direction - can be ResultSet.FETCH_FORWARD, ResultSet.FETCH_REVERSE, orResultSet.FETCH_UNKNOWN
throws:
  SQLException - if there is a database error



setFetchSize
public void setFetchSize(int rows) throws SQLException(Code)
Indicates the amount of rows to fetch from the database when extra rows are required for this ResultSet. This used as a hint to the JDBC driver.
Parameters:
  rows - the number of rows to fetch. 0 implies that the JDBC drivercan make its own decision about the fetch size. The numbershould not be greater than the maximum number of rowsestablished by the Statement that generated the ResultSet.
throws:
  SQLException - if a database error happens



updateArray
public void updateArray(int columnIndex, Array x) throws SQLException(Code)
Updates a column specified by a column index with a java.sql.Array value.
Parameters:
  columnIndex - the index of the column to update
Parameters:
  x - the new value for the specified column
throws:
  SQLException - if a database error happens



updateArray
public void updateArray(String columnName, Array x) throws SQLException(Code)
Updates a column specified by a column name with a java.sql.Array value.
Parameters:
  columnName - the name of the column to update
Parameters:
  x - the new value for the specified column
throws:
  SQLException - if a database error happens



updateAsciiStream
public void updateAsciiStream(int columnIndex, InputStream x, int length) throws SQLException(Code)
Updates a column specified by a column index with an ASCII stream value.
Parameters:
  columnIndex - the index of the column to update
Parameters:
  x - the new value for the specified column
Parameters:
  length - the length of the data to write from the stream
throws:
  SQLException - if a database error happens



updateAsciiStream
public void updateAsciiStream(String columnName, InputStream x, int length) throws SQLException(Code)
Updates a column specified by a column name with an Ascii stream value.
Parameters:
  columnName - the name of the column to update
Parameters:
  x - the new value for the specified column
Parameters:
  length - the length of the data to write from the stream
throws:
  SQLException - if a database error happens



updateBigDecimal
public void updateBigDecimal(int columnIndex, BigDecimal x) throws SQLException(Code)
Updates a column specified by a column index with a java.sql.BigDecimal value.
Parameters:
  columnIndex - the index of the column to update
Parameters:
  x - the new value for the specified column
throws:
  SQLException - if a database error happens



updateBigDecimal
public void updateBigDecimal(String columnName, BigDecimal x) throws SQLException(Code)
Updates a column specified by a column name with a java.sql.BigDecimal value.
Parameters:
  columnName - the name of the column to update
Parameters:
  x - the new value for the specified column
throws:
  SQLException - if a database error happens



updateBinaryStream
public void updateBinaryStream(int columnIndex, InputStream x, int length) throws SQLException(Code)
Updates a column specified by a column index with a binary stream value.
Parameters:
  columnIndex - the index of the column to update
Parameters:
  x - the new value for the specified column
Parameters:
  length -
throws:
  SQLException - if a database error happens



updateBinaryStream
public void updateBinaryStream(String columnName, InputStream x, int length) throws SQLException(Code)
Updates a column specified by a column name with a binary stream value.
Parameters:
  columnName - the name of the column to update
Parameters:
  x - the new value for the specified column
Parameters:
  length -
throws:
  SQLException - if a database error happens



updateBlob
public void updateBlob(int columnIndex, Blob x) throws SQLException(Code)
Updates a column specified by a column index with a java.sql.Blob value.
Parameters:
  columnIndex - the index of the column to update
Parameters:
  x - the new value for the specified column
throws:
  SQLException - if a database error happens



updateBlob
public void updateBlob(String columnName, Blob x) throws SQLException(Code)
Updates a column specified by a column name with a java.sql.Blob value.
Parameters:
  columnName - the name of the column to update
Parameters:
  x - the new value for the specified column
throws:
  SQLException - if a database error happens



updateBoolean
public void updateBoolean(int columnIndex, boolean x) throws SQLException(Code)
Updates a column specified by a column index with a boolean value.
Parameters:
  columnIndex -
Parameters:
  x - the new value for the specified column
throws:
  SQLException - if a database error happens



updateBoolean
public void updateBoolean(String columnName, boolean x) throws SQLException(Code)
Updates a column specified by a column name with a boolean value.
Parameters:
  columnName - the name of the column to update
Parameters:
  x - the new value for the specified column
throws:
  SQLException - if a database error happens



updateByte
public void updateByte(int columnIndex, byte x) throws SQLException(Code)
Updates a column specified by a column index with a byte value.
Parameters:
  columnIndex - the index of the column to update
Parameters:
  x - the new value for the specified column
throws:
  SQLException - if a database error happens



updateByte
public void updateByte(String columnName, byte x) throws SQLException(Code)
Updates a column specified by a column name with a byte value.
Parameters:
  columnName - the name of the column to update
Parameters:
  x - the new value for the specified column
throws:
  SQLException - if a database error happens



updateBytes
public void updateBytes(int columnIndex, byte[] x) throws SQLException(Code)
Updates a column specified by a column index with a byte array value.
Parameters:
  columnIndex - the index of the column to update
Parameters:
  x - the new value for the specified column
throws:
  SQLException - if a database error happens



updateBytes
public void updateBytes(String columnName, byte[] x) throws SQLException(Code)
Updates a column specified by a column name with a byte array value.
Parameters:
  columnName - the name of the column to update
Parameters:
  x - the new value for the specified column
throws:
  SQLException - if a database error happens



updateCharacterStream
public void updateCharacterStream(int columnIndex, Reader x, int length) throws SQLException(Code)
Updates a column specified by a column index with a character stream value.
Parameters:
  columnIndex - the index of the column to update
Parameters:
  x - the new value for the specified column
Parameters:
  length - the length of data to write from the stream
throws:
  SQLException - if a database error happens



updateCharacterStream
public void updateCharacterStream(String columnName, Reader reader, int length) throws SQLException(Code)
Updates a column specified by a column name with a character stream value.
Parameters:
  columnName - the name of the column to update
Parameters:
  reader - the new value for the specified column
Parameters:
  length - the length of data to write from the Reader
throws:
  SQLException - if a database error happens



updateClob
public void updateClob(int columnIndex, Clob x) throws SQLException(Code)
Updates a column specified by a column index with a java.sql.Clob value.
Parameters:
  columnIndex - the index of the column to update
Parameters:
  x - the new value for the specified column
throws:
  SQLException - if a database error happens



updateClob
public void updateClob(String columnName, Clob x) throws SQLException(Code)
Updates a column specified by a column name with a java.sql.Clob value.
Parameters:
  columnName - the name of the column to update
Parameters:
  x - the new value for the specified column
throws:
  SQLException - if a database error happens



updateDate
public void updateDate(int columnIndex, Date x) throws SQLException(Code)
Updates a column specified by a column index with a java.sql.Date value.
Parameters:
  columnIndex - the index of the column to update
Parameters:
  x - the new value for the specified column
throws:
  SQLException - if a database error happens



updateDate
public void updateDate(String columnName, Date x) throws SQLException(Code)
Updates a column specified by a column name with a java.sql.Date value.
Parameters:
  columnName - the name of the column to update
Parameters:
  x - the new value for the specified column
throws:
  SQLException - if a database error happens



updateDouble
public void updateDouble(int columnIndex, double x) throws SQLException(Code)
Updates a column specified by a column index with a double value.
Parameters:
  columnIndex - the index of the column to update
Parameters:
  x - the new value for the specified column
throws:
  SQLException - if a database error happens



updateDouble
public void updateDouble(String columnName, double x) throws SQLException(Code)
Updates a column specified by a column name with a double value.
Parameters:
  columnName - the name of the column to update
Parameters:
  x - the new value for the specified column
throws:
  SQLException - if a database error happens



updateFloat
public void updateFloat(int columnIndex, float x) throws SQLException(Code)
Updates a column specified by a column index with a float value.
Parameters:
  columnIndex - the index of the column to update
Parameters:
  x - the new value for the specified column
throws:
  SQLException - if a database error happens



updateFloat
public void updateFloat(String columnName, float x) throws SQLException(Code)
Updates a column specified by a column name with a float value.
Parameters:
  columnName - the name of the column to update
Parameters:
  x - the new value for the specified column
throws:
  SQLException - if a database error happens



updateInt
public void updateInt(int columnIndex, int x) throws SQLException(Code)
Updates a column specified by a column index with an int value.
Parameters:
  columnIndex - the index of the column to update
Parameters:
  x - the new value for the specified column
throws:
  SQLException - if a database error happens



updateInt
public void updateInt(String columnName, int x) throws SQLException(Code)
Updates a column specified by a column name with an int value.
Parameters:
  columnName - the name of the column to update
Parameters:
  x - the new value for the specified column
throws:
  SQLException - if a database error happens



updateLong
public void updateLong(int columnIndex, long x) throws SQLException(Code)
Updates a column specified by a column index with a long value.
Parameters:
  columnIndex - the index of the column to update
Parameters:
  x - the new value for the specified column
throws:
  SQLException - if a database error happens



updateLong
public void updateLong(String columnName, long x) throws SQLException(Code)
Updates a column specified by a column name with a long value.
Parameters:
  columnName - the name of the column to update
Parameters:
  x - the new value for the specified column
throws:
  SQLException - if a database error happens



updateNull
public void updateNull(int columnIndex) throws SQLException(Code)
Updates a column specified by a column index with a null value.
Parameters:
  columnIndex - the index of the column to update
throws:
  SQLException - if a database error happens



updateNull
public void updateNull(String columnName) throws SQLException(Code)
Updates a column specified by a column name with a null value.
Parameters:
  columnName - the name of the column to update
throws:
  SQLException - if a database error happens



updateObject
public void updateObject(int columnIndex, Object x) throws SQLException(Code)
Updates a column specified by a column index with an Object value.
Parameters:
  columnIndex - the index of the column to update
Parameters:
  x - the new value for the specified column
throws:
  SQLException - if a database error happens



updateObject
public void updateObject(int columnIndex, Object x, int scale) throws SQLException(Code)
Updates a column specified by a column index with an Object value.
Parameters:
  columnIndex - the index of the column to update
Parameters:
  x - the new value for the specified column
Parameters:
  scale - for the types java.sql.Types.DECIMAL orjava.sql.Types.NUMERIC, this specifies the number of digitsafter the decimal point.
throws:
  SQLException - if a database error happens



updateObject
public void updateObject(String columnName, Object x) throws SQLException(Code)
Updates a column specified by a column name with an Object value.
Parameters:
  columnName - the name of the column to update
Parameters:
  x - the new value for the specified column
throws:
  SQLException - if a database error happens



updateObject
public void updateObject(String columnName, Object x, int scale) throws SQLException(Code)
Updates a column specified by a column name with an Object value.
Parameters:
  columnName - the name of the column to update
Parameters:
  x - the new value for the specified column
Parameters:
  scale - for the types java.sql.Types.DECIMAL orjava.sql.Types.NUMERIC, this specifies the number of digitsafter the decimal point.
throws:
  SQLException - if a database error happens



updateRef
public void updateRef(int columnIndex, Ref x) throws SQLException(Code)
Updates a column specified by a column index with a java.sql.Ref value.
Parameters:
  columnIndex - the index of the column to update
Parameters:
  x - the new value for the specified column
throws:
  SQLException - if a database error happens



updateRef
public void updateRef(String columnName, Ref x) throws SQLException(Code)
Updates a column specified by a column name with a java.sql.Ref value.
Parameters:
  columnName - the name of the column to update
Parameters:
  x - the new value for the specified column
throws:
  SQLException - if a database error happens



updateRow
public void updateRow() throws SQLException(Code)
Updates the database with the new contents of the current row of this ResultSet object.
throws:
  SQLException -



updateShort
public void updateShort(int columnIndex, short x) throws SQLException(Code)
Updates a column specified by a column index with a short value.
Parameters:
  columnIndex - the index of the column to update
Parameters:
  x - the new value for the specified column
throws:
  SQLException - if a database error happens



updateShort
public void updateShort(String columnName, short x) throws SQLException(Code)
Updates a column specified by a column name with a short value.
Parameters:
  columnName - the name of the column to update
Parameters:
  x - the new value for the specified column
throws:
  SQLException - if a database error happens



updateString
public void updateString(int columnIndex, String x) throws SQLException(Code)
Updates a column specified by a column index with a String value.
Parameters:
  columnIndex - the index of the column to update
Parameters:
  x - the new value for the specified column
throws:
  SQLException - if a database error happens



updateString
public void updateString(String columnName, String x) throws SQLException(Code)
Updates a column specified by a column name with a String value.
Parameters:
  columnName - the name of the column to update
Parameters:
  x - the new value for the specified column
throws:
  SQLException - if a database error happens



updateTime
public void updateTime(int columnIndex, Time x) throws SQLException(Code)
Updates a column specified by a column index with a Time value.
Parameters:
  columnIndex - the index of the column to update
Parameters:
  x - the new value for the specified column
throws:
  SQLException - if a database error happens



updateTime
public void updateTime(String columnName, Time x) throws SQLException(Code)
Updates a column specified by a column name with a Time value.
Parameters:
  columnName -
Parameters:
  x - the new value for the specified column
throws:
  SQLException - if a database error happens



updateTimestamp
public void updateTimestamp(int columnIndex, Timestamp x) throws SQLException(Code)
Updates a column specified by a column index with a Timestamp value.
Parameters:
  columnIndex - the index of the column to update
Parameters:
  x - the new value for the specified column
throws:
  SQLException - if a database error happens



updateTimestamp
public void updateTimestamp(String columnName, Timestamp x) throws SQLException(Code)
Updates a column specified by column name with a Timestamp value.
Parameters:
  columnName - the name of the column to update
Parameters:
  x -
throws:
  SQLException - if a database error happens



wasNull
public boolean wasNull() throws SQLException(Code)
Determines if the last column read from this ResultSet contained SQL NULL. true if the last column contained SQL NULL, false otherwise
throws:
  SQLException - if a database error happens



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.