xref: /AOO41X/main/dbaccess/source/core/api/datacolumn.hxx (revision 2e2212a7c22e96cf6f6fab0dd042c34a45a64bd6)
1*2e2212a7SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*2e2212a7SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*2e2212a7SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*2e2212a7SAndrew Rist  * distributed with this work for additional information
6*2e2212a7SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*2e2212a7SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*2e2212a7SAndrew Rist  * "License"); you may not use this file except in compliance
9*2e2212a7SAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
11*2e2212a7SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13*2e2212a7SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*2e2212a7SAndrew Rist  * software distributed under the License is distributed on an
15*2e2212a7SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*2e2212a7SAndrew Rist  * KIND, either express or implied.  See the License for the
17*2e2212a7SAndrew Rist  * specific language governing permissions and limitations
18*2e2212a7SAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
20*2e2212a7SAndrew Rist  *************************************************************/
21*2e2212a7SAndrew Rist 
22*2e2212a7SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef _DBACORE_DATACOLUMN_HXX_
25cdf0e10cSrcweir #define _DBACORE_DATACOLUMN_HXX_
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #ifndef _COM_SUN_STAR_SDBC_XROWUPDATE_HPP_
28cdf0e10cSrcweir #include <com/sun/star/sdbc/XRowUpdate.hpp>
29cdf0e10cSrcweir #endif
30cdf0e10cSrcweir #ifndef _COM_SUN_STAR_SDBC_XROW_HPP_
31cdf0e10cSrcweir #include <com/sun/star/sdbc/XRow.hpp>
32cdf0e10cSrcweir #endif
33cdf0e10cSrcweir #ifndef _COM_SUN_STAR_SDBC_XRESULTSETMETADATA_HDL_
34cdf0e10cSrcweir #include <com/sun/star/sdbc/XResultSetMetaData.hdl>
35cdf0e10cSrcweir #endif
36cdf0e10cSrcweir #ifndef _COM_SUN_STAR_SDB_XCOLUMN_HPP_
37cdf0e10cSrcweir #include <com/sun/star/sdb/XColumn.hpp>
38cdf0e10cSrcweir #endif
39cdf0e10cSrcweir #ifndef _COM_SUN_STAR_SDB_XCOLUMNUPDATE_HPP_
40cdf0e10cSrcweir #include <com/sun/star/sdb/XColumnUpdate.hpp>
41cdf0e10cSrcweir #endif
42cdf0e10cSrcweir #ifndef _DBA_COREAPI_RESULTCOLUMN_HXX_
43cdf0e10cSrcweir #include <resultcolumn.hxx>
44cdf0e10cSrcweir #endif
45cdf0e10cSrcweir namespace dbaccess
46cdf0e10cSrcweir {
47cdf0e10cSrcweir 	//************************************************************
48cdf0e10cSrcweir 	//  ODataColumn
49cdf0e10cSrcweir 	//************************************************************
50cdf0e10cSrcweir 	class ODataColumn : public OResultColumn,
51cdf0e10cSrcweir 						public ::com::sun::star::sdb::XColumn,
52cdf0e10cSrcweir 						public ::com::sun::star::sdb::XColumnUpdate
53cdf0e10cSrcweir 	{
54cdf0e10cSrcweir 	protected:
55cdf0e10cSrcweir 		::com::sun::star::uno::Reference < ::com::sun::star::sdbc::XRow >		m_xRow;
56cdf0e10cSrcweir 		::com::sun::star::uno::Reference < ::com::sun::star::sdbc::XRowUpdate >	m_xRowUpdate;
57cdf0e10cSrcweir 
58cdf0e10cSrcweir 		virtual ~ODataColumn();
59cdf0e10cSrcweir 	public:
60cdf0e10cSrcweir 		ODataColumn	 (const ::com::sun::star::uno::Reference < ::com::sun::star::sdbc::XResultSetMetaData >& _xMetaData,
61cdf0e10cSrcweir 					  const ::com::sun::star::uno::Reference < ::com::sun::star::sdbc::XRow >& _xRow,
62cdf0e10cSrcweir 					  const ::com::sun::star::uno::Reference < ::com::sun::star::sdbc::XRowUpdate >& _xRowUpdate,
63cdf0e10cSrcweir 					  sal_Int32 _nPos,
64cdf0e10cSrcweir                       const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData >& _rxDBMeta);
65cdf0e10cSrcweir 
66cdf0e10cSrcweir 	// com::sun::star::lang::XTypeProvider
67cdf0e10cSrcweir 		virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException);
68cdf0e10cSrcweir 		virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException);
69cdf0e10cSrcweir 
70cdf0e10cSrcweir 	// com::sun::star::uno::XInterface
71cdf0e10cSrcweir 		virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw (::com::sun::star::uno::RuntimeException);
acquire()72cdf0e10cSrcweir 		virtual void SAL_CALL acquire() throw() { OResultColumn::acquire(); }
release()73cdf0e10cSrcweir 		virtual void SAL_CALL release() throw() { OResultColumn::release(); }
74cdf0e10cSrcweir 
75cdf0e10cSrcweir 	// ::com::sun::star::lang::XServiceInfo
76cdf0e10cSrcweir 		virtual ::rtl::OUString SAL_CALL getImplementationName(  ) throw(::com::sun::star::uno::RuntimeException);
77cdf0e10cSrcweir 		virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(  ) throw(::com::sun::star::uno::RuntimeException);
78cdf0e10cSrcweir 
79cdf0e10cSrcweir 	// cppu::OComponentHelper
80cdf0e10cSrcweir 		virtual void SAL_CALL disposing(void);
81cdf0e10cSrcweir 
82cdf0e10cSrcweir 	// ::com::sun::star::sdb::XColumn
83cdf0e10cSrcweir 		virtual sal_Bool SAL_CALL wasNull(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
84cdf0e10cSrcweir 		virtual ::rtl::OUString SAL_CALL getString(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
85cdf0e10cSrcweir 		virtual sal_Bool SAL_CALL getBoolean(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
86cdf0e10cSrcweir 		virtual sal_Int8 SAL_CALL getByte(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
87cdf0e10cSrcweir 		virtual sal_Int16 SAL_CALL getShort(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
88cdf0e10cSrcweir 		virtual sal_Int32 SAL_CALL getInt(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
89cdf0e10cSrcweir 		virtual sal_Int64 SAL_CALL getLong(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
90cdf0e10cSrcweir 		virtual float SAL_CALL getFloat(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
91cdf0e10cSrcweir 		virtual double SAL_CALL getDouble(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
92cdf0e10cSrcweir 		virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getBytes(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
93cdf0e10cSrcweir 		virtual ::com::sun::star::util::Date SAL_CALL getDate(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
94cdf0e10cSrcweir 		virtual ::com::sun::star::util::Time SAL_CALL getTime(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
95cdf0e10cSrcweir 		virtual ::com::sun::star::util::DateTime SAL_CALL getTimestamp(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
96cdf0e10cSrcweir 		virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getBinaryStream(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
97cdf0e10cSrcweir 		virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getCharacterStream(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
98cdf0e10cSrcweir 		virtual ::com::sun::star::uno::Any SAL_CALL getObject( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& typeMap ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
99cdf0e10cSrcweir 		virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRef > SAL_CALL getRef(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
100cdf0e10cSrcweir 		virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XBlob > SAL_CALL getBlob(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
101cdf0e10cSrcweir 		virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XClob > SAL_CALL getClob(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
102cdf0e10cSrcweir 		virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XArray > SAL_CALL getArray(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
103cdf0e10cSrcweir 
104cdf0e10cSrcweir 	// ::com::sun::star::sdb::XColumnUpdate
105cdf0e10cSrcweir 		virtual void SAL_CALL updateNull(  ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
106cdf0e10cSrcweir 		virtual void SAL_CALL updateBoolean( sal_Bool x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
107cdf0e10cSrcweir 		virtual void SAL_CALL updateByte( sal_Int8 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
108cdf0e10cSrcweir 		virtual void SAL_CALL updateShort( sal_Int16 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
109cdf0e10cSrcweir 		virtual void SAL_CALL updateInt( sal_Int32 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
110cdf0e10cSrcweir 		virtual void SAL_CALL updateLong( sal_Int64 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
111cdf0e10cSrcweir 		virtual void SAL_CALL updateFloat( float x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
112cdf0e10cSrcweir 		virtual void SAL_CALL updateDouble( double x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
113cdf0e10cSrcweir 		virtual void SAL_CALL updateString( const ::rtl::OUString& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
114cdf0e10cSrcweir 		virtual void SAL_CALL updateBytes( const ::com::sun::star::uno::Sequence< sal_Int8 >& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
115cdf0e10cSrcweir 		virtual void SAL_CALL updateDate( const ::com::sun::star::util::Date& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
116cdf0e10cSrcweir 		virtual void SAL_CALL updateTime( const ::com::sun::star::util::Time& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
117cdf0e10cSrcweir 		virtual void SAL_CALL updateTimestamp( const ::com::sun::star::util::DateTime& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
118cdf0e10cSrcweir 		virtual void SAL_CALL updateBinaryStream( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
119cdf0e10cSrcweir 		virtual void SAL_CALL updateCharacterStream( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
120cdf0e10cSrcweir 		virtual void SAL_CALL updateObject( const ::com::sun::star::uno::Any& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
121cdf0e10cSrcweir 		virtual void SAL_CALL updateNumericObject( const ::com::sun::star::uno::Any& x, sal_Int32 scale ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
122cdf0e10cSrcweir 	};
123cdf0e10cSrcweir }
124cdf0e10cSrcweir #endif // _DBACORE_RESULTCOLUMN_HXX_
125cdf0e10cSrcweir 
126