1*c82f2877SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*c82f2877SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*c82f2877SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*c82f2877SAndrew Rist  * distributed with this work for additional information
6*c82f2877SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*c82f2877SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*c82f2877SAndrew Rist  * "License"); you may not use this file except in compliance
9*c82f2877SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*c82f2877SAndrew Rist  *
11*c82f2877SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*c82f2877SAndrew Rist  *
13*c82f2877SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*c82f2877SAndrew Rist  * software distributed under the License is distributed on an
15*c82f2877SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*c82f2877SAndrew Rist  * KIND, either express or implied.  See the License for the
17*c82f2877SAndrew Rist  * specific language governing permissions and limitations
18*c82f2877SAndrew Rist  * under the License.
19*c82f2877SAndrew Rist  *
20*c82f2877SAndrew Rist  *************************************************************/
21*c82f2877SAndrew Rist 
22*c82f2877SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_dbaccess.hxx"
26cdf0e10cSrcweir #include "PrivateRow.hxx"
27cdf0e10cSrcweir 
28cdf0e10cSrcweir using namespace dbaccess;
29cdf0e10cSrcweir using namespace ::com::sun::star::uno;
30cdf0e10cSrcweir using namespace ::com::sun::star::beans;
31cdf0e10cSrcweir using namespace ::com::sun::star::sdbc;
32cdf0e10cSrcweir using namespace ::com::sun::star::sdb;
33cdf0e10cSrcweir using namespace ::com::sun::star::sdbcx;
34cdf0e10cSrcweir using namespace ::com::sun::star::container;
35cdf0e10cSrcweir using namespace ::com::sun::star::lang;
36cdf0e10cSrcweir using namespace ::com::sun::star::util;
37cdf0e10cSrcweir using namespace ::com::sun::star;
38cdf0e10cSrcweir 
wasNull()39cdf0e10cSrcweir ::sal_Bool SAL_CALL OPrivateRow::wasNull(  ) throw (SQLException, RuntimeException)
40cdf0e10cSrcweir     {
41cdf0e10cSrcweir         return m_aRow[m_nPos].isNull();
42cdf0e10cSrcweir     }
getString(::sal_Int32 columnIndex)43cdf0e10cSrcweir     ::rtl::OUString SAL_CALL OPrivateRow::getString( ::sal_Int32 columnIndex ) throw (SQLException, RuntimeException)
44cdf0e10cSrcweir     {
45cdf0e10cSrcweir         m_nPos = columnIndex;
46cdf0e10cSrcweir         return m_aRow[m_nPos];
47cdf0e10cSrcweir     }
getBoolean(::sal_Int32 columnIndex)48cdf0e10cSrcweir     ::sal_Bool SAL_CALL OPrivateRow::getBoolean( ::sal_Int32 columnIndex ) throw (SQLException, RuntimeException)
49cdf0e10cSrcweir     {
50cdf0e10cSrcweir         m_nPos = columnIndex;
51cdf0e10cSrcweir         return m_aRow[m_nPos];
52cdf0e10cSrcweir     }
getByte(::sal_Int32 columnIndex)53cdf0e10cSrcweir     ::sal_Int8 SAL_CALL OPrivateRow::getByte( ::sal_Int32 columnIndex ) throw (SQLException, RuntimeException)
54cdf0e10cSrcweir     {
55cdf0e10cSrcweir         m_nPos = columnIndex;
56cdf0e10cSrcweir         return m_aRow[m_nPos];
57cdf0e10cSrcweir     }
getShort(::sal_Int32 columnIndex)58cdf0e10cSrcweir     ::sal_Int16 SAL_CALL OPrivateRow::getShort( ::sal_Int32 columnIndex ) throw (SQLException, RuntimeException)
59cdf0e10cSrcweir     {
60cdf0e10cSrcweir         m_nPos = columnIndex;
61cdf0e10cSrcweir         return m_aRow[m_nPos];
62cdf0e10cSrcweir     }
getInt(::sal_Int32 columnIndex)63cdf0e10cSrcweir     ::sal_Int32 SAL_CALL OPrivateRow::getInt( ::sal_Int32 columnIndex ) throw (SQLException, RuntimeException)
64cdf0e10cSrcweir     {
65cdf0e10cSrcweir         m_nPos = columnIndex;
66cdf0e10cSrcweir         return m_aRow[m_nPos];
67cdf0e10cSrcweir     }
getLong(::sal_Int32 columnIndex)68cdf0e10cSrcweir     ::sal_Int64 SAL_CALL OPrivateRow::getLong( ::sal_Int32 columnIndex ) throw (SQLException, RuntimeException)
69cdf0e10cSrcweir     {
70cdf0e10cSrcweir         m_nPos = columnIndex;
71cdf0e10cSrcweir         return m_aRow[m_nPos];
72cdf0e10cSrcweir     }
getFloat(::sal_Int32 columnIndex)73cdf0e10cSrcweir     float SAL_CALL OPrivateRow::getFloat( ::sal_Int32 columnIndex ) throw (SQLException, RuntimeException)
74cdf0e10cSrcweir     {
75cdf0e10cSrcweir         m_nPos = columnIndex;
76cdf0e10cSrcweir         return m_aRow[m_nPos];
77cdf0e10cSrcweir     }
getDouble(::sal_Int32 columnIndex)78cdf0e10cSrcweir     double SAL_CALL OPrivateRow::getDouble( ::sal_Int32 columnIndex ) throw (SQLException, RuntimeException)
79cdf0e10cSrcweir     {
80cdf0e10cSrcweir         m_nPos = columnIndex;
81cdf0e10cSrcweir         return m_aRow[m_nPos];
82cdf0e10cSrcweir     }
getBytes(::sal_Int32 columnIndex)83cdf0e10cSrcweir     Sequence< ::sal_Int8 > SAL_CALL OPrivateRow::getBytes( ::sal_Int32 columnIndex ) throw (SQLException, RuntimeException)
84cdf0e10cSrcweir     {
85cdf0e10cSrcweir         m_nPos = columnIndex;
86cdf0e10cSrcweir         return m_aRow[m_nPos];
87cdf0e10cSrcweir     }
getDate(::sal_Int32 columnIndex)88cdf0e10cSrcweir     ::com::sun::star::util::Date SAL_CALL OPrivateRow::getDate( ::sal_Int32 columnIndex ) throw (SQLException, RuntimeException)
89cdf0e10cSrcweir     {
90cdf0e10cSrcweir         m_nPos = columnIndex;
91cdf0e10cSrcweir         return m_aRow[m_nPos];
92cdf0e10cSrcweir     }
getTime(::sal_Int32 columnIndex)93cdf0e10cSrcweir     ::com::sun::star::util::Time SAL_CALL OPrivateRow::getTime( ::sal_Int32 columnIndex ) throw (SQLException, RuntimeException)
94cdf0e10cSrcweir     {
95cdf0e10cSrcweir         m_nPos = columnIndex;
96cdf0e10cSrcweir         return m_aRow[m_nPos];
97cdf0e10cSrcweir     }
getTimestamp(::sal_Int32 columnIndex)98cdf0e10cSrcweir     ::com::sun::star::util::DateTime SAL_CALL OPrivateRow::getTimestamp( ::sal_Int32 columnIndex ) throw (SQLException, RuntimeException)
99cdf0e10cSrcweir     {
100cdf0e10cSrcweir         m_nPos = columnIndex;
101cdf0e10cSrcweir         return m_aRow[m_nPos];
102cdf0e10cSrcweir     }
getBinaryStream(::sal_Int32 columnIndex)103cdf0e10cSrcweir     Reference< ::com::sun::star::io::XInputStream > SAL_CALL OPrivateRow::getBinaryStream( ::sal_Int32 columnIndex ) throw (SQLException, RuntimeException)
104cdf0e10cSrcweir     {
105cdf0e10cSrcweir         m_nPos = columnIndex;
106cdf0e10cSrcweir         return Reference< ::com::sun::star::io::XInputStream >(m_aRow[m_nPos].makeAny(),UNO_QUERY);
107cdf0e10cSrcweir     }
getCharacterStream(::sal_Int32 columnIndex)108cdf0e10cSrcweir     Reference< ::com::sun::star::io::XInputStream > SAL_CALL OPrivateRow::getCharacterStream( ::sal_Int32 columnIndex ) throw (SQLException, RuntimeException)
109cdf0e10cSrcweir     {
110cdf0e10cSrcweir         m_nPos = columnIndex;
111cdf0e10cSrcweir         return Reference< ::com::sun::star::io::XInputStream >(m_aRow[m_nPos].makeAny(),UNO_QUERY);
112cdf0e10cSrcweir     }
getObject(::sal_Int32 columnIndex,const Reference<::com::sun::star::container::XNameAccess> &)113cdf0e10cSrcweir     Any SAL_CALL OPrivateRow::getObject( ::sal_Int32 columnIndex, const Reference< ::com::sun::star::container::XNameAccess >&  ) throw (SQLException, RuntimeException)
114cdf0e10cSrcweir     {
115cdf0e10cSrcweir         m_nPos = columnIndex;
116cdf0e10cSrcweir         return m_aRow[m_nPos].makeAny();
117cdf0e10cSrcweir     }
getRef(::sal_Int32 columnIndex)118cdf0e10cSrcweir     Reference< XRef > SAL_CALL OPrivateRow::getRef( ::sal_Int32 columnIndex ) throw (SQLException, RuntimeException)
119cdf0e10cSrcweir     {
120cdf0e10cSrcweir         m_nPos = columnIndex;
121cdf0e10cSrcweir         return Reference< XRef >(m_aRow[m_nPos].makeAny(),UNO_QUERY);
122cdf0e10cSrcweir     }
getBlob(::sal_Int32 columnIndex)123cdf0e10cSrcweir     Reference< XBlob > SAL_CALL OPrivateRow::getBlob( ::sal_Int32 columnIndex ) throw (SQLException, RuntimeException)
124cdf0e10cSrcweir     {
125cdf0e10cSrcweir         m_nPos = columnIndex;
126cdf0e10cSrcweir         return Reference< XBlob >(m_aRow[m_nPos].makeAny(),UNO_QUERY);
127cdf0e10cSrcweir     }
getClob(::sal_Int32 columnIndex)128cdf0e10cSrcweir     Reference< XClob > SAL_CALL OPrivateRow::getClob( ::sal_Int32 columnIndex ) throw (SQLException, RuntimeException)
129cdf0e10cSrcweir     {
130cdf0e10cSrcweir         m_nPos = columnIndex;
131cdf0e10cSrcweir         return Reference< XClob >(m_aRow[m_nPos].makeAny(),UNO_QUERY);
132cdf0e10cSrcweir     }
getArray(::sal_Int32 columnIndex)133cdf0e10cSrcweir     Reference< XArray > SAL_CALL OPrivateRow::getArray( ::sal_Int32 columnIndex ) throw (SQLException, RuntimeException)
134cdf0e10cSrcweir     {
135cdf0e10cSrcweir         m_nPos = columnIndex;
136cdf0e10cSrcweir         return Reference< XArray >(m_aRow[m_nPos].makeAny(),UNO_QUERY);
137cdf0e10cSrcweir     }
138cdf0e10cSrcweir 
139