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