LibreOffice Module ucbhelper (master) 1
Public Member Functions | Private Attributes | List of all members
ucbhelper::ResultSetMetaData Class Referencefinal

This is an implementation of the interface XResultSetMetaData. More...

#include <resultsetmetadata.hxx>

Inheritance diagram for ucbhelper::ResultSetMetaData:
[legend]
Collaboration diagram for ucbhelper::ResultSetMetaData:
[legend]

Public Member Functions

 ResultSetMetaData (const css::uno::Reference< css::uno::XComponentContext > &rxContext, const css::uno::Sequence< css::beans::Property > &rProps)
 Constructor. More...
 
 ResultSetMetaData (const css::uno::Reference< css::uno::XComponentContext > &rxContext, const css::uno::Sequence< css::beans::Property > &rProps, std::vector< ResultSetColumnData > &&rColumnData)
 Constructor. More...
 
virtual ~ResultSetMetaData () override
 Destructor. More...
 
virtual sal_Int32 SAL_CALL getColumnCount () override
 Returns the number of columns of the resultset. More...
 
virtual sal_Bool SAL_CALL isAutoIncrement (sal_Int32 column) override
 Checks whether column is automatically numbered, which makes it read-only. More...
 
virtual sal_Bool SAL_CALL isCaseSensitive (sal_Int32 column) override
 Checks whether column is case sensitive. More...
 
virtual sal_Bool SAL_CALL isSearchable (sal_Int32 column) override
 Checks whether the value stored in column can be used in a WHERE clause. More...
 
virtual sal_Bool SAL_CALL isCurrency (sal_Int32 column) override
 Checks whether column is a cash value. More...
 
virtual sal_Int32 SAL_CALL isNullable (sal_Int32 column) override
 Checks whether a NULL can be stored in column. More...
 
virtual sal_Bool SAL_CALL isSigned (sal_Int32 column) override
 Checks whether the value stored in column is a signed number. More...
 
virtual sal_Int32 SAL_CALL getColumnDisplaySize (sal_Int32 column) override
 Gets the normal maximum width in characters for column. More...
 
virtual OUString SAL_CALL getColumnLabel (sal_Int32 column) override
 Gets the suggested column title for column, to be used in print- outs and displays. More...
 
virtual OUString SAL_CALL getColumnName (sal_Int32 column) override
 Gets the name of column. More...
 
virtual OUString SAL_CALL getSchemaName (sal_Int32 column) override
 Gets the schema name for the table from which column of this result set was derived. More...
 
virtual sal_Int32 SAL_CALL getPrecision (sal_Int32 column) override
 For number types, getprecision gets the number of decimal digits in column. More...
 
virtual sal_Int32 SAL_CALL getScale (sal_Int32 column) override
 Gets the number of digits to the right of the decimal point for values in column. More...
 
virtual OUString SAL_CALL getTableName (sal_Int32 column) override
 Gets the name of the table from which column of this result set was derived or "" if there is none (for example, for a join). More...
 
virtual OUString SAL_CALL getCatalogName (sal_Int32 column) override
 Gets the catalog name for the table from which column of this result set was derived. More...
 
virtual sal_Int32 SAL_CALL getColumnType (sal_Int32 column) override
 Gets the JDBC type for the value stored in column. More...
 
virtual OUString SAL_CALL getColumnTypeName (sal_Int32 column) override
 Gets the type name used by this particular data source for the values stored in column. More...
 
virtual sal_Bool SAL_CALL isReadOnly (sal_Int32 column) override
 Indicates whether a column is definitely not writable. More...
 
virtual sal_Bool SAL_CALL isWritable (sal_Int32 column) override
 Indicates whether it is possible for a write on the column to succeed. More...
 
virtual sal_Bool SAL_CALL isDefinitelyWritable (sal_Int32 column) override
 Indicates whether a write on the column will definitely succeed. More...
 
virtual OUString SAL_CALL getColumnServiceName (sal_Int32 column) override
 Returns the fully-qualified name of the service whose instances are manufactured if the method css::sdbc::ResultSet::getObject is called to retrieve a value from the column. More...
 

Private Attributes

std::unique_ptr< ucbhelper_impl::ResultSetMetaData_Implm_pImpl
 
css::uno::Reference< css::uno::XComponentContext > m_xContext
 
css::uno::Sequence< css::beans::Property > m_aProps
 

Detailed Description

This is an implementation of the interface XResultSetMetaData.

It can be used to implement the interface css::sdbc::XResultSetMetaDataSupplier, which is required for implementations of service com.sun.star.ucb.ContentResultSet.

Definition at line 72 of file resultsetmetadata.hxx.

Constructor & Destructor Documentation

◆ ResultSetMetaData() [1/2]

ucbhelper::ResultSetMetaData::ResultSetMetaData ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext,
const css::uno::Sequence< css::beans::Property > &  rProps 
)

Constructor.

ResultSet is readonly by default.

Parameters
rxSMgris a Service Manager.
rPropsis a sequence of properties (partially) describing the columns of a resultset.

◆ ResultSetMetaData() [2/2]

ucbhelper::ResultSetMetaData::ResultSetMetaData ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext,
const css::uno::Sequence< css::beans::Property > &  rProps,
std::vector< ResultSetColumnData > &&  rColumnData 
)

Constructor.

Parameters
rxSMgris a Service Manager.
rPropsis a sequence of properties (partially) describing the columns of a resultset.
rColumnDatacontains additional meta data for the columns of a resultset, which override the default values returned by the appropriate methods of this class. The length of rColumnData must be the same as length of rProps. rColumnData[ 0 ] corresponds to data in rProps[ 0 ], rColumnData[ 1 ] corresponds to data in rProps[ 1 ], ...

References isAutoIncrement, isCurrency, and isNullable.

◆ ~ResultSetMetaData()

ucbhelper::ResultSetMetaData::~ResultSetMetaData ( )
overridevirtual

Destructor.

Definition at line 96 of file resultsetmetadata.cxx.

Member Function Documentation

◆ getCatalogName()

OUString SAL_CALL ucbhelper::ResultSetMetaData::getCatalogName ( sal_Int32  column)
overridevirtual

Gets the catalog name for the table from which column of this result set was derived.

Because this feature is not widely supported, the return value for many DBMSs will be an empty string.

Parameters
columnis the number of the column for that a value shall be returned. The first column is 1, the second is 2, ...
Returns
the catalog name for column or an empty string.

Definition at line 240 of file resultsetmetadata.cxx.

◆ getColumnCount()

sal_Int32 SAL_CALL ucbhelper::ResultSetMetaData::getColumnCount ( )
overridevirtual

Returns the number of columns of the resultset.

Returns
the length of the property sequence.

Definition at line 105 of file resultsetmetadata.cxx.

References m_aProps.

◆ getColumnDisplaySize()

sal_Int32 SAL_CALL ucbhelper::ResultSetMetaData::getColumnDisplaySize ( sal_Int32  column)
overridevirtual

Gets the normal maximum width in characters for column.

Parameters
columnis the number of the column for that a value shall be returned. The first column is 1, the second is 2, ...
Returns
the normal maximum width in characters for column.

Definition at line 161 of file resultsetmetadata.cxx.

◆ getColumnLabel()

OUString SAL_CALL ucbhelper::ResultSetMetaData::getColumnLabel ( sal_Int32  column)
overridevirtual

Gets the suggested column title for column, to be used in print- outs and displays.

Parameters
columnis the number of the column for that a value shall be returned. The first column is 1, the second is 2, ...
Returns
the column label.

Definition at line 171 of file resultsetmetadata.cxx.

References m_aProps.

◆ getColumnName()

OUString SAL_CALL ucbhelper::ResultSetMetaData::getColumnName ( sal_Int32  column)
overridevirtual

Gets the name of column.

Parameters
columnis the number of the column for that a value shall be returned. The first column is 1, the second is 2, ...
Returns
the name of the property that corresponds to column.

Definition at line 186 of file resultsetmetadata.cxx.

References m_aProps.

◆ getColumnServiceName()

