1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XResultSetUpdate.idl,v $
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
>
37 #ifndef __com_sun_star_sdbc_SQLException_idl__
38 #include
<com
/sun
/star
/sdbc
/SQLException.idl
>
41 module com
{ module sun
{ module star
{ module sdbc
{
44 /** provides the possiblity to write changes made on a result set back to
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.
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.
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.
70 if a database access error occurs.
72 void deleteRow
() raises
(SQLException
);
73 //-------------------------------------------------------------------------
75 /** cancels the updates made to a row.
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
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.
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>
104 inserting the row into the result set.
108 <code>updateXXX</code>
113 <member scope="com::sun::star::sdbc">XResultSetUpdate::insertRow()</member>
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>
120 <code>updateXXX</code>
121 must be called before a
123 method can be called on a column value.
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
135 if a database access error occurs.
137 void moveToCurrentRow
() raises
(SQLException
);
140 //=============================================================================
144 /*===========================================================================
145 ===========================================================================*/