interface XColumn in module com::sun::star::sdb::

(Global Index)

Syntax

interface XColumn : com::sun::star::uno::XInterface ;

Description

is used to access data which is collected in a row.

Method 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.

Known Services Which Export this Interface

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

Method Details



wasNull

Syntax

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

Syntax

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

Syntax

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

Syntax

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

Syntax

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

Syntax

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

Syntax

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

Syntax

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

Syntax

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

Syntax

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

Syntax

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

Syntax

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

Syntax

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

Syntax

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 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

Syntax

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 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

Syntax

any getObject (
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

Syntax

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

Syntax

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

Syntax

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

Syntax

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