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: cachedrowset.hxx,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 ************************************************************************/
31 #ifndef CACHEDROWSET_HXX
32 #define CACHEDROWSET_HXX
34 /** === begin UNO includes === **/
35 #include <com/sun/star/sdbc/XResultSet.hpp>
36 #include <com/sun/star/sdbc/XConnection.hpp>
37 /** === end UNO includes === **/
39 #include <comphelper/componentcontext.hxx>
40 #include <unotools/sharedunocomponent.hxx>
44 //........................................................................
47 //........................................................................
49 struct CachedRowSet_Data
;
50 //====================================================================
52 //====================================================================
53 /** caches a result set obtained from a SQL statement
58 CachedRowSet( const ::comphelper::ComponentContext
& _rContext
);
62 /** executes the statement
65 the result set produced by the statement. The caller takes ownership of the
68 @throws ::com::sun::star::sdbc::SQLException
69 if such an exception is thrown when executing the statement
71 ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XResultSet
>
74 /// determines whether the row set properties are dirty, i.e. have changed since the last call to execute
77 /// disposes the instance and frees all associated resources
80 /** sets the command of a query as command to be executed
82 A connection must have been set before.
86 void setCommandFromQuery ( const ::rtl::OUString
& _rQueryName
);
88 void setCommand ( const ::rtl::OUString
& _rCommand
);
89 void setEscapeProcessing ( const sal_Bool _bEscapeProcessing
);
90 void setConnection ( const ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XConnection
>& _rxConnection
);
93 ::std::auto_ptr
< CachedRowSet_Data
> m_pData
;
96 //........................................................................
98 //........................................................................
100 #endif // CACHEDROWSET_HXX