1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef __com_sun_star_chart2_data_XDatabaseDataProvider_idl__
20 #define __com_sun_star_chart2_data_XDatabaseDataProvider_idl__
22 #include
<com
/sun
/star
/container
/NoSuchElementException.idl
>
23 #include
<com
/sun
/star
/beans
/XPropertySet.idl
>
24 #include
<com
/sun
/star
/beans
/UnknownPropertyException.idl
>
25 #include
<com
/sun
/star
/lang
/XInitialization.idl
>
26 #include
<com
/sun
/star
/lang
/XComponent.idl
>
27 #include
<com
/sun
/star
/sdbc
/XConnection.idl
>
28 #include
<com
/sun
/star
/sdbc
/XParameters.idl
>
29 #include
<com
/sun
/star
/sdbc
/XRowSet.idl
>
30 #include
<com
/sun
/star
/chart2
/data
/XDataProvider.idl
>
31 #include
<com
/sun
/star
/chart2
/data
/XRangeXMLConversion.idl
>
34 module com
{ module sun
{ module star
{ module chart2
{ module data
{
37 /** identifies a XDataProvider for result sets.
42 interface XDatabaseDataProvider
44 /** For accessing data a component provides for being used by
47 interface XDataProvider
;
49 /** allows you to convert the ranges a data provider deals with
50 internally into valid XML.
52 interface XRangeXMLConversion
;
54 /** allows access to the properties of the instance.
56 interface com
::sun
::star
::lang
::XInitialization
;
58 /** allows life-time control of the database data provider.
60 interface com
::sun
::star
::lang
::XComponent
;
62 /** allows access to the properties of the instance.
64 interface com
::sun
::star
::beans
::XPropertySet
;
66 interface com
::sun
::star
::sdbc
::XParameters
;
67 interface com
::sun
::star
::sdbc
::XRowSet
;
69 /** is used for subreports and contains the names of columns of the parent report.
70 <p> These columns are typically the foreign key fields of the parent report.
71 The values of theses columns are used to identify the data for the subreport.
72 Each time the parent report changes its current row, the subreport requeries
73 it's data based on the values of the master fields.</p>
74 <p>If the report is no sub report (e.g. its parent is not a report itself), this
75 property is not evaluated.</p>
78 [attribute
,bound
] sequence
<string> MasterFields
;
80 /**is used for subreports and contains the names of the columns of the subreport
81 which are related to the master fields of the parent report.
82 <p>Entries in this sequence can either denote column names in the sub report,
83 or parameter names.<br/>
84 For instance, you could base the report on the SQL statement
85 <code>SELECT * FROM invoices WHERE cust_ref = :cid</code>, and add <code>cid</code>
86 to the DetailFields property. In this case, the parameter will be filled from
87 the corresponding master field.<br/>
88 Alternatively, you could simply base your report on the table <code>invoices</code>,
89 and add the column name <code>cust_ref</code> to the DetailFields. In this case,
90 and implicit filter clause <code>WHERE cust_ref = :<new_param_name></code> will
91 be created, and the artificial parameter will be filled from the corresponding
93 If a string in this property denotes both a column name and a parameter name, it
94 is undefined which way it is interpreted, but implementations of the service are required
95 to either decide for the parameter or the column, and proceed as usual.
97 <p>The columns specified herein typically represent a part of the primary key
98 fields or their aliases of the detail report.</p>
99 <p>If the report is no sub report (e.g. its parent is not a report itself), this
100 property is not evaluated.</p>
103 [attribute
,bound
] sequence
<string> DetailFields
;
105 /** is the command which should be executed, the type of command depends
107 <p>In case of a #CommandType of CommandType::COMMAND,
108 means in case the #Command specifies an SQL statement, the inherited
109 com::sun::star::sdbc::RowSet::EscapeProcessing
110 becomes relevant:<br/>
111 It then can be to used to specify whether the SQL statement should be analyzed on the
112 client side before sending it to the database server.<br/>
113 The default value for com::sun::star::sdbc::RowSet::EscapeProcessing
114 is `TRUE`. By switching it to `FALSE`, you can pass backend-specific SQL statements,
115 which are not standard SQL, to your database.</p>
118 @see com::sun::star::sdb::CommandType
120 [attribute
,bound
] string Command
;
122 /** specifies the type of the command to be executed to retrieve a result set.
124 <p>#Command needs to be interpreted depending on the value of this property.</p>
126 <p>This property is only meaningful together with the #Command
127 property, thus either <em>both</em> or <em>none</em> of them are present.</p>
129 @see com::sun::star::sdb::CommandType
131 [attribute
,bound
] long CommandType
;
133 /** specifies an additional filter to optionally use.
135 <p>The Filter string has to form a SQL WHERE-clause, <em>without</em> the WHERE-string itself.</p>
137 <p>If a #DataSourceName, #Command and #CommandType
138 are specified, a RowSet can be created with this information. If the results provided by the
139 row set are to be additionally filtered, the Filter property can be used.</p>
141 <p>Note that the Filter property does not make sense if a resultSet has been specified
142 in the DataAccessDescriptor.</p>
144 @see com::sun::star::sdb::RowSet
147 [attribute
,bound
] string Filter
;
149 /** indicates whether the filter should be applied or not,
152 [attribute
,bound
] boolean ApplyFilter
;
154 /** additional having clause for the row set
156 [attribute
,bound
] string HavingClause
158 set raises
(com
::sun
::star
::beans
::UnknownPropertyException
);
161 /** additional group by for the row set
163 [attribute
,bound
] string GroupBy
165 set raises
(com
::sun
::star
::beans
::UnknownPropertyException
);
168 /** is a additional sort order definition for a row set.
170 [attribute
,bound
] string Order
;
172 /** specifies if the #Command should be analyzed on the client side before sending it
173 to the database server.
175 <p>The default value of this property is `TRUE`. By switching it to `FALSE`, you can pass
176 backend-specific SQL statements, which are not standard SQL, to your database.</p>
178 <p>This property is usually present together with the #Command and
179 #CommandType properties, and is evaluated if and only if #CommandType
180 equals CommandType::COMMAND.</p>
182 [attribute
,bound
] boolean EscapeProcessing
;
184 /** specifies the maximal count of rows which should be fetched.
185 <p>A value of zero implies that no limit exists.</p>
187 [attribute
,bound
] long RowLimit
;
189 /** specifies the active connection which is used to create the resulting report.
191 [attribute
,bound
] com
::sun
::star
::sdbc
::XConnection ActiveConnection
193 set raises
(com
::sun
::star
::lang
::IllegalArgumentException
);
195 /** is the name of the data source to use, this could be a named data source
196 or the URL of a data access component.
198 [attribute
,bound
] string DataSourceName
;
206 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */