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