1*d1766043SAndrew Rist/************************************************************** 2cdf0e10cSrcweir * 3*d1766043SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*d1766043SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*d1766043SAndrew Rist * distributed with this work for additional information 6*d1766043SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*d1766043SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*d1766043SAndrew Rist * "License"); you may not use this file except in compliance 9*d1766043SAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 11*d1766043SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13*d1766043SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*d1766043SAndrew Rist * software distributed under the License is distributed on an 15*d1766043SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*d1766043SAndrew Rist * KIND, either express or implied. See the License for the 17*d1766043SAndrew Rist * specific language governing permissions and limitations 18*d1766043SAndrew Rist * under the License. 19cdf0e10cSrcweir * 20*d1766043SAndrew Rist *************************************************************/ 21*d1766043SAndrew Rist 22*d1766043SAndrew Rist 23cdf0e10cSrcweir#ifndef __com_sun_star_sdbc_XRow_idl__ 24cdf0e10cSrcweir#define __com_sun_star_sdbc_XRow_idl__ 25cdf0e10cSrcweir 26cdf0e10cSrcweir#ifndef __com_sun_star_uno_XInterface_idl__ 27cdf0e10cSrcweir#include <com/sun/star/uno/XInterface.idl> 28cdf0e10cSrcweir#endif 29cdf0e10cSrcweir 30cdf0e10cSrcweir#ifndef __com_sun_star_util_Date_idl__ 31cdf0e10cSrcweir#include <com/sun/star/util/Date.idl> 32cdf0e10cSrcweir#endif 33cdf0e10cSrcweir 34cdf0e10cSrcweir#ifndef __com_sun_star_util_DateTime_idl__ 35cdf0e10cSrcweir#include <com/sun/star/util/DateTime.idl> 36cdf0e10cSrcweir#endif 37cdf0e10cSrcweir 38cdf0e10cSrcweir#ifndef __com_sun_star_util_Time_idl__ 39cdf0e10cSrcweir#include <com/sun/star/util/Time.idl> 40cdf0e10cSrcweir#endif 41cdf0e10cSrcweir 42cdf0e10cSrcweir module com { module sun { module star { module io { 43cdf0e10cSrcweir published interface XInputStream; 44cdf0e10cSrcweir};};};}; 45cdf0e10cSrcweir 46cdf0e10cSrcweir module com { module sun { module star { module container { 47cdf0e10cSrcweir published interface XNameAccess; 48cdf0e10cSrcweir};};};}; 49cdf0e10cSrcweir 50cdf0e10cSrcweir#ifndef __com_sun_star_sdbc_SQLException_idl__ 51cdf0e10cSrcweir#include <com/sun/star/sdbc/SQLException.idl> 52cdf0e10cSrcweir#endif 53cdf0e10cSrcweir 54cdf0e10cSrcweir module com { module sun { module star { module sdbc { 55cdf0e10cSrcweir 56cdf0e10cSrcweir published interface XRef; 57cdf0e10cSrcweir published interface XArray; 58cdf0e10cSrcweir published interface XBlob; 59cdf0e10cSrcweir published interface XClob; 60cdf0e10cSrcweir 61cdf0e10cSrcweir 62cdf0e10cSrcweir/** is used to access data which is collected in a row. 63cdf0e10cSrcweir All methods raise a 64cdf0e10cSrcweir <type scope="com::sun::star::sdbc">SQLException</type> 65cdf0e10cSrcweir if a database access error occurs. 66cdf0e10cSrcweir */ 67cdf0e10cSrcweirpublished interface XRow: com::sun::star::uno::XInterface 68cdf0e10cSrcweir{ 69cdf0e10cSrcweir //------------------------------------------------------------------------- 70cdf0e10cSrcweir 71cdf0e10cSrcweir /** reports whether the last column read had a value of SQL NULL. 72cdf0e10cSrcweir Note that you must first call getXXX on a column to try to read 73cdf0e10cSrcweir its value and then call wasNull() to see if the value read was 74cdf0e10cSrcweir SQL NULL. 75cdf0e10cSrcweir 76cdf0e10cSrcweir @returns 77cdf0e10cSrcweir <TRUE/> if last column read was SQL NULL and <FALSE/> otherwise 78cdf0e10cSrcweir @throws SQLException 79cdf0e10cSrcweir if a database access error occurs. 80cdf0e10cSrcweir */ 81cdf0e10cSrcweir boolean wasNull() raises (SQLException); 82cdf0e10cSrcweir //------------------------------------------------------------------------- 83cdf0e10cSrcweir 84cdf0e10cSrcweir /** gets the value of a column in the current row as a string. 85cdf0e10cSrcweir @param columnIndex 86cdf0e10cSrcweir the first column is 1, the second is 2, 87cdf0e10cSrcweir @returns 88cdf0e10cSrcweir the column value; if the value is SQL NULL, the result is null 89cdf0e10cSrcweir @throws SQLException 90cdf0e10cSrcweir if a database access error occurs. 91cdf0e10cSrcweir */ 92cdf0e10cSrcweir string getString([in]long columnIndex) raises (SQLException); 93cdf0e10cSrcweir //------------------------------------------------------------------------- 94cdf0e10cSrcweir 95cdf0e10cSrcweir /** gets the value of a column in the current row as boolean. 96cdf0e10cSrcweir @param columnIndex 97cdf0e10cSrcweir the first column is 1, the second is 2, 98cdf0e10cSrcweir @returns 99cdf0e10cSrcweir the column value; if the value is SQL NULL, the result is null 100cdf0e10cSrcweir @throws SQLException 101cdf0e10cSrcweir if a database access error occurs. 102cdf0e10cSrcweir */ 103cdf0e10cSrcweir boolean getBoolean([in]long columnIndex) raises (SQLException); 104cdf0e10cSrcweir //------------------------------------------------------------------------- 105cdf0e10cSrcweir 106cdf0e10cSrcweir /** get the value of a column in the current row as a byte. 107cdf0e10cSrcweir @param columnIndex 108cdf0e10cSrcweir the first column is 1, the second is 2, 109cdf0e10cSrcweir @returns 110cdf0e10cSrcweir the column value; if the value is SQL NULL, the result is null 111cdf0e10cSrcweir @throws SQLException 112cdf0e10cSrcweir if a database access error occurs. 113cdf0e10cSrcweir */ 114cdf0e10cSrcweir byte getByte([in]long columnIndex) raises (SQLException); 115cdf0e10cSrcweir //------------------------------------------------------------------------- 116cdf0e10cSrcweir 117cdf0e10cSrcweir /** gets the value of a column in the current row as a short. 118cdf0e10cSrcweir @param columnIndex 119cdf0e10cSrcweir the first column is 1, the second is 2, 120cdf0e10cSrcweir @returns 121cdf0e10cSrcweir the column value; if the value is SQL NULL, the result is null 122cdf0e10cSrcweir @throws SQLException 123cdf0e10cSrcweir if a database access error occurs. 124cdf0e10cSrcweir */ 125cdf0e10cSrcweir short getShort([in]long columnIndex) raises (SQLException); 126cdf0e10cSrcweir //------------------------------------------------------------------------- 127cdf0e10cSrcweir 128cdf0e10cSrcweir /** get the value of a column in the current row as an integer. 129cdf0e10cSrcweir @param columnIndex 130cdf0e10cSrcweir the first column is 1, the second is 2, 131cdf0e10cSrcweir @returns 132cdf0e10cSrcweir the column value; if the value is SQL NULL, the result is null 133cdf0e10cSrcweir @throws SQLException 134cdf0e10cSrcweir if a database access error occurs. 135cdf0e10cSrcweir */ 136cdf0e10cSrcweir long getInt([in]long columnIndex) raises (SQLException); 137cdf0e10cSrcweir //------------------------------------------------------------------------- 138cdf0e10cSrcweir 139cdf0e10cSrcweir /** get the value of a column in the current row as a long. 140cdf0e10cSrcweir @param columnIndex 141cdf0e10cSrcweir the first column is 1, the second is 2, 142cdf0e10cSrcweir @returns 143cdf0e10cSrcweir the column value; if the value is SQL NULL, the result is null 144cdf0e10cSrcweir @throws SQLException 145cdf0e10cSrcweir if a database access error occurs. 146cdf0e10cSrcweir */ 147cdf0e10cSrcweir hyper getLong([in]long columnIndex) raises (SQLException); 148cdf0e10cSrcweir //------------------------------------------------------------------------- 149cdf0e10cSrcweir 150cdf0e10cSrcweir /** gets the value of a column in the current row as a float. 151cdf0e10cSrcweir @param columnIndex 152cdf0e10cSrcweir the first column is 1, the second is 2, 153cdf0e10cSrcweir @returns 154cdf0e10cSrcweir the column value; if the value is SQL NULL, the result is null 155cdf0e10cSrcweir @throws SQLException 156cdf0e10cSrcweir if a database access error occurs. 157cdf0e10cSrcweir */ 158cdf0e10cSrcweir float getFloat([in]long columnIndex) raises (SQLException); 159cdf0e10cSrcweir //------------------------------------------------------------------------- 160cdf0e10cSrcweir 161cdf0e10cSrcweir /** gets the value of a column in the current row as a double. 162cdf0e10cSrcweir @param columnIndex 163cdf0e10cSrcweir the first column is 1, the second is 2, 164cdf0e10cSrcweir @returns 165cdf0e10cSrcweir the column value; if the value is SQL NULL, the result is null 166cdf0e10cSrcweir @throws SQLException 167cdf0e10cSrcweir if a database access error occurs. 168cdf0e10cSrcweir */ 169cdf0e10cSrcweir double getDouble([in]long columnIndex) raises (SQLException); 170cdf0e10cSrcweir //------------------------------------------------------------------------- 171cdf0e10cSrcweir 172cdf0e10cSrcweir /** gets the value of a column in the current row as a byte array. 173cdf0e10cSrcweir The bytes represent the raw values returned by the driver. 174cdf0e10cSrcweir @param columnIndex 175cdf0e10cSrcweir the first column is 1, the second is 2, ... 176cdf0e10cSrcweir @returns 177cdf0e10cSrcweir the column value; if the value is SQL NULL, the result is empty. 178cdf0e10cSrcweir @throws SQLException 179cdf0e10cSrcweir if a database access error occurs. 180cdf0e10cSrcweir */ 181cdf0e10cSrcweir sequence<byte> getBytes([in]long columnIndex) raises (SQLException); 182cdf0e10cSrcweir //------------------------------------------------------------------------- 183cdf0e10cSrcweir 184cdf0e10cSrcweir /** gets the value of a column in the current row as a date object. 185cdf0e10cSrcweir @param columnIndex 186cdf0e10cSrcweir the first column is 1, the second is 2, 187cdf0e10cSrcweir @returns 188cdf0e10cSrcweir the column value; if the value is SQL NULL, the result is null 189cdf0e10cSrcweir @throws SQLException 190cdf0e10cSrcweir if a database access error occurs. 191cdf0e10cSrcweir */ 192cdf0e10cSrcweir com::sun::star::util::Date getDate([in]long columnIndex) 193cdf0e10cSrcweir raises (SQLException); 194cdf0e10cSrcweir //------------------------------------------------------------------------- 195cdf0e10cSrcweir 196cdf0e10cSrcweir /** gets the value of a column in the current row as a time object. 197cdf0e10cSrcweir @param columnIndex 198cdf0e10cSrcweir the first column is 1, the second is 2, 199cdf0e10cSrcweir @returns 200cdf0e10cSrcweir the column value; if the value is SQL NULL, the result is null 201cdf0e10cSrcweir @throws SQLException 202cdf0e10cSrcweir if a database access error occurs. 203cdf0e10cSrcweir */ 204cdf0e10cSrcweir com::sun::star::util::Time getTime([in]long columnIndex) 205cdf0e10cSrcweir raises (SQLException); 206cdf0e10cSrcweir //------------------------------------------------------------------------- 207cdf0e10cSrcweir 208cdf0e10cSrcweir /** gets the value of a column in the current row as a datetime object. 209cdf0e10cSrcweir @param columnIndex 210cdf0e10cSrcweir the first column is 1, the second is 2, 211cdf0e10cSrcweir @returns 212cdf0e10cSrcweir the column value; if the value is SQL NULL, the result is null 213cdf0e10cSrcweir @throws SQLException 214cdf0e10cSrcweir if a database access error occurs. 215cdf0e10cSrcweir */ 216cdf0e10cSrcweir com::sun::star::util::DateTime getTimestamp([in]long columnIndex) 217cdf0e10cSrcweir raises (SQLException); 218cdf0e10cSrcweir //------------------------------------------------------------------------- 219cdf0e10cSrcweir 220cdf0e10cSrcweir /** gets the value of a column in the current row as a stream of 221cdf0e10cSrcweir uninterpreted bytes. The value can then be read in chunks from the 222cdf0e10cSrcweir stream. This method is particularly suitable for retrieving large 223cdf0e10cSrcweir LONGVARBINARY values. 224cdf0e10cSrcweir 225cdf0e10cSrcweir 226cdf0e10cSrcweir <p> 227cdf0e10cSrcweir <b>Note:</b> All the data in the returned stream must be 228cdf0e10cSrcweir read prior to getting the value of any other column. The next 229cdf0e10cSrcweir call to a get method implicitly closes the stream. Also, a 230cdf0e10cSrcweir stream may return 0 when the method 231cdf0e10cSrcweir <member scope="com::sun::star::io">XInputStream::available()</member> 232cdf0e10cSrcweir is called whether there is data 233cdf0e10cSrcweir available or not. 234cdf0e10cSrcweir </p> 235cdf0e10cSrcweir @param columnIndex 236cdf0e10cSrcweir the first column is 1, the second is 2, 237cdf0e10cSrcweir @returns 238cdf0e10cSrcweir the column value; if the value is SQL NULL, the result is null 239cdf0e10cSrcweir @throws SQLException 240cdf0e10cSrcweir if a database access error occurs. 241cdf0e10cSrcweir */ 242cdf0e10cSrcweir com::sun::star::io::XInputStream getBinaryStream([in]long columnIndex) 243cdf0e10cSrcweir raises (SQLException); 244cdf0e10cSrcweir //------------------------------------------------------------------------- 245cdf0e10cSrcweir 246cdf0e10cSrcweir /** gets the value of a column in the current row as a stream of 247cdf0e10cSrcweir uninterpreted bytes. The value can then be read in chunks from the 248cdf0e10cSrcweir stream. This method is particularly suitable for retrieving large 249cdf0e10cSrcweir LONGVARBINARY or LONGVARCHAR values. 250cdf0e10cSrcweir 251cdf0e10cSrcweir 252cdf0e10cSrcweir <p> 253cdf0e10cSrcweir <b>Note:</b> All the data in the returned stream must be 254cdf0e10cSrcweir read prior to getting the value of any other column. The next 255cdf0e10cSrcweir call to a get method implicitly closes the stream. Also, a 256cdf0e10cSrcweir stream may return 0 when the method 257cdf0e10cSrcweir <member scope="com::sun::star::io">XInputStream::available()</member> 258cdf0e10cSrcweir is called whether there is data 259cdf0e10cSrcweir available or not. 260cdf0e10cSrcweir </p> 261cdf0e10cSrcweir @param columnIndex 262cdf0e10cSrcweir the first column is 1, the second is 2, 263cdf0e10cSrcweir @returns 264cdf0e10cSrcweir the column value; if the value is SQL NULL, the result is null 265cdf0e10cSrcweir @throws SQLException 266cdf0e10cSrcweir if a database access error occurs. 267cdf0e10cSrcweir */ 268cdf0e10cSrcweir com::sun::star::io::XInputStream getCharacterStream([in]long columnIndex) 269cdf0e10cSrcweir raises (SQLException); 270cdf0e10cSrcweir //------------------------------------------------------------------------- 271cdf0e10cSrcweir 272cdf0e10cSrcweir /** returns the value of a column in the current row as an object. 273cdf0e10cSrcweir This method uses the given 274cdf0e10cSrcweir <code>Map</code> 275cdf0e10cSrcweir object for the custom mapping of the SQL structure or distinct type 276cdf0e10cSrcweir that is being retrieved. 277cdf0e10cSrcweir @param columnIndex 278cdf0e10cSrcweir the first column is 1, the second is 2, 279cdf0e10cSrcweir @param typeMap 280cdf0e10cSrcweir the map of types which should be used to get the column value 281cdf0e10cSrcweir @returns 282cdf0e10cSrcweir the column value; if the value is SQL NULL, the result is null 283cdf0e10cSrcweir @throws SQLException 284cdf0e10cSrcweir if a database access error occurs. 285cdf0e10cSrcweir */ 286cdf0e10cSrcweir any getObject([in]long columnIndex, 287cdf0e10cSrcweir [in]com::sun::star::container::XNameAccess typeMap) 288cdf0e10cSrcweir raises (SQLException); 289cdf0e10cSrcweir //------------------------------------------------------------------------- 290cdf0e10cSrcweir 291cdf0e10cSrcweir /** gets a REF(&lt;structured-type&gt;) column value from the current row. 292cdf0e10cSrcweir @param columnIndex 293cdf0e10cSrcweir the first column is 1, the second is 2, 294cdf0e10cSrcweir @returns 295cdf0e10cSrcweir the column value; if the value is SQL NULL, the result is null 296cdf0e10cSrcweir @throws SQLException 297cdf0e10cSrcweir if a database access error occurs. 298cdf0e10cSrcweir */ 299cdf0e10cSrcweir XRef getRef([in]long columnIndex) raises (SQLException); 300cdf0e10cSrcweir //------------------------------------------------------------------------- 301cdf0e10cSrcweir 302cdf0e10cSrcweir /** gets a BLOB value in the current row. 303cdf0e10cSrcweir @param columnIndex 304cdf0e10cSrcweir the first column is 1, the second is 2, 305cdf0e10cSrcweir @returns 306cdf0e10cSrcweir the column value; if the value is SQL NULL, the result is null 307cdf0e10cSrcweir @throws SQLException 308cdf0e10cSrcweir if a database access error occurs. 309cdf0e10cSrcweir */ 310cdf0e10cSrcweir XBlob getBlob([in]long columnIndex) raises (SQLException); 311cdf0e10cSrcweir //------------------------------------------------------------------------- 312cdf0e10cSrcweir 313cdf0e10cSrcweir /** gets a CLOB value in the current row of this 314cdf0e10cSrcweir <code>ResultSet</code> 315cdf0e10cSrcweir object. 316cdf0e10cSrcweir @param columnIndex 317cdf0e10cSrcweir the first column is 1, the second is 2, 318cdf0e10cSrcweir @returns 319cdf0e10cSrcweir the column value; if the value is SQL NULL, the result is null 320cdf0e10cSrcweir @throws SQLException 321cdf0e10cSrcweir if a database access error occurs. 322cdf0e10cSrcweir */ 323cdf0e10cSrcweir XClob getClob([in]long columnIndex) raises (SQLException); 324cdf0e10cSrcweir //------------------------------------------------------------------------- 325cdf0e10cSrcweir 326cdf0e10cSrcweir /** gets a SQL ARRAY value from the current row of this 327cdf0e10cSrcweir <code>ResultSet</code> 328cdf0e10cSrcweir object. 329cdf0e10cSrcweir @param columnIndex 330cdf0e10cSrcweir the first column is 1, the second is 2, 331cdf0e10cSrcweir @returns 332cdf0e10cSrcweir the column value; if the value is SQL NULL, the result is null 333cdf0e10cSrcweir @throws SQLException 334cdf0e10cSrcweir if a database access error occurs. 335cdf0e10cSrcweir */ 336cdf0e10cSrcweir XArray getArray([in]long columnIndex) raises (SQLException); 337cdf0e10cSrcweir}; 338cdf0e10cSrcweir 339cdf0e10cSrcweir//============================================================================= 340cdf0e10cSrcweir 341cdf0e10cSrcweir}; }; }; }; 342cdf0e10cSrcweir 343cdf0e10cSrcweir/*=========================================================================== 344cdf0e10cSrcweir===========================================================================*/ 345cdf0e10cSrcweir#endif 346