请问为什么作为抽象类的dataset会调用子类里的方法?(50分)

  • 主题发起人 woodworm
  • 开始时间
W

woodworm

Unregistered / Unconfirmed
GUEST, unregistred user!
jb7里面DataSet里为什么会出现它的子类stargeDataSet里的方法???
还要请教这个方法到底是起什么作用的?
/**
* Edits the existing row of the DataSet. When the edits are posted,
* the row's status flag is set to UPDATED. On failure,
* this method throws a DataSetException.
*/
public final void editRow()
/*-throws DataSetException-*/
{
if (!open)
failIfNotOpen();
if (!editing) {
if (index.lastRow() == -1)
insertRow(true);
else
{
if (!allowUpdate || !dataSetStore.allowUpdate)
ValidationException.updateNotAllowed();
if (dataSetStore.editListener != null)
dataSetStore.processModifying(this);
dataSetStore.editRow(this);
if (statusListeners != null)
notifyDataChangeStatus(StatusEvent.EDIT_STARTED, ResIndex.RowEdited);
}
}
}
 
当然是面向对象编程的多态了。
意思上面已经说的很清楚了,翻译了就行了,就是点击表格时是否能编辑。
Edits the existing row of the DataSet. When the edits are posted,
the row's status flag is set to UPDATED. On failure,
this method throws a DataSetException.
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
D
回复
0
查看
1K
DelphiTeacher的专栏
D
I
回复
0
查看
396
import
I
顶部