Stay organized with collections
Save and categorize content based on your preferences.
RowSetWriter
public
interface
RowSetWriter
An object that implements the RowSetWriter
interface,
called a writer. A writer may be registered with a RowSet
object that supports the reader/writer paradigm.
If a disconnected RowSet
object modifies some of its data,
and it has a writer associated with it, it may be implemented so that it
calls on the writer's writeData
method internally
to write the updates back to the data source. In order to do this, the writer
must first establish a connection with the rowset's data source.
If the data to be updated has already been changed in the data source, there
is a conflict, in which case the writer will not write
the changes to the data source. The algorithm the writer uses for preventing
or limiting conflicts depends entirely on its implementation.
Summary
Public methods |
abstract
boolean
|
writeData(RowSetInternal caller)
Writes the changes in this RowSetWriter object's
rowset back to the data source from which it got its data.
|
Public methods
writeData
public abstract boolean writeData (RowSetInternal caller)
Writes the changes in this RowSetWriter
object's
rowset back to the data source from which it got its data.
Parameters |
caller |
RowSetInternal : the RowSet object (1) that has implemented the
RowSetInternal interface, (2) with which this writer is
registered, and (3) that called this method internally |
Returns |
boolean |
true if the modified data was written; false
if not, which will be the case if there is a conflict |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-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 2025-02-10 UTC."],[],[],null,["# RowSetWriter\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nRowSetWriter\n============\n\n\n`\npublic\n\n\ninterface\nRowSetWriter\n`\n\n\n`\n\n\n`\n\n|------------------------|\n| javax.sql.RowSetWriter |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nAn object that implements the `RowSetWriter` interface,\ncalled a *writer* . A writer may be registered with a `RowSet`\nobject that supports the reader/writer paradigm.\n\n\nIf a disconnected `RowSet` object modifies some of its data,\nand it has a writer associated with it, it may be implemented so that it\ncalls on the writer's `writeData` method internally\nto write the updates back to the data source. In order to do this, the writer\nmust first establish a connection with the rowset's data source.\n\n\nIf the data to be updated has already been changed in the data source, there\nis a conflict, in which case the writer will not write\nthe changes to the data source. The algorithm the writer uses for preventing\nor limiting conflicts depends entirely on its implementation.\n\nSummary\n-------\n\n| ### Public methods ||\n|---------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract boolean` | ` `[writeData](/reference/javax/sql/RowSetWriter#writeData(javax.sql.RowSetInternal))`(`[RowSetInternal](/reference/javax/sql/RowSetInternal)` caller) ` Writes the changes in this `RowSetWriter` object's rowset back to the data source from which it got its data. |\n\nPublic methods\n--------------\n\n### writeData\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract boolean writeData (RowSetInternal caller)\n```\n\nWrites the changes in this `RowSetWriter` object's\nrowset back to the data source from which it got its data.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `caller` | `RowSetInternal`: the `RowSet` object (1) that has implemented the `RowSetInternal` interface, (2) with which this writer is registered, and (3) that called this method internally \u003cbr /\u003e |\n\n| Returns ||\n|-----------|---------------------------------------------------------------------------------------------------------------|\n| `boolean` | `true` if the modified data was written; `false` if not, which will be the case if there is a conflict \u003cbr /\u003e |\n\n| Throws ||\n|--------------------------------------------------|-----------------------------------|\n| [SQLException](/reference/java/sql/SQLException) | if a database access error occurs |"]]