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 .
21 module com
{ module sun
{ module star
{ module chart2
{ module data
{
24 /** identifies a XDataProvider for result sets.
29 interface XDatabaseDataProvider
31 /** For accessing data a component provides for being used by
34 interface XDataProvider
;
36 /** allows you to convert the ranges a data provider deals with
37 internally into valid XML.
39 interface XRangeXMLConversion
;
41 /** allows access to the properties of the instance.
43 interface com
::sun
::star
::lang
::XInitialization
;
45 /** allows life-time control of the database data provider.
47 interface com
::sun
::star
::lang
::XComponent
;
49 /** allows access to the properties of the instance.
51 interface com
::sun
::star
::beans
::XPropertySet
;
53 interface com
::sun
::star
::sdbc
::XParameters
;
54 interface com
::sun
::star
::sdbc
::XRowSet
;
56 /** is used for subreports and contains the names of columns of the parent report.
57 <p> These columns are typically the foreign key fields of the parent report.
58 The values of these columns are used to identify the data for the subreport.
59 Each time the parent report changes its current row, the subreport requeries
60 it's data based on the values of the master fields.</p>
61 <p>If the report is no sub report (e.g. its parent is not a report itself), this
62 property is not evaluated.</p>
65 [attribute
,bound
] sequence
<string> MasterFields
;
67 /**is used for subreports and contains the names of the columns of the subreport
68 which are related to the master fields of the parent report.
69 <p>Entries in this sequence can either denote column names in the sub report,
70 or parameter names.<br/>
71 For instance, you could base the report on the SQL statement
72 <code>SELECT * FROM invoices WHERE cust_ref = :cid</code>, and add <code>cid</code>
73 to the DetailFields property. In this case, the parameter will be filled from
74 the corresponding master field.<br/>
75 Alternatively, you could simply base your report on the table <code>invoices</code>,
76 and add the column name <code>cust_ref</code> to the DetailFields. In this case,
77 and implicit filter clause <code>WHERE cust_ref = :<new_param_name></code> will
78 be created, and the artificial parameter will be filled from the corresponding
80 If a string in this property denotes both a column name and a parameter name, it
81 is undefined which way it is interpreted, but implementations of the service are required
82 to either decide for the parameter or the column, and proceed as usual.
84 <p>The columns specified herein typically represent a part of the primary key
85 fields or their aliases of the detail report.</p>
86 <p>If the report is no sub report (e.g. its parent is not a report itself), this
87 property is not evaluated.</p>
90 [attribute
,bound
] sequence
<string> DetailFields
;
92 /** is the command which should be executed, the type of command depends
94 <p>In case of a #CommandType of CommandType::COMMAND,
95 means in case the #Command specifies an SQL statement, the inherited
96 com::sun::star::sdbc::RowSet::EscapeProcessing
97 becomes relevant:<br/>
98 It then can be to used to specify whether the SQL statement should be analyzed on the
99 client side before sending it to the database server.<br/>
100 The default value for com::sun::star::sdbc::RowSet::EscapeProcessing
101 is `TRUE`. By switching it to `FALSE`, you can pass backend-specific SQL statements,
102 which are not standard SQL, to your database.</p>
105 @see com::sun::star::sdb::CommandType
107 [attribute
,bound
] string Command
;
109 /** specifies the type of the command to be executed to retrieve a result set.
111 <p>#Command needs to be interpreted depending on the value of this property.</p>
113 <p>This property is only meaningful together with the #Command
114 property, thus either <em>both</em> or <em>none</em> of them are present.</p>
116 @see com::sun::star::sdb::CommandType
118 [attribute
,bound
] long CommandType
;
120 /** specifies an additional filter to optionally use.
122 <p>The Filter string has to form a SQL WHERE-clause, <em>without</em> the WHERE-string itself.</p>
124 <p>If a #DataSourceName, #Command and #CommandType
125 are specified, a RowSet can be created with this information. If the results provided by the
126 row set are to be additionally filtered, the Filter property can be used.</p>
128 <p>Note that the Filter property does not make sense if a resultSet has been specified
129 in the DataAccessDescriptor.</p>
131 @see com::sun::star::sdb::RowSet
134 [attribute
,bound
] string Filter
;
136 /** indicates whether the filter should be applied or not,
139 [attribute
,bound
] boolean ApplyFilter
;
141 /** additional having clause for the row set
143 [attribute
,bound
] string HavingClause
145 set raises
(com
::sun
::star
::beans
::UnknownPropertyException
);
148 /** additional group by for the row set
150 [attribute
,bound
] string GroupBy
152 set raises
(com
::sun
::star
::beans
::UnknownPropertyException
);
155 /** is an additional sort order definition for a row set.
157 [attribute
,bound
] string Order
;
159 /** specifies if the #Command should be analyzed on the client side before sending it
160 to the database server.
162 <p>The default value of this property is `TRUE`. By switching it to `FALSE`, you can pass
163 backend-specific SQL statements, which are not standard SQL, to your database.</p>
165 <p>This property is usually present together with the #Command and
166 #CommandType properties, and is evaluated if and only if #CommandType
167 equals CommandType::COMMAND.</p>
169 [attribute
,bound
] boolean EscapeProcessing
;
171 /** specifies the maximal count of rows which should be fetched.
172 <p>A value of zero implies that no limit exists.</p>
174 [attribute
,bound
] long RowLimit
;
176 /** specifies the active connection which is used to create the resulting report.
178 [attribute
,bound
] com
::sun
::star
::sdbc
::XConnection ActiveConnection
180 set raises
(com
::sun
::star
::lang
::IllegalArgumentException
);
182 /** is the name of the data source to use, this could be a named data source
183 or the URL of a data access component.
185 [attribute
,bound
] string DataSourceName
;
191 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */