LibreOffice: XDatabaseDataProvider Interface Reference

LibreOffice LibreOffice 25.8 SDK API Reference

Loading...
Searching...
No Matches
XDatabaseDataProvider Interface Reference

identifies a XDataProvider for result sets. More...

`import "XDatabaseDataProvider.idl";`

Inheritance diagram for XDatabaseDataProvider:

## Public Types
typedef sequence< string > | MasterFields
| is used for subreports and contains the names of columns of the parent report.
typedef sequence< string > | DetailFields
| is used for subreports and contains the names of the columns of the subreport which are related to the master fields of the parent report.

## Exported Interfaces
interface | XDataProvider
| For accessing data a component provides for being used by charts.
interface | XRangeXMLConversion
| allows you to convert the ranges a data provider deals with internally into valid XML.
interface | com::sun::star::lang::XInitialization
| allows access to the properties of the instance.
interface | com::sun::star::lang::XComponent
| allows life-time control of the database data provider.
interface | com::sun::star::beans::XPropertySet
| allows access to the properties of the instance.
interface | com::sun::star::sdbc::XParameters
interface | com::sun::star::sdbc::XRowSet

## Public Attributes
string | Command
| is the command which should be executed, the type of command depends on the CommandType.
long | CommandType
| specifies the type of the command to be executed to retrieve a result set.
string | Filter
| specifies an additional filter to optionally use.
boolean | ApplyFilter
| indicates whether the filter should be applied or not, default is FALSE.
string | HavingClause
| additional having clause for the row set
string | GroupBy
| additional group by for the row set
string | Order
| is an additional sort order definition for a row set.
boolean | EscapeProcessing
| specifies if the Command should be analyzed on the client side before sending it to the database server.
long | RowLimit
| specifies the maximal count of rows which should be fetched.
com::sun::star::sdbc::XConnection | ActiveConnection
| specifies the active connection which is used to create the resulting report.
string | DataSourceName
| is the name of the data source to use, this could be a named data source or the URL of a data access component.

