public interface RowSetReader
| javax.sql.RowSetReader |
使得在断开的设施RowSet对象调用数据的行来填充自己。 读者(实现RowSetReader接口的对象)可以注册为支持读/写器范例的对象RowSet 。 当RowSet对象的execute方法时,它又调用读者的方法readData 。
公共方法(Public methods) |
|
|---|---|
abstract void |
readData(RowSetInternal caller) 读取调用 |
void readData (RowSetInternal caller)
读取调用RowSet对象的新内容。 为了调用该方法, RowSet对象必须已经实现了RowSetInternal接口,并注册了这个RowSetReader对象作为它的读者。 readData方法由支持读写器范例的行集的RowSet.execute方法在内部调用。
readData方法将行添加到调用者。 它可以以各种方式实现,甚至可以使用来自非关系数据源的行填充调用者。 通常,读者可以调用任何行集的方法,但有一个例外。 调用方法execute将导致SQLException被抛出,因为execute可能不会被递归调用。 另外,当读者调用RowSet方法时,不会收到通知; 也就是说,不会生成RowSetEvent对象,也不会调用RowSetListener方法。 这是真的,因为听众已经被方法execute通知。
| 参数(Parameters) | |
|---|---|
caller |
RowSetInternal: the RowSet object (1) that has implemented the RowSetInternal interface, (2) with which this reader is registered, and (3) whose execute method called this reader |
| 抛出异常(Throws) | |
|---|---|
SQLException |
if a database access error occurs or this method invokes the RowSet.execute method |