LibreOffice Module connectivity (master) 1
inc/java/sql/ResultSet.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19#pragma once
20
21#include <java/lang/Object.hxx>
22#include <com/sun/star/sdbc/XResultSet.hpp>
23#include <com/sun/star/sdbc/XRow.hpp>
24#include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp>
25#include <com/sun/star/sdbc/XCloseable.hpp>
26#include <com/sun/star/sdbc/XColumnLocate.hpp>
27#include <com/sun/star/util/XCancellable.hpp>
28#include <com/sun/star/sdbc/XWarningsSupplier.hpp>
29#include <com/sun/star/sdbc/XResultSetUpdate.hpp>
30#include <com/sun/star/sdbc/XRowUpdate.hpp>
35#include <com/sun/star/lang/XServiceInfo.hpp>
37
38namespace connectivity
39{
40
41 /*
42 ** java_sql_ResultSet
43 */
44 typedef ::cppu::WeakComponentImplHelper< css::sdbc::XResultSet,
45 css::sdbc::XRow,
46 css::sdbc::XResultSetMetaDataSupplier,
47 css::util::XCancellable,
48 css::sdbc::XWarningsSupplier,
49 css::sdbc::XResultSetUpdate,
50 css::sdbc::XRowUpdate,
51 css::sdbc::XCloseable,
52 css::sdbc::XColumnLocate,
53 css::lang::XServiceInfo> java_sql_ResultSet_BASE;
54
58 public java_lang_Object,
60 public ::comphelper::OPropertyArrayUsageHelper<java_sql_ResultSet>
61 {
62 css::uno::Reference< css::uno::XInterface> m_xStatement;
65
68 sal_Int32 getResultSetConcurrency() const;
71 sal_Int32 getResultSetType() const;
74 sal_Int32 getFetchDirection() const;
77 sal_Int32 getFetchSize() const;
80 OUString getCursorName() const;
81
84 void setFetchDirection(sal_Int32 _par0);
87 void setFetchSize(sal_Int32 _par0);
88 protected:
89 // Static data for the class
90 static jclass theClass;
91
92 // OPropertyArrayUsageHelper
93 virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const override;
94 // OPropertySetHelper
95 virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
96
97 virtual sal_Bool SAL_CALL convertFastPropertyValue(
98 css::uno::Any & rConvertedValue,
99 css::uno::Any & rOldValue,
100 sal_Int32 nHandle,
101 const css::uno::Any& rValue ) override;
102 virtual void SAL_CALL setFastPropertyValue_NoBroadcast(
103 sal_Int32 nHandle,
104 const css::uno::Any& rValue
105 ) override;
106 virtual void SAL_CALL getFastPropertyValue(
107 css::uno::Any& rValue,
108 sal_Int32 nHandle
109 ) const override;
110 virtual ~java_sql_ResultSet() override;
111 public:
113 virtual jclass getMyClass() const override;
114 // A ctor that is needed for returning the object
115 java_sql_ResultSet( JNIEnv * pEnv, jobject myObj, const java::sql::ConnectionLog& _rParentLogger,java_sql_Connection& _rConnection,
116 java_sql_Statement_Base* pStmt = nullptr );
117
118 // ::cppu::OComponentHelper
119 virtual void SAL_CALL disposing() override;
120 // XInterface
121 virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
122 virtual void SAL_CALL acquire() noexcept override;
123 virtual void SAL_CALL release() noexcept override;
124 //XTypeProvider
125 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
126 // XPropertySet
127 virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override;
128 // XResultSet
129 virtual sal_Bool SAL_CALL next( ) override;
130 virtual sal_Bool SAL_CALL isBeforeFirst( ) override;
131 virtual sal_Bool SAL_CALL isAfterLast( ) override;
132 virtual sal_Bool SAL_CALL isFirst( ) override;
133 virtual sal_Bool SAL_CALL isLast( ) override;
134 virtual void SAL_CALL beforeFirst( ) override;
135 virtual void SAL_CALL afterLast( ) override;
136 virtual sal_Bool SAL_CALL first( ) override;
137 virtual sal_Bool SAL_CALL last( ) override;
138 virtual sal_Int32 SAL_CALL getRow( ) override;
139 virtual sal_Bool SAL_CALL absolute( sal_Int32 row ) override;
140 virtual sal_Bool SAL_CALL relative( sal_Int32 rows ) override;
141 virtual sal_Bool SAL_CALL previous( ) override;
142 virtual void SAL_CALL refreshRow( ) override;
143 virtual sal_Bool SAL_CALL rowUpdated( ) override;
144 virtual sal_Bool SAL_CALL rowInserted( ) override;
145 virtual sal_Bool SAL_CALL rowDeleted( ) override;
146 virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getStatement( ) override;
147 // XRow
148 virtual sal_Bool SAL_CALL wasNull( ) override;
149 virtual OUString SAL_CALL getString( sal_Int32 columnIndex ) override;
150 virtual sal_Bool SAL_CALL getBoolean( sal_Int32 columnIndex ) override;
151 virtual sal_Int8 SAL_CALL getByte( sal_Int32 columnIndex ) override;
152 virtual sal_Int16 SAL_CALL getShort( sal_Int32 columnIndex ) override;
153 virtual sal_Int32 SAL_CALL getInt( sal_Int32 columnIndex ) override;
154 virtual sal_Int64 SAL_CALL getLong( sal_Int32 columnIndex ) override;
155 virtual float SAL_CALL getFloat( sal_Int32 columnIndex ) override;
156 virtual double SAL_CALL getDouble( sal_Int32 columnIndex ) override;
157 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getBytes( sal_Int32 columnIndex ) override;
158 virtual css::util::Date SAL_CALL getDate( sal_Int32 columnIndex ) override;
159 virtual css::util::Time SAL_CALL getTime( sal_Int32 columnIndex ) override;
160 virtual css::util::DateTime SAL_CALL getTimestamp( sal_Int32 columnIndex ) override;
161 virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getBinaryStream( sal_Int32 columnIndex ) override;
162 virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getCharacterStream( sal_Int32 columnIndex ) override;
163 virtual css::uno::Any SAL_CALL getObject( sal_Int32 columnIndex, const css::uno::Reference< css::container::XNameAccess >& typeMap ) override;
164 virtual css::uno::Reference< css::sdbc::XRef > SAL_CALL getRef( sal_Int32 columnIndex ) override;
165 virtual css::uno::Reference< css::sdbc::XBlob > SAL_CALL getBlob( sal_Int32 columnIndex ) override;
166 virtual css::uno::Reference< css::sdbc::XClob > SAL_CALL getClob( sal_Int32 columnIndex ) override;
167 virtual css::uno::Reference< css::sdbc::XArray > SAL_CALL getArray( sal_Int32 columnIndex ) override;
168 // XResultSetMetaDataSupplier
169 virtual css::uno::Reference< css::sdbc::XResultSetMetaData > SAL_CALL getMetaData( ) override;
170 // XCancellable
171 virtual void SAL_CALL cancel( ) override;
172 // XCloseable
173 virtual void SAL_CALL close( ) override;
174 // XWarningsSupplier
175 virtual css::uno::Any SAL_CALL getWarnings( ) override;
176 virtual void SAL_CALL clearWarnings( ) override;
177 // XResultSetUpdate
178 virtual void SAL_CALL insertRow( ) override;
179 virtual void SAL_CALL updateRow( ) override;
180 virtual void SAL_CALL deleteRow( ) override;
181 virtual void SAL_CALL cancelRowUpdates( ) override;
182 virtual void SAL_CALL moveToInsertRow( ) override;
183 virtual void SAL_CALL moveToCurrentRow( ) override;
184 // XRowUpdate
185 virtual void SAL_CALL updateNull( sal_Int32 columnIndex ) override;
186 virtual void SAL_CALL updateBoolean( sal_Int32 columnIndex, sal_Bool x ) override;
187 virtual void SAL_CALL updateByte( sal_Int32 columnIndex, sal_Int8 x ) override;
188 virtual void SAL_CALL updateShort( sal_Int32 columnIndex, sal_Int16 x ) override;
189 virtual void SAL_CALL updateInt( sal_Int32 columnIndex, sal_Int32 x ) override;
190 virtual void SAL_CALL updateLong( sal_Int32 columnIndex, sal_Int64 x ) override;
191 virtual void SAL_CALL updateFloat( sal_Int32 columnIndex, float x ) override;
192 virtual void SAL_CALL updateDouble( sal_Int32 columnIndex, double x ) override;
193 virtual void SAL_CALL updateString( sal_Int32 columnIndex, const OUString& x ) override;
194 virtual void SAL_CALL updateBytes( sal_Int32 columnIndex, const css::uno::Sequence< sal_Int8 >& x ) override;
195 virtual void SAL_CALL updateDate( sal_Int32 columnIndex, const css::util::Date& x ) override;
196 virtual void SAL_CALL updateTime( sal_Int32 columnIndex, const css::util::Time& x ) override;
197 virtual void SAL_CALL updateTimestamp( sal_Int32 columnIndex, const css::util::DateTime& x ) override;
198 virtual void SAL_CALL updateBinaryStream( sal_Int32 columnIndex, const css::uno::Reference< css::io::XInputStream >& x, sal_Int32 length ) override;
199 virtual void SAL_CALL updateCharacterStream( sal_Int32 columnIndex, const css::uno::Reference< css::io::XInputStream >& x, sal_Int32 length ) override;
200 virtual void SAL_CALL updateObject( sal_Int32 columnIndex, const css::uno::Any& x ) override;
201 virtual void SAL_CALL updateNumericObject( sal_Int32 columnIndex, const css::uno::Any& x, sal_Int32 scale ) override;
202 // XColumnLocate
203 virtual sal_Int32 SAL_CALL findColumn( const OUString& columnName ) override;
204
205 public:
207 };
208}
209
210/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void SAL_CALL moveToInsertRow() override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual double SAL_CALL getDouble(sal_Int32 columnIndex) override
virtual void SAL_CALL moveToCurrentRow() override
virtual sal_Bool SAL_CALL isLast() override
virtual void SAL_CALL clearWarnings() override
virtual void SAL_CALL updateShort(sal_Int32 columnIndex, sal_Int16 x) override
virtual void SAL_CALL getFastPropertyValue(css::uno::Any &rValue, sal_Int32 nHandle) const override
virtual void SAL_CALL updateBoolean(sal_Int32 columnIndex, sal_Bool x) override
virtual jclass getMyClass() const override
virtual float SAL_CALL getFloat(sal_Int32 columnIndex) override
virtual void SAL_CALL updateTime(sal_Int32 columnIndex, const css::util::Time &x) override
virtual void SAL_CALL release() noexcept override
virtual sal_Bool SAL_CALL isAfterLast() override
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getBytes(sal_Int32 columnIndex) override
virtual void SAL_CALL updateFloat(sal_Int32 columnIndex, float x) override
virtual css::uno::Any SAL_CALL getObject(sal_Int32 columnIndex, const css::uno::Reference< css::container::XNameAccess > &typeMap) override
virtual sal_Bool SAL_CALL isFirst() override
virtual ~java_sql_ResultSet() override
sal_Int32 getResultSetConcurrency() const
virtual sal_Bool SAL_CALL relative(sal_Int32 rows) override
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper() override
virtual void SAL_CALL updateInt(sal_Int32 columnIndex, sal_Int32 x) override
virtual sal_Int32 SAL_CALL getInt(sal_Int32 columnIndex) override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual void SAL_CALL updateNull(sal_Int32 columnIndex) override
virtual void SAL_CALL disposing() override
virtual void SAL_CALL updateObject(sal_Int32 columnIndex, const css::uno::Any &x) override
virtual css::uno::Reference< css::sdbc::XRef > SAL_CALL getRef(sal_Int32 columnIndex) override
virtual void SAL_CALL acquire() noexcept override
virtual sal_Bool SAL_CALL rowDeleted() override
virtual void SAL_CALL deleteRow() override
virtual sal_Int64 SAL_CALL getLong(sal_Int32 columnIndex) override
virtual sal_Bool SAL_CALL rowInserted() override
virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getCharacterStream(sal_Int32 columnIndex) override
virtual sal_Bool SAL_CALL getBoolean(sal_Int32 columnIndex) override
void setFetchSize(sal_Int32 _par0)
virtual void SAL_CALL updateNumericObject(sal_Int32 columnIndex, const css::uno::Any &x, sal_Int32 scale) override
virtual sal_Int32 SAL_CALL getRow() override
virtual ::cppu::IPropertyArrayHelper * createArrayHelper() const override
void setFetchDirection(sal_Int32 _par0)
virtual sal_Int8 SAL_CALL getByte(sal_Int32 columnIndex) override
virtual void SAL_CALL refreshRow() override
virtual void SAL_CALL updateString(sal_Int32 columnIndex, const OUString &x) override
virtual sal_Bool SAL_CALL absolute(sal_Int32 row) override
virtual void SAL_CALL insertRow() override
virtual void SAL_CALL updateByte(sal_Int32 columnIndex, sal_Int8 x) override
virtual void SAL_CALL updateLong(sal_Int32 columnIndex, sal_Int64 x) override
virtual void SAL_CALL cancel() override
virtual void SAL_CALL updateCharacterStream(sal_Int32 columnIndex, const css::uno::Reference< css::io::XInputStream > &x, sal_Int32 length) override
virtual css::uno::Any SAL_CALL getWarnings() override
virtual void SAL_CALL updateBinaryStream(sal_Int32 columnIndex, const css::uno::Reference< css::io::XInputStream > &x, sal_Int32 length) override
virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getBinaryStream(sal_Int32 columnIndex) override
css::uno::Reference< css::uno::XInterface > m_xStatement
virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const css::uno::Any &rValue) override
virtual css::util::Time SAL_CALL getTime(sal_Int32 columnIndex) override
virtual void SAL_CALL beforeFirst() override
virtual sal_Bool SAL_CALL isBeforeFirst() override
virtual void SAL_CALL cancelRowUpdates() override
virtual sal_Bool SAL_CALL previous() override
virtual sal_Bool SAL_CALL last() override
virtual void SAL_CALL updateBytes(sal_Int32 columnIndex, const css::uno::Sequence< sal_Int8 > &x) override
virtual OUString SAL_CALL getString(sal_Int32 columnIndex) override
virtual css::uno::Reference< css::sdbc::XResultSetMetaData > SAL_CALL getMetaData() override
virtual css::util::Date SAL_CALL getDate(sal_Int32 columnIndex) override
virtual sal_Bool SAL_CALL rowUpdated() override
virtual css::uno::Reference< css::sdbc::XClob > SAL_CALL getClob(sal_Int32 columnIndex) override
virtual css::uno::Reference< css::sdbc::XBlob > SAL_CALL getBlob(sal_Int32 columnIndex) override
virtual void SAL_CALL close() override
virtual void SAL_CALL updateDate(sal_Int32 columnIndex, const css::util::Date &x) override
virtual sal_Bool SAL_CALL first() override
virtual void SAL_CALL updateTimestamp(sal_Int32 columnIndex, const css::util::DateTime &x) override
virtual sal_Bool SAL_CALL next() override
virtual sal_Int16 SAL_CALL getShort(sal_Int32 columnIndex) override
virtual sal_Bool SAL_CALL convertFastPropertyValue(css::uno::Any &rConvertedValue, css::uno::Any &rOldValue, sal_Int32 nHandle, const css::uno::Any &rValue) override
virtual sal_Bool SAL_CALL wasNull() override
virtual void SAL_CALL afterLast() override
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
virtual void SAL_CALL updateDouble(sal_Int32 columnIndex, double x) override
java_sql_ResultSet(JNIEnv *pEnv, jobject myObj, const java::sql::ConnectionLog &_rParentLogger, java_sql_Connection &_rConnection, java_sql_Statement_Base *pStmt=nullptr)
virtual css::uno::Reference< css::sdbc::XArray > SAL_CALL getArray(sal_Int32 columnIndex) override
virtual sal_Int32 SAL_CALL findColumn(const OUString &columnName) override
virtual void SAL_CALL updateRow() override
virtual css::util::DateTime SAL_CALL getTimestamp(sal_Int32 columnIndex) override
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getStatement() override
Type
::cppu::WeakComponentImplHelper< css::sdbc::XResultSet, css::sdbc::XRow, css::sdbc::XResultSetMetaDataSupplier, css::util::XCancellable, css::sdbc::XWarningsSupplier, css::sdbc::XResultSetUpdate, css::sdbc::XRowUpdate, css::sdbc::XCloseable, css::sdbc::XColumnLocate, css::lang::XServiceInfo > java_sql_ResultSet_BASE
sal_Int32 scale
Definition: pq_statics.cxx:62
const char * columnName
Definition: pq_statics.cxx:56
unsigned char sal_Bool
signed char sal_Int8