merged tag ooo/OOO330_m14
[LibreOffice.git] / offapi / com / sun / star / sdbc / XResultSetUpdate.idl
blobea3075bf622b1829324fa5cded6308526c83f699
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
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.
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).
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.
26 ************************************************************************/
27 #ifndef __com_sun_star_sdbc_XResultSetUpdate_idl__
28 #define __com_sun_star_sdbc_XResultSetUpdate_idl__
30 #ifndef __com_sun_star_uno_XInterface_idl__
31 #include <com/sun/star/uno/XInterface.idl>
32 #endif
34 #ifndef __com_sun_star_sdbc_SQLException_idl__
35 #include <com/sun/star/sdbc/SQLException.idl>
36 #endif
38 module com { module sun { module star { module sdbc {
41 /** provides the possiblity to write changes made on a result set back to
42 database.
44 published interface XResultSetUpdate: com::sun::star::uno::XInterface
46 //-------------------------------------------------------------------------
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.
53 void insertRow() raises (SQLException);
54 //-------------------------------------------------------------------------
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.
61 void updateRow() raises (SQLException);
62 //-------------------------------------------------------------------------
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.
69 void deleteRow() raises (SQLException);
70 //-------------------------------------------------------------------------
72 /** cancels the updates made to a row.
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.
88 void cancelRowUpdates() raises (SQLException);
89 //-------------------------------------------------------------------------
91 /** moves the cursor to the insert row. The current cursor position is
92 remembered while the cursor is positioned on the insert row.
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>
104 Only the
105 <code>updateXXX</code>
107 <code>getXXX</code>
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.
125 void moveToInsertRow() raises (SQLException);
126 //-------------------------------------------------------------------------
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.
134 void moveToCurrentRow() raises (SQLException);
137 //=============================================================================
139 }; }; }; };
141 /*===========================================================================
142 ===========================================================================*/
143 #endif