## Additional Inherited Members
Public Member Functions inherited from XDataProvider
boolean | createDataSourcePossible ([in] sequence< com::sun::star::beans::PropertyValue > aArguments)
| If TRUE is returned, a call to createDataSource with the same arguments must return a valid XDataSequence object.
XDataSource | createDataSource ([in] sequence< com::sun::star::beans::PropertyValue > aArguments) raises ( com::sun::star::lang::IllegalArgumentException )
| Creates a data source object that matches the given range representation string.
sequence< com::sun::star::beans::PropertyValue > | detectArguments ([in] XDataSource xDataSource)
| Tries to find out with what parameters the passed DataSource most probably was created.
boolean | createDataSequenceByRangeRepresentationPossible ([in] string aRangeRepresentation)
| If TRUE is returned, a call to createDataSequenceByRangeRepresentation with the same argument must return a valid XDataSequence object.
XDataSequence | createDataSequenceByRangeRepresentation ([in] string aRangeRepresentation) raises ( com::sun::star::lang::IllegalArgumentException )
| creates a single data sequence for the given data range.
XDataSequence | createDataSequenceByValueArray ([in] string aRole, [in] string aValueArray, [in] string aRoleQualifier) raises ( com::sun::star::lang::IllegalArgumentException )
| Creates a single data sequence from the string value array representation.
com::sun::star::sheet::XRangeSelection | getRangeSelection ()
| Returns a component that is able to change a given range representation to another one.
Public Member Functions inherited from XInterface
any | queryInterface ([in] type aType)
| queries for a new interface to an existing UNO object.
void | acquire ()
| increases the reference counter by one.
void | release ()
| decreases the reference counter by one.
Public Member Functions inherited from XRangeXMLConversion
string | convertRangeToXML ([in] string aRangeRepresentation) raises ( com::sun::star::lang::IllegalArgumentException )
| converts the range to a valid XML syntax.
string | convertRangeFromXML ([in] string aXMLRange) raises ( com::sun::star::lang::IllegalArgumentException )
| converts an XML-style range into the internal DataProvider's format.
Public Member Functions inherited from XInitialization
void | initialize ([in] sequence< any > aArguments) raises ( com::sun::star::uno::Exception )
| initializes the object.
Public Member Functions inherited from XComponent
void | dispose ()
| The owner of an object calls this method to explicitly free all resources kept by this object and thus break cyclic references.
void | addEventListener ([in] XEventListener xListener)
| adds an event listener to the object.
void | removeEventListener ([in] XEventListener aListener)
| removes an event listener from the listener list.
Public Member Functions inherited from XPropertySet
com::sun::star::beans::XPropertySetInfo | getPropertySetInfo ()
void | setPropertyValue ([in] string aPropertyName, [in] any aValue) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::beans::PropertyVetoException, com::sun::star::lang::IllegalArgumentException, com::sun::star::lang::WrappedTargetException )
| sets the value of the property with the specified name.
any | getPropertyValue ([in] string PropertyName) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException )
void | addPropertyChangeListener ([in] string aPropertyName, [in] com::sun::star::beans::XPropertyChangeListener xListener) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException )
| adds an XPropertyChangeListener to the specified property.
void | removePropertyChangeListener ([in] string aPropertyName, [in] com::sun::star::beans::XPropertyChangeListener aListener) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException )
| removes an XPropertyChangeListener from the listener list.
void | addVetoableChangeListener ([in] string PropertyName, [in] com::sun::star::beans::XVetoableChangeListener aListener) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException )
| adds an XVetoableChangeListener to the specified property with the name PropertyName.
void | removeVetoableChangeListener ([in] string PropertyName, [in] com::sun::star::beans::XVetoableChangeListener aListener) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException )
| removes an XVetoableChangeListener from the listener list.
Public Member Functions inherited from XParameters
void | setNull ([in]long parameterIndex, [in]long sqlType) raises (SQLException)
| sets the designated parameter to SQL NULL.
void | setObjectNull ([in]long parameterIndex, [in]long sqlType, [in]string typeName) raises (SQLException)
| sets the designated parameter to SQL NULL.
void | setBoolean ([in]long parameterIndex, [in]boolean x) raises (SQLException)
| sets the designated parameter to a boolean value.
void | setByte ([in]long parameterIndex, [in]byte x) raises (SQLException)
| sets the designated parameter to a byte value.
void | setShort ([in]long parameterIndex, [in]short x) raises (SQLException)
| sets the designated parameter to a short value.
void | setInt ([in]long parameterIndex, [in]long x) raises (SQLException)
| sets the designated parameter to a long value.
void | setLong ([in]long parameterIndex, [in]hyper x) raises (SQLException)
| sets the designated parameter to a hyper value.
void | setFloat ([in]long parameterIndex, [in]float x) raises (SQLException)
| sets the designated parameter to a float value.
void | setDouble ([in]long parameterIndex, [in]double x) raises (SQLException)
| sets the designated parameter to a double value.
void | setString ([in]long parameterIndex, [in]string x) raises (SQLException)
| sets the designated parameter to a string value.
void | setBytes ([in]long parameterIndex, [in]sequence< byte > x) raises (SQLException)
| sets the designated parameter to a sequence of bytes.
void | setDate ([in]long parameterIndex, [in]com::sun::star::util::Date x) raises (SQLException)
| sets the designated parameter to a date value.
void | setTime ([in]long parameterIndex, [in]com::sun::star::util::Time x) raises (SQLException)
| sets the designated parameter to a time value.
void | setTimestamp ([in]long parameterIndex, [in]com::sun::star::util::DateTime x) raises (SQLException)
| sets the designated parameter to a datetime value.
void | setBinaryStream ([in]long parameterIndex, [in]com::sun::star::io::XInputStream x, [in]long length) raises (SQLException)
| sets the designated parameter to the given input stream, which will have the specified number of bytes.
void | setCharacterStream ([in]long parameterIndex, [in]com::sun::star::io::XInputStream x, [in]long length) raises (SQLException)
| sets the designated parameter to the given input stream, which will have the specified number of bytes.
void | setObject ([in]long parameterIndex, [in]any x) raises (SQLException)
| sets the value of a parameter using an any.
void | setObjectWithInfo ([in]long parameterIndex, [in]any x, [in]long targetSqlType, [in]long scale) raises (SQLException)
| set a value from the Datatype ANY for a parameter.
void | setRef ([in]long parameterIndex, [in]XRef x) raises (SQLException)
| sets a REF(&lt;structured-type&gt;) parameter.
void | setBlob ([in]long parameterIndex, [in]XBlob x) raises (SQLException)
| sets a BLOB parameter.
void | setClob ([in]long parameterIndex, [in]XClob x) raises (SQLException)
| sets a CLOB parameter.
void | setArray ([in]long parameterIndex, [in]XArray x) raises (SQLException)
| sets an Array parameter.
void | clearParameters () raises (SQLException)
| clears the current parameter values immediately.
Public Member Functions inherited from XRowSet
void | execute () raises (SQLException)
| populates a row set with data.
void | addRowSetListener ([in]XRowSetListener listener)
| adds the specified listener to receive the events "cursorMoved", "rowChanged", and "rowSetChanged".
void | removeRowSetListener ([in]XRowSetListener listener)
| removes the specified listener.
Public Member Functions inherited from XResultSet
boolean | next () raises (SQLException)
| moves the cursor down one row from its current position.
boolean | isBeforeFirst () raises (SQLException)
| indicates whether the cursor is before the first row in the result set.
boolean | isAfterLast () raises (SQLException)
| indicates whether the cursor is after the last row in the result set.
boolean | isFirst () raises (SQLException)
| indicates whether the cursor is on the first row of the result set.
boolean | isLast () raises (SQLException)
| indicates whether the cursor is on the last row of the result set.
void | beforeFirst () raises (SQLException)
| moves the cursor to the front of the result set, just before the first row.
void | afterLast () raises (SQLException)
| moves the cursor to the end of the result set, just after the last row.
boolean | first () raises (SQLException)
| moves the cursor to the first row in the result set.
boolean | last () raises (SQLException)
| moves the cursor to the last row in the result set.
long | getRow () raises (SQLException)
| retrieves the current row number.
boolean | absolute ([in] long row) raises (SQLException)
| moves the cursor to the given row number in the result set.
boolean | relative ([in]long rows) raises (SQLException)
| moves the cursor a relative number of rows, either positive or negative.
boolean | previous () raises (SQLException)
| moves the cursor to the previous row in the result set.
void | refreshRow () raises (SQLException)
| refreshes the current row with its most recent value in the database.
boolean | rowUpdated () raises (SQLException)
| indicates whether the current row has been updated.
boolean | rowInserted () raises (SQLException)
| indicates whether the current row has had an insertion.
boolean | rowDeleted () raises (SQLException)
| indicates whether a row has been deleted.
com::sun::star::uno::XInterface | getStatement () raises (SQLException)
| returns the Statement that produced this com::sun::star::sdbc::ResultSet object.

