新聞中心
RowSetWriter

public interface RowSetWriter實(shí)現(xiàn) RowSetWriter 接口的對(duì)象,稱(chēng)為編寫(xiě)器。 可以使用支持讀取器/寫(xiě)入器范例的 RowSet 對(duì)象注冊(cè)寫(xiě)入器。
如果一個(gè)斷開(kāi)連接的 RowSet 對(duì)象修改了它的一些數(shù)據(jù),并且它有一個(gè)與之關(guān)聯(lián)的寫(xiě)入器,則可以實(shí)現(xiàn)它以便它在內(nèi)部調(diào)用寫(xiě)入器的 writeData 方法以將更新寫(xiě)回?cái)?shù)據(jù)源。 為此,編寫(xiě)器必須首先與行集的數(shù)據(jù)源建立連接。
如果要更新的數(shù)據(jù)已經(jīng)在數(shù)據(jù)源中發(fā)生了變化,則存在沖突,這種情況下寫(xiě)入者不會(huì)將這些變化寫(xiě)入數(shù)據(jù)源。 作者用于防止或限制沖突的算法完全取決于其實(shí)現(xiàn)。
Since:
1.4
方法總結(jié)
| 修飾符和類(lèi)型 | 方法 | 描述 |
|---|---|---|
| boolean | writeData(RowSetInternal caller) | 將此 RowSetWriter 對(duì)象的行集中的更改寫(xiě)回它從中獲取數(shù)據(jù)的數(shù)據(jù)源。 |
方法詳情
writeData
boolean writeData(RowSetInternal caller) throws SQLException
將此 RowSetWriter 對(duì)象的行集中的更改寫(xiě)回它從中獲取數(shù)據(jù)的數(shù)據(jù)源。
參數(shù):
| 參數(shù)名稱(chēng) | 參數(shù)描述 |
|---|---|
| caller | RowSet 對(duì)象 (1) 已實(shí)現(xiàn) RowSetInternal 接口,(2) 此 writer 注冊(cè)的對(duì)象,以及 (3) 在內(nèi)部調(diào)用此方法 |
返回:
如果已寫(xiě)入修改的數(shù)據(jù),則為 true; 如果沒(méi)有,則為 false,如果存在沖突,則為這種情況
Throws:
| Throw名稱(chēng) | Throw描述 |
|---|---|
| SQLException | 如果發(fā)生數(shù)據(jù)庫(kù)訪(fǎng)問(wèn)錯(cuò)誤 |
本文標(biāo)題:創(chuàng)新互聯(lián)鴻蒙OS教程:鴻蒙OS RowSetWriter
網(wǎng)頁(yè)網(wǎng)址:http://www.dlmjj.cn/article/djedgjg.html


咨詢(xún)
建站咨詢(xún)
