1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23#ifndef __com_sun_star_sdbc_XResultSetUpdate_idl__ 24#define __com_sun_star_sdbc_XResultSetUpdate_idl__ 25 26#ifndef __com_sun_star_uno_XInterface_idl__ 27#include <com/sun/star/uno/XInterface.idl> 28#endif 29 30#ifndef __com_sun_star_sdbc_SQLException_idl__ 31#include <com/sun/star/sdbc/SQLException.idl> 32#endif 33 34 module com { module sun { module star { module sdbc { 35 36 37/** provides the possiblity to write changes made on a result set back to 38 database. 39 */ 40published interface XResultSetUpdate: com::sun::star::uno::XInterface 41{ 42 //------------------------------------------------------------------------- 43 44 /** inserts the contents of the insert row into the result set and 45 the database. Must be on the insert row when this method is called. 46 @throws SQLException 47 if a database access error occurs. 48 */ 49 void insertRow() raises (SQLException); 50 //------------------------------------------------------------------------- 51 52 /** updates the underlying database with the new contents of the 53 current row. Cannot be called when on the insert row. 54 @throws SQLException 55 if a database access error occurs. 56 */ 57 void updateRow() raises (SQLException); 58 //------------------------------------------------------------------------- 59 60 /** deletes the current row from the result set and the underlying 61 database. Cannot be called when on the insert row. 62 @throws SQLException 63 if a database access error occurs. 64 */ 65 void deleteRow() raises (SQLException); 66 //------------------------------------------------------------------------- 67 68 /** cancels the updates made to a row. 69 70 71 <p> 72 This method may be called after calling an 73 <code>updateXXX</code> 74 method(s) and before calling 75 <member scope="com::sun::star::sdbc">XResultSetUpdate::updateRow()</member> 76 to rollback the updates made to a row. If no updates have been made or 77 <code>updateRow</code> 78 has already been called, then this method has no 79 effect. 80 </p> 81 @throws SQLException 82 if a database access error occurs. 83 */ 84 void cancelRowUpdates() raises (SQLException); 85 //------------------------------------------------------------------------- 86 87 /** moves the cursor to the insert row. The current cursor position is 88 remembered while the cursor is positioned on the insert row. 89 90 91 <p> 92 The insert row is a special row associated with an updatable 93 result set. It is essentially a buffer where a new row may 94 be constructed by calling the 95 <code>updateXXX</code> 96 methods prior to 97 inserting the row into the result set. 98 </p> 99 <p> 100 Only the 101 <code>updateXXX</code> 102 , 103 <code>getXXX</code> 104 , 105 and 106 <member scope="com::sun::star::sdbc">XResultSetUpdate::insertRow()</member> 107 methods may be 108 called when the cursor is on the insert row. All of the columns in 109 a result set must be given a value each time this method is 110 called before calling 111 <code>insertRow</code> 112 . The method 113 <code>updateXXX</code> 114 must be called before a 115 <code>getXXX</code> 116 method can be called on a column value. 117 </p> 118 @throws SQLException 119 if a database access error occurs. 120 */ 121 void moveToInsertRow() raises (SQLException); 122 //------------------------------------------------------------------------- 123 124 /** moves the cursor to the remembered cursor position, usually the 125 current row. This method has no effect if the cursor is not on the insert 126 row. 127 @throws SQLException 128 if a database access error occurs. 129 */ 130 void moveToCurrentRow() raises (SQLException); 131}; 132 133//============================================================================= 134 135}; }; }; }; 136 137/*=========================================================================== 138===========================================================================*/ 139#endif 140