{
final XResultSet xResSet = (XResultSet)
UnoRuntime.queryInterface(XResultSet.class, oObj) ;
final XResultSetUpdate xResSetUpdate = (XResultSetUpdate)
UnoRuntime.queryInterface(XResultSetUpdate.class, oObj) ;
final XRowSet xRowSet = (XRowSet) UnoRuntime.queryInterface
(XRowSet.class, oObj) ;
final XRowUpdate xRowUpdate = (XRowUpdate)
UnoRuntime.queryInterface(XRowUpdate.class, oObj) ;
final PrintWriter logF = log ;
tEnv.addObjRelation("XRowSetApproveBroadcaster.ApproveChecker",
new ifc.sdb._XRowSetApproveBroadcaster.RowSetApproveChecker() {
public void moveCursor() {
try {
xResSet.beforeFirst() ;
xResSet.afterLast() ;
xResSet.first() ;
} catch (com.sun.star.sdbc.SQLException e) {
logF.println("### _XRowSetApproveBroadcaster." +
"RowSetApproveChecker.moveCursor() :") ;
e.printStackTrace(logF) ;
}
}
public RowChangeEvent changeRow() {
try {
xResSet.first() ;
xRowUpdate.updateString(1, "ORowSetTest2") ;
xResSetUpdate.updateRow() ;
} catch (com.sun.star.sdbc.SQLException e) {
logF.println("### _XRowSetApproveBroadcaster." +
"RowSetApproveChecker.changeRow() :") ;
e.printStackTrace(logF) ;
}
RowChangeEvent ev = new RowChangeEvent() ;
ev.Action = com.sun.star.sdb.RowChangeAction.UPDATE ;
ev.Rows = 1 ;
return ev ;
}
public void changeRowSet() {
try {
xRowSet.execute() ;
xResSet.first() ;
} catch (com.sun.star.sdbc.SQLException e) {
logF.println("### _XRowSetApproveBroadcaster."+
"RowSetApproveChecker.changeRowSet() :") ;
e.printStackTrace(logF) ;