OUString SAL_CALL ucbhelper::ResultSetMetaData::getColumnServiceName ( sal_Int32  column)
overridevirtual

Returns the fully-qualified name of the service whose instances are manufactured if the method css::sdbc::ResultSet::getObject is called to retrieve a value from the column.

Parameters
columnis the number of the column for that a value shall be returned. The first column is 1, the second is 2, ...
Returns
the service name for column or an empty string, if no service is applicable.

Definition at line 385 of file resultsetmetadata.cxx.

◆ getColumnType()

sal_Int32 SAL_CALL ucbhelper::ResultSetMetaData::getColumnType ( sal_Int32  column)
overridevirtual

Gets the JDBC type for the value stored in column.

... The STRUCT and DISTINCT type codes are always returned for structured and distinct types, regardless of whether the value will be mapped according to the standard mapping or be a custom mapping.

Parameters
columnis the number of the column for that a value shall be returned. The first column is 1, the second is 2, ...
Returns
the type of the property that corresponds to column - mapped from UNO-Type to SQL-Type.

Definition at line 253 of file resultsetmetadata.cxx.

References Exception, m_aProps, m_pImpl, m_xContext, nType, and Property.

◆ getColumnTypeName()

OUString SAL_CALL ucbhelper::ResultSetMetaData::getColumnTypeName ( sal_Int32  column)
overridevirtual

Gets the type name used by this particular data source for the values stored in column.

If the type code for the type of value stored in column is STRUCT, DISTINCT or JAVA_OBJECT, this method returns a fully-qualified SQL type name.

Parameters
columnis the number of the column for that a value shall be returned. The first column is 1, the second is 2, ...
Returns
the column type name.

Definition at line 351 of file resultsetmetadata.cxx.

◆ getPrecision()

sal_Int32 SAL_CALL ucbhelper::ResultSetMetaData::getPrecision ( sal_Int32  column)
overridevirtual

For number types, getprecision gets the number of decimal digits in column.

For character types, it gets the maximum length in characters for column. For binary types, it gets the maximum length in bytes for column.

Parameters
columnis the number of the column for that a value shall be returned. The first column is 1, the second is 2, ...
Returns
the precision for the column.

Definition at line 213 of file resultsetmetadata.cxx.

◆ getScale()

sal_Int32 SAL_CALL ucbhelper::ResultSetMetaData::getScale ( sal_Int32  column)
overridevirtual

Gets the number of digits to the right of the decimal point for values in column.

Parameters
columnis the number of the column for that a value shall be returned. The first column is 1, the second is 2, ...
Returns
the scale of the column.

Definition at line 220 of file resultsetmetadata.cxx.

◆ getSchemaName()

OUString SAL_CALL ucbhelper::ResultSetMetaData::getSchemaName ( sal_Int32  column)
overridevirtual

Gets the schema name for the table from which column of this result set was derived.

Because this feature is not widely supported, the return value for many DBMSs will be an empty string.

Parameters
columnis the number of the column for that a value shall be returned. The first column is 1, the second is 2, ...
Returns
the schema name of column or an empty string.

Definition at line 200 of file resultsetmetadata.cxx.

◆ getTableName()

OUString SAL_CALL ucbhelper::ResultSetMetaData::getTableName ( sal_Int32  column)
overridevirtual

Gets the name of the table from which column of this result set was derived or "" if there is none (for example, for a join).

Because this feature is not widely supported, the return value for many DBMSs will be an empty string.

Parameters
columnis the number of the column for that a value shall be returned. The first column is 1, the second is 2, ...
Returns
the table name for column or an empty string.

Definition at line 227 of file resultsetmetadata.cxx.

◆ isAutoIncrement()

sal_Bool SAL_CALL ucbhelper::ResultSetMetaData::isAutoIncrement ( sal_Int32  column)
overridevirtual

Checks whether column is automatically numbered, which makes it read-only.

Parameters
columnis the number of the column for that a value shall be returned. The first column is 1, the second is 2, ...
Returns
true, if column is automatically numbered.

Definition at line 112 of file resultsetmetadata.cxx.

◆ isCaseSensitive()