## Detailed Description

identifies a XDataProvider for result sets.

See also
  XDataProvider
  DataProvider

## Member Typedef Documentation

## ◆ DetailFields

sequence<string> DetailFields
| attributebound

is used for subreports and contains the names of the columns of the subreport which are related to the master fields of the parent report.

Entries in this sequence can either denote column names in the sub report, or parameter names.
For instance, you could base the report on the SQL statement `SELECT * FROM invoices WHERE cust_ref = :cid`, and add `cid` to the DetailFields property. In this case, the parameter will be filled from the corresponding master field.
Alternatively, you could simply base your report on the table `invoices`, and add the column name `cust_ref` to the DetailFields. In this case, and implicit filter clause `WHERE cust_ref = :<new_param_name>` will be created, and the artificial parameter will be filled from the corresponding master field.
If a string in this property denotes both a column name and a parameter name, it is undefined which way it is interpreted, but implementations of the service are required to either decide for the parameter or the column, and proceed as usual.

The columns specified herein typically represent a part of the primary key fields or their aliases of the detail report.

If the report is no sub report (e.g. its parent is not a report itself), this property is not evaluated.

## ◆ MasterFields

sequence<string> MasterFields
| attributebound

is used for subreports and contains the names of columns of the parent report.

These columns are typically the foreign key fields of the parent report. The values of these columns are used to identify the data for the subreport. Each time the parent report changes its current row, the subreport requeries it's data based on the values of the master fields.

If the report is no sub report (e.g. its parent is not a report itself), this property is not evaluated.

## Exported Interfaces

## ◆ com::sun::star::beans::XPropertySet

interface com::sun::star::beans::XPropertySet

allows access to the properties of the instance.

## ◆ com::sun::star::lang::XComponent

interface com::sun::star::lang::XComponent

allows life-time control of the database data provider.

## ◆ com::sun::star::lang::XInitialization

interface com::sun::star::lang::XInitialization

allows access to the properties of the instance.

## ◆ com::sun::star::sdbc::XParameters

interface com::sun::star::sdbc::XParameters

## ◆ com::sun::star::sdbc::XRowSet

interface com::sun::star::sdbc::XRowSet

## ◆ XDataProvider

interface XDataProvider

For accessing data a component provides for being used by charts.

## ◆ XRangeXMLConversion

interface XRangeXMLConversion

allows you to convert the ranges a data provider deals with internally into valid XML.

## Member Data Documentation

## ◆ ActiveConnection

com::sun::star::sdbc::XConnection ActiveConnection
set raises | ( | com::sun::star::lang::IllegalArgumentException ) |  |  |
| attributebound

specifies the active connection which is used to create the resulting report.

## ◆ ApplyFilter

boolean ApplyFilter
| attributebound

indicates whether the filter should be applied or not, default is FALSE.

## ◆ Command

string Command
| attributebound

is the command which should be executed, the type of command depends on the CommandType.

In case of a CommandType of CommandType::COMMAND, means in case the Command specifies an SQL statement, the inherited com::sun::star::sdbc::RowSet::EscapeProcessing becomes relevant:
It then can be to used to specify whether the SQL statement should be analyzed on the client side before sending it to the database server.
The default value for com::sun::star::sdbc::RowSet::EscapeProcessing is TRUE. By switching it to FALSE, you can pass backend-specific SQL statements, which are not standard SQL, to your database.

See also
  com::sun::star::sdb::CommandType

## ◆ CommandType

long CommandType
| attributebound

specifies the type of the command to be executed to retrieve a result set.

Command needs to be interpreted depending on the value of this property.

This property is only meaningful together with the Command property, thus either both or none of them are present.

See also
  com::sun::star::sdb::CommandType

## ◆ DataSourceName

string DataSourceName
| attributebound

is the name of the data source to use, this could be a named data source or the URL of a data access component.

## ◆ EscapeProcessing

boolean EscapeProcessing
| attributebound

specifies if the Command should be analyzed on the client side before sending it to the database server.

The default value of this property is TRUE. By switching it to FALSE, you can pass backend-specific SQL statements, which are not standard SQL, to your database.

This property is usually present together with the Command and CommandType properties, and is evaluated if and only if CommandType equals CommandType::COMMAND.

## ◆ Filter

string Filter
| attributebound

specifies an additional filter to optionally use.

The Filter string has to form a SQL WHERE-clause, without the WHERE-string itself.

If a DataSourceName, Command and CommandType are specified, a RowSet can be created with this information. If the results provided by the row set are to be additionally filtered, the Filter property can be used.

Note that the Filter property does not make sense if a resultSet has been specified in the DataAccessDescriptor.

See also
  com::sun::star::sdb::RowSet
  ResultSet

## ◆ GroupBy

string GroupBy
set raises | ( | com::sun::star::beans::UnknownPropertyException ) |  |  |
| attributebound

additional group by for the row set

## ◆ HavingClause

string HavingClause
set raises | ( | com::sun::star::beans::UnknownPropertyException ) |  |  |
| attributebound

additional having clause for the row set

## ◆ Order

string Order
| attributebound

is an additional sort order definition for a row set.

## ◆ RowLimit

long RowLimit
| attributebound

specifies the maximal count of rows which should be fetched.

A value of zero implies that no limit exists.

The documentation for this interface was generated from the following file:

- com/sun/star/chart2/data/XDatabaseDataProvider.idl