1/************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27#ifndef __com_sun_star_sdbc_XResultSetUpdate_idl__ 28#define __com_sun_star_sdbc_XResultSetUpdate_idl__ 29 30#ifndef __com_sun_star_uno_XInterface_idl__ 31#include <com/sun/star/uno/XInterface.idl> 32#endif 33 34#ifndef __com_sun_star_sdbc_SQLException_idl__ 35#include <com/sun/star/sdbc/SQLException.idl> 36#endif 37 38 module com { module sun { module star { module sdbc { 39 40 41/** provides the possiblity to write changes made on a result set back to 42 database. 43 */ 44published interface XResultSetUpdate: com::sun::star::uno::XInterface 45{ 46 //------------------------------------------------------------------------- 47 48 /** inserts the contents of the insert row into the result set and 49 the database. Must be on the insert row when this method is called. 50 @throws SQLException 51 if a database access error occurs. 52 */ 53 void insertRow() raises (SQLException); 54 //------------------------------------------------------------------------- 55 56 /** updates the underlying database with the new contents of the 57 current row. Cannot be called when on the insert row. 58 @throws SQLException 59 if a database access error occurs. 60 */ 61 void updateRow() raises (SQLException); 62 //------------------------------------------------------------------------- 63 64 /** deletes the current row from the result set and the underlying 65 database. Cannot be called when on the insert row. 66 @throws SQLException 67 if a database access error occurs. 68 */ 69 void deleteRow() raises (SQLException); 70 //------------------------------------------------------------------------- 71 72 /** cancels the updates made to a row. 73 74 75 <p> 76 This method may be called after calling an 77 <code>updateXXX</code> 78 method(s) and before calling 79 <member scope="com::sun::star::sdbc">XResultSetUpdate::updateRow()</member> 80 to rollback the updates made to a row. If no updates have been made or 81 <code>updateRow</code> 82 has already been called, then this method has no 83 effect. 84 </p> 85 @throws SQLException 86 if a database access error occurs. 87 */ 88 void cancelRowUpdates() raises (SQLException); 89 //------------------------------------------------------------------------- 90 91 /** moves the cursor to the insert row. The current cursor position is 92 remembered while the cursor is positioned on the insert row. 93 94 95 <p> 96 The insert row is a special row associated with an updatable 97 result set. It is essentially a buffer where a new row may 98 be constructed by calling the 99 <code>updateXXX</code> 100 methods prior to 101 inserting the row into the result set. 102 </p> 103 <p> 104 Only the 105 <code>updateXXX</code> 106 , 107 <code>getXXX</code> 108 , 109 and 110 <member scope="com::sun::star::sdbc">XResultSetUpdate::insertRow()</member> 111 methods may be 112 called when the cursor is on the insert row. All of the columns in 113 a result set must be given a value each time this method is 114 called before calling 115 <code>insertRow</code> 116 . The method 117 <code>updateXXX</code> 118 must be called before a 119 <code>getXXX</code> 120 method can be called on a column value. 121 </p> 122 @throws SQLException 123 if a database access error occurs. 124 */ 125 void moveToInsertRow() raises (SQLException); 126 //------------------------------------------------------------------------- 127 128 /** moves the cursor to the remembered cursor position, usually the 129 current row. This method has no effect if the cursor is not on the insert 130 row. 131 @throws SQLException 132 if a database access error occurs. 133 */ 134 void moveToCurrentRow() raises (SQLException); 135}; 136 137//============================================================================= 138 139}; }; }; }; 140 141/*=========================================================================== 142===========================================================================*/ 143#endif 144