sal_Bool SAL_CALL ucbhelper::ResultSetMetaData::isCaseSensitive ( sal_Int32  column)
overridevirtual

Checks whether column is case sensitive.

Parameters
columnis the number of the column for that a value shall be returned. The first column is 1, the second is 2, ...
Returns
true, if column is case sensitive.

Definition at line 123 of file resultsetmetadata.cxx.

References m_aProps, and m_pImpl.

◆ isCurrency()

sal_Bool SAL_CALL ucbhelper::ResultSetMetaData::isCurrency ( sal_Int32  column)
overridevirtual

Checks whether column is a cash value.

Parameters
columnis the number of the column for that a value shall be returned. The first column is 1, the second is 2, ...
Returns
true, if the column is a cash value.

Definition at line 140 of file resultsetmetadata.cxx.

◆ isDefinitelyWritable()

sal_Bool SAL_CALL ucbhelper::ResultSetMetaData::isDefinitelyWritable ( sal_Int32  column)
overridevirtual

Indicates whether a write on the column will definitely succeed.

Parameters
columnis the number of the column for that a value shall be returned. The first column is 1, the second is 2, ...
Returns
true, if a write on the column will definitely succeed.

Definition at line 378 of file resultsetmetadata.cxx.

◆ isNullable()

sal_Int32 SAL_CALL ucbhelper::ResultSetMetaData::isNullable ( sal_Int32  column)
overridevirtual

Checks whether a NULL can be stored in column.

See also
css::sdbc::ColumnValue
Parameters
columnis the number of the column for that a value shall be returned. The first column is 1, the second is 2, ...
Returns
css::sdbc::ColumnValue::NULLABLE, if a NULL can be stored in the column.

Definition at line 147 of file resultsetmetadata.cxx.

◆ isReadOnly()

sal_Bool SAL_CALL ucbhelper::ResultSetMetaData::isReadOnly ( sal_Int32  column)
overridevirtual

Indicates whether a column is definitely not writable.

Parameters
columnis the number of the column for that a value shall be returned. The first column is 1, the second is 2, ...
Returns
true, if the column is definitely not writable.

Definition at line 364 of file resultsetmetadata.cxx.

◆ isSearchable()

sal_Bool SAL_CALL ucbhelper::ResultSetMetaData::isSearchable ( sal_Int32  column)
overridevirtual

Checks whether the value stored in column can be used in a WHERE clause.

Parameters
columnis the number of the column for that a value shall be returned. The first column is 1, the second is 2, ...
Returns
true, if the column is searchable.

Definition at line 133 of file resultsetmetadata.cxx.

◆ isSigned()

sal_Bool SAL_CALL ucbhelper::ResultSetMetaData::isSigned ( sal_Int32  column)
overridevirtual

Checks whether the value stored in column is a signed number.

Parameters
columnis the number of the column for that a value shall be returned. The first column is 1, the second is 2, ...
Returns
true, if the value stored in column is a signed number.

Definition at line 154 of file resultsetmetadata.cxx.

◆ isWritable()

sal_Bool SAL_CALL ucbhelper::ResultSetMetaData::isWritable ( sal_Int32  column)
overridevirtual

Indicates whether it is possible for a write on the column to succeed.

Parameters
columnis the number of the column for that a value shall be returned. The first column is 1, the second is 2, ...
Returns
true, if it is possible for a write to succeed.

Definition at line 371 of file resultsetmetadata.cxx.

Member Data Documentation

◆ m_aProps

css::uno::Sequence< css::beans::Property > ucbhelper::ResultSetMetaData::m_aProps
private

Definition at line 77 of file resultsetmetadata.hxx.

◆ m_pImpl

std::unique_ptr<ucbhelper_impl::ResultSetMetaData_Impl> ucbhelper::ResultSetMetaData::m_pImpl
private

Definition at line 75 of file resultsetmetadata.hxx.

◆ m_xContext

css::uno::Reference< css::uno::XComponentContext > ucbhelper::ResultSetMetaData::m_xContext
private

Definition at line 76 of file resultsetmetadata.hxx.


The documentation for this class was generated from the following files: