Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15

API

SDK

Tips ‘n’ Tricks

Miscellaneous


:: com :: sun :: star :: sdb ::

interface XColumn
Description
is used to access data which is collected in a row.

Methods' Summary
wasNull reports whether the last column read had a value of SQL NULL. Note that you must first call getXXX on a column to try to read its value and then call wasNull() to see if the value read was SQL NULL.  
getString gets the value of a column in the current row as a String.  
getBoolean gets the value of a column in the current row as boolean.  
getByte gets the value of a column in the current row as a byte.  
getShort gets the value of a column in the current row as a short.  
getInt gets the value of a column in the current row as a long.  
getLong gets the value of a column in the current row as a hyper.  
getFloat gets the value of a column in the current row as a float.  
getDouble gets the value of a column in the current row as a double.  
getBytes gets the value of a column in the current row as a byte array. The bytes represent the raw values returned by the driver.  
getDate gets the value of a column in the current row as a date object.  
getTime gets the value of a column in the current row as a time object.  
getTimestamp gets the value of a column in the current row as a datetime object.  
getBinaryStream gets the value of a column in the current row as a stream of uninterpreted bytes. The value can then be read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARBINARY or LONGVARCHAR values.  
getCharacterStream gets the value of a column in the current row as a stream of uninterpreted bytes. The value can then be read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARCHAR values.  
getObject  
getRef gets a REF(<structured-type>) column value from the current row.  
getBlob gets a BLOB (Binary Large OBject) value in the current row.  
getClob gets a CLOB value in the current row of this ResultSet object.  
getArray gets a SQL ARRAY value from the current row.  
Methods' Details
wasNull
boolean
wasNull()
raises( ::com::sun::star::sdbc::SQLException );

Description
reports whether the last column read had a value of SQL NULL. Note that you must first call getXXX on a column to try to read its value and then call wasNull() to see if the value read was SQL NULL.
Returns
true if so
Throws
com::sun::star::sdbc::SQLException if a database access error occurs.
getString
string
getString()
raises( ::com::sun::star::sdbc::SQLException );

Description
gets the value of a column in the current row as a String.
Returns
the column value
Throws
com::sun::star::sdbc::SQLException if a database access error occurs.
getBoolean
boolean
getBoolean()
raises( ::com::sun::star::sdbc::SQLException );

Description
gets the value of a column in the current row as boolean.
Returns
the column value
Throws
com::sun::star::sdbc::SQLException if a database access error occurs.
getByte
byte
getByte()
raises( ::com::sun::star::sdbc::SQLException );

Description
gets the value of a column in the current row as a byte.
Returns
the column value
Throws
com::sun::star::sdbc::SQLException if a database access error occurs.
getShort
short
getShort()
raises( ::com::sun::star::sdbc::SQLException );

Description
gets the value of a column in the current row as a short.
Returns
the column value
Throws
com::sun::star::sdbc::SQLException if a database access error occurs.
getInt
long
getInt()
raises( ::com::sun::star::sdbc::SQLException );

Description
gets the value of a column in the current row as a long.
Returns
the column value
Throws
com::sun::star::sdbc::SQLException if a database access error occurs.
getLong
hyper
getLong()
raises( ::com::sun::star::sdbc::SQLException );

Description
gets the value of a column in the current row as a hyper.
Returns
the column value
Throws
com::sun::star::sdbc::SQLException if a database access error occurs.
getFloat
float
getFloat()
raises( ::com::sun::star::sdbc::SQLException );

Description
gets the value of a column in the current row as a float.
Returns
the column value
Throws
com::sun::star::sdbc::SQLException if a database access error occurs.
getDouble
double
getDouble()
raises( ::com::sun::star::sdbc::SQLException );

Description
gets the value of a column in the current row as a double.
Returns
the column value
Throws
com::sun::star::sdbc::SQLException if a database access error occurs.
getBytes
sequence< byte >
getBytes()
raises( ::com::sun::star::sdbc::SQLException );

Description
gets the value of a column in the current row as a byte array. The bytes represent the raw values returned by the driver.
Returns
the column value; if the value is SQL NULL, the result is empty.
Throws
com::sun::star::sdbc::SQLException if a database access error occurs.
getDate
::com::sun::star::util::Date
getDate()
raises( ::com::sun::star::sdbc::SQLException );

Description
gets the value of a column in the current row as a date object.
Returns
the column value
Throws
com::sun::star::sdbc::SQLException if a database access error occurs.
getTime
::com::sun::star::util::Time
getTime()
raises( ::com::sun::star::sdbc::SQLException );

Description
gets the value of a column in the current row as a time object.
Returns
the column value
Throws
com::sun::star::sdbc::SQLException if a database access error occurs.
getTimestamp
::com::sun::star::util::DateTime
getTimestamp()
raises( ::com::sun::star::sdbc::SQLException );

Description
gets the value of a column in the current row as a datetime object.
Returns
the column value
Throws
com::sun::star::sdbc::SQLException if a database access error occurs.
getBinaryStream
::com::sun::star::io::XInputStream
getBinaryStream()
raises( ::com::sun::star::sdbc::SQLException );

Description
gets the value of a column in the current row as a stream of uninterpreted bytes. The value can then be read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARBINARY or LONGVARCHAR values.

Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a get method implicitly closes the stream. Also, a stream may return 0 when the method ::com::sun::star::io::XInputStream::available() is called whether there is data available or not.

Returns
the column value
Throws
com::sun::star::sdbc::SQLException if a database access error occurs.
getCharacterStream
::com::sun::star::io::XInputStream
getCharacterStream()
raises( ::com::sun::star::sdbc::SQLException );

Description
gets the value of a column in the current row as a stream of uninterpreted bytes. The value can then be read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARCHAR values.

Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a get method implicitly closes the stream. Also, a stream may return 0 when the method ::com::sun::star::io::XInputStream::available() is called whether there is data available or not.

Returns
the column value
Throws
com::sun::star::sdbc::SQLException if a database access error occurs.
getObject
any
getObject( [in] ::com::sun::star::container::XNameAccess  typeMap )
raises( ::com::sun::star::sdbc::SQLException );

Returns
the value of a column in the current row as an object. This method uses the given Map object for the custom mapping of the SQL structure or distinct type that is being retrieved.
Parameter typeMap
the type map is used to fetch the correct type
Returns
the column value
Throws
com::sun::star::sdbc::SQLException if a database access error occurs.
getRef
::com::sun::star::sdbc::XRef
getRef()
raises( ::com::sun::star::sdbc::SQLException );

Description
gets a REF(<structured-type>) column value from the current row.
Returns
the column value
Throws
com::sun::star::sdbc::SQLException if a database access error occurs.
getBlob
::com::sun::star::sdbc::XBlob
getBlob()
raises( ::com::sun::star::sdbc::SQLException );

Description
gets a BLOB (Binary Large OBject) value in the current row.
Returns
the column value
Throws
com::sun::star::sdbc::SQLException if a database access error occurs.
getClob
::com::sun::star::sdbc::XClob
getClob()
raises( ::com::sun::star::sdbc::SQLException );

Description
gets a CLOB value in the current row of this ResultSet object.
Returns
the column value
Throws
com::sun::star::sdbc::SQLException if a database access error occurs.
getArray
::com::sun::star::sdbc::XArray
getArray()
raises( ::com::sun::star::sdbc::SQLException );

Description
gets a SQL ARRAY value from the current row.
Returns
the column value
Throws
com::sun::star::sdbc::SQLException if a database access error occurs.
Top of Page

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.