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