RowSetWriter
Stay organized with collections
Save and categorize content based on your preferences.
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.
Public Method Summary
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
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 |
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
true
if the modified data was written; false
if not, which will be the case if there is a conflict
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\u003eRowSetWriter\u003c/code\u003e is an interface that enables writing data modifications from a \u003ccode\u003eRowSet\u003c/code\u003e object back to its original data source.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ewriteData\u003c/code\u003e method is the core functionality, responsible for persisting the changes to the data source.\u003c/p\u003e\n"],["\u003cp\u003eConflict detection and resolution mechanisms are implementation-specific within the \u003ccode\u003eRowSetWriter\u003c/code\u003e, potentially preventing updates if data source conflicts arise.\u003c/p\u003e\n"],["\u003cp\u003eRegistered \u003ccode\u003eRowSetWriter\u003c/code\u003e objects are called internally by \u003ccode\u003eRowSet\u003c/code\u003e instances when data modifications need to be synchronized with the original source.\u003c/p\u003e\n"]]],[],null,["public interface **RowSetWriter** \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\nPublic Method Summary\n\n|------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract boolean | [writeData](../../../reference/javax/sql/RowSetWriter.html#writeData(javax.sql.RowSetInternal))([RowSetInternal](../../../reference/javax/sql/RowSetInternal.html) 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\npublic abstract boolean\n**writeData**\n([RowSetInternal](../../../reference/javax/sql/RowSetInternal.html) caller) \nWrites the changes in this `RowSetWriter` object's\nrowset back to the data source from which it got its data. \n\nParameters\n\n| caller | the `RowSet` object (1) that has implemented the `RowSetInternal` interface, (2) with which this writer is registered, and (3) that called this method internally |\n|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n\nReturns\n\n- `true` if the modified data was written; `false` if not, which will be the case if there is a conflict \n\nThrows\n\n| [SQLException](../../../reference/java/sql/SQLException.html) | if a database access error occurs |\n|---------------------------------------------------------------|-----------------------------------|"]]