RowSetInternal
Stay organized with collections
Save and categorize content based on your preferences.
The interface that a RowSet
object implements in order to
present itself to a RowSetReader
or RowSetWriter
object. The RowSetInternal
interface contains
methods that let the reader or writer access and modify the internal
state of the rowset.
Public Method Summary
abstract
Connection
|
getConnection()
Retrieves the Connection object that was passed to this
RowSet object.
|
abstract
ResultSet
|
getOriginal()
Retrieves a ResultSet object containing the original
value of this RowSet object.
|
abstract
ResultSet
|
getOriginalRow()
Retrieves a ResultSet object containing the original value
of the current row only.
|
abstract
Object[]
|
getParams()
Retrieves the parameters that have been set for this
RowSet object's command.
|
abstract
void
|
|
Public Methods
public
abstract
Connection
getConnection
()
Retrieves the Connection
object that was passed to this
RowSet
object.
Returns
- the
Connection
object passed to the rowset
or null
if none was passed
public
abstract
ResultSet
getOriginal
()
Retrieves a ResultSet
object containing the original
value of this RowSet
object.
The cursor is positioned before the first row in the result set.
Only rows contained in the result set returned by the method
getOriginal
are said to have an original value.
Returns
- the original value of the rowset
public
abstract
ResultSet
getOriginalRow
()
Retrieves a ResultSet
object containing the original value
of the current row only. If the current row has no original value,
an empty result set is returned. If there is no current row,
an exception is thrown.
Returns
- the original value of the current row as a
ResultSet
object
Throws
SQLException |
if a database access error occurs or this method
is called while the cursor is on the insert row, before the
first row, or after the last row
|
public
abstract
Object[]
getParams
()
Retrieves the parameters that have been set for this
RowSet
object's command.
Returns
- an array of the current parameter values for this
RowSet
object's command
Sets the given RowSetMetaData
object as the
RowSetMetaData
object for this RowSet
object. The RowSetReader
object associated with the rowset
will use RowSetMetaData
methods to set the values giving
information about the rowset's columns.
Parameters
md |
the RowSetMetaData object that will be set with
information about the rowset's columns |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-07-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-10 UTC."],[[["\u003cp\u003e\u003ccode\u003eRowSetInternal\u003c/code\u003e is an interface implemented by \u003ccode\u003eRowSet\u003c/code\u003e objects to interact with \u003ccode\u003eRowSetReader\u003c/code\u003e and \u003ccode\u003eRowSetWriter\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods for readers and writers to access and modify the internal data of a \u003ccode\u003eRowSet\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can retrieve the original data, connection, parameters, and metadata of a \u003ccode\u003eRowSet\u003c/code\u003e using this interface.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eRowSetInternal\u003c/code\u003e aids in managing the state and data within a \u003ccode\u003eRowSet\u003c/code\u003e object, enabling data synchronization and manipulation.\u003c/p\u003e\n"]]],[],null,["# RowSetInternal\n\npublic interface **RowSetInternal** \nThe interface that a `RowSet` object implements in order to\npresent itself to a `RowSetReader` or `RowSetWriter`\nobject. The `RowSetInternal` interface contains\nmethods that let the reader or writer access and modify the internal\nstate of the rowset. \n\n### Public Method Summary\n\n|--------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Connection](../../../reference/java/sql/Connection.html) | [getConnection](../../../reference/javax/sql/RowSetInternal.html#getConnection())() Retrieves the `Connection` object that was passed to this `RowSet` object. |\n| abstract [ResultSet](../../../reference/java/sql/ResultSet.html) | [getOriginal](../../../reference/javax/sql/RowSetInternal.html#getOriginal())() Retrieves a `ResultSet` object containing the original value of this `RowSet` object. |\n| abstract [ResultSet](../../../reference/java/sql/ResultSet.html) | [getOriginalRow](../../../reference/javax/sql/RowSetInternal.html#getOriginalRow())() Retrieves a `ResultSet` object containing the original value of the current row only. |\n| abstract [Object\\[\\]](../../../reference/java/lang/Object.html) | [getParams](../../../reference/javax/sql/RowSetInternal.html#getParams())() Retrieves the parameters that have been set for this `RowSet` object's command. |\n| abstract void | [setMetaData](../../../reference/javax/sql/RowSetInternal.html#setMetaData(javax.sql.RowSetMetaData))([RowSetMetaData](../../../reference/javax/sql/RowSetMetaData.html) md) Sets the given `RowSetMetaData` object as the `RowSetMetaData` object for this `RowSet` object. |\n\nPublic Methods\n--------------\n\n#### public abstract [Connection](../../../reference/java/sql/Connection.html)\n**getConnection**\n()\n\nRetrieves the `Connection` object that was passed to this\n`RowSet` object. \n\n##### Returns\n\n- the `Connection` object passed to the rowset or `null` if none was passed \n\n##### Throws\n\n| [SQLException](../../../reference/java/sql/SQLException.html) | if a database access error occurs |\n|---------------------------------------------------------------|-----------------------------------|\n\n#### public abstract [ResultSet](../../../reference/java/sql/ResultSet.html)\n**getOriginal**\n()\n\nRetrieves a `ResultSet` object containing the original\nvalue of this `RowSet` object.\n\n\nThe cursor is positioned before the first row in the result set.\nOnly rows contained in the result set returned by the method\n`getOriginal` are said to have an original value. \n\n##### Returns\n\n- the original value of the rowset \n\n##### Throws\n\n| [SQLException](../../../reference/java/sql/SQLException.html) | if a database access error occurs |\n|---------------------------------------------------------------|-----------------------------------|\n\n#### public abstract [ResultSet](../../../reference/java/sql/ResultSet.html)\n**getOriginalRow**\n()\n\nRetrieves a `ResultSet` object containing the original value\nof the current row only. If the current row has no original value,\nan empty result set is returned. If there is no current row,\nan exception is thrown. \n\n##### Returns\n\n- the original value of the current row as a `ResultSet` object \n\n##### Throws\n\n| [SQLException](../../../reference/java/sql/SQLException.html) | if a database access error occurs or this method is called while the cursor is on the insert row, before the first row, or after the last row |\n|---------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------|\n\n#### public abstract [Object\\[\\]](../../../reference/java/lang/Object.html)\n**getParams**\n()\n\nRetrieves the parameters that have been set for this\n`RowSet` object's command. \n\n##### Returns\n\n- an array of the current parameter values for this `RowSet` object's command \n\n##### Throws\n\n| [SQLException](../../../reference/java/sql/SQLException.html) | if a database access error occurs |\n|---------------------------------------------------------------|-----------------------------------|\n\n#### public abstract void\n**setMetaData**\n([RowSetMetaData](../../../reference/javax/sql/RowSetMetaData.html) md)\n\nSets the given `RowSetMetaData` object as the\n`RowSetMetaData` object for this `RowSet`\nobject. The `RowSetReader` object associated with the rowset\nwill use `RowSetMetaData` methods to set the values giving\ninformation about the rowset's columns. \n\n##### Parameters\n\n| md | the `RowSetMetaData` object that will be set with information about the rowset's columns |\n|----|------------------------------------------------------------------------------------------|\n\n##### Throws\n\n| [SQLException](../../../reference/java/sql/SQLException.html) | if a database access error occurs |\n|---------------------------------------------------------------|-----------------------------------|"]]