merged tag ooo/OOO330_m14
[LibreOffice.git] / offapi / com / sun / star / chart2 / data / XDatabaseDataProvider.idl
blob260f97c7aa38b1085a9e0144daf90867552aa182
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
27 #ifndef __com_sun_star_report_XDatabaseDataProvider_idl__
28 #define __com_sun_star_report_XDatabaseDataProvider_idl__
30 #ifndef __com_sun_star_container_NoSuchElementException_idl__
31 #include <com/sun/star/container/NoSuchElementException.idl>
32 #endif
33 #include <com/sun/star/beans/XPropertySet.idl>
34 #include <com/sun/star/beans/UnknownPropertyException.idl>
35 #include <com/sun/star/lang/XInitialization.idl>
36 #include <com/sun/star/lang/XComponent.idl>
37 #include <com/sun/star/sdbc/XConnection.idl>
38 #include <com/sun/star/sdbc/XParameters.idl>
39 #include <com/sun/star/sdbc/XRowSet.idl>
40 #include <com/sun/star/chart2/data/XDataProvider.idl>
41 #include <com/sun/star/chart2/data/XRangeXMLConversion.idl>
43 //=============================================================================
45 module com { module sun { module star { module chart2 { module data {
47 //=============================================================================
49 /** identifies a <type>XDataProvider</type> for result sets.
51 @see XDataProvider
52 @see DataProvider
54 interface XDatabaseDataProvider
56 /** For accessing data a component provides for being used by
57 charts.
59 interface XDataProvider;
61 /** allows you to convert the ranges a data provider deals with
62 internally into valid XML.
64 interface XRangeXMLConversion;
66 /** allows access to the properties of the instance.
68 interface com::sun::star::lang::XInitialization;
70 /** allows life-time control of the database data provider.
72 interface com::sun::star::lang::XComponent;
74 /** allows access to the properties of the instance.
76 interface com::sun::star::beans::XPropertySet;
78 interface com::sun::star::sdbc::XParameters;
79 interface com::sun::star::sdbc::XRowSet;
81 /** is used for subreports and contains the names of columns of the parent report.
82 <p> These columns are typically the foreign key fields of the parent report.
83 The values of theses columns are used to identify the data for the subreport.
84 Each time the parent report changes it's current row, the subreport requeries
85 it's data based on the values of the master fields.</p>
86 <p>If the report is no sub report (e.g. it's parent is not a report itself), this
87 property is not evaluated.</p>
90 [attribute,bound] sequence<string> MasterFields;
92 /**is used for subreports and contains the names of the columns of the subreport
93 which are related to the master fields of the parent report.
94 <p>Entries in this sequence can either denote column names in the sub report,
95 or paramater names.<br/>
96 For instance, you could base the report on the SQL statement
97 <code>SELECT * FROM invoices WHERE cust_ref = :cid</code>, and add <code>cid</code>
98 to the DetailFields property. In this case, the parameter will be filled from
99 the corresponding master field.<br/>
100 Alternatively, you could simply base your report on the table <code>invoices</code>,
101 and add the column name <code>cust_ref</code> to the DetailFields. In this case,
102 and implicit filter clause <code>WHERE cust_ref = :&lt;new_param_name&gt;</code> will
103 be created, and the artificial parameter will be filled from the corresponding
104 master field.<br/>
105 If a string in this property denotes both a column name and a parameter name, it
106 is undefined which way it is interpreted, but implementations of the service are required
107 to either decide for the paramter or the column, and proceed as usual.
108 </p>
109 <p>The columns specified herein typically represent a part of the primary key
110 fields or their aliases of the detail report.</p>
111 <p>If the report is no sub report (e.g. it's parent is not a report itself), this
112 property is not evaluated.</p>
115 [attribute,bound] sequence<string> DetailFields;
117 /** is the command which should be executed, the type of command depends
118 on the CommandType.
119 <p>In case of a <member>CommandType</member> of <member>CommandType::COMMAND</member>,
120 means in case the <member>Command</member> specifies an SQL statement, the inherited
121 <member scope="com::sun::star::sdbc">RowSet::EscapeProcessing</member>
122 becomes relevant:<br/>
123 It then can be to used to specify whether the SQL statement should be analyzed on the
124 client side before sending it to the database server.<br/>
125 The default value for <member scope="com::sun::star::sdbc">RowSet::EscapeProcessing</member>
126 is <TRUE/>. By switching it to <FALSE/>, you can pass backend-specific SQL statements,
127 which are not standard SQL, to your database.</p>
130 @see com::sun::star::sdb::CommandType
132 [attribute,bound] string Command;
134 /** specifies the type of the command to be executed to retrieve a result set.
136 <p><member>Command</member> needs to be interpreted depending on the value of this property.</p>
138 <p>This property is only meaningfull together with the <member>Command</member>
139 property, thus either <em>both</em> or <em>none</em> of them are present.</p>
141 @see com::sun::star::sdb::CommandType
143 [attribute,bound] long CommandType;
145 /** specifies an addtional filter to optinally use.
147 <p>The Filter string has to form a SQL WHERE-clause, <em>without</em> the WHERE-string itself.</p>
149 <p>If a <member>DataSourceName</member>, <member>Command</member> and <member>CommandType</member>
150 are specified, a <type>RowSet</type> can be created with this information. If the results provided by the
151 row set are to be additionally filtered, the Filter property can be used.</p>
153 <p>Note that the Filter property does not make sense if a <member>ResultSet</member> has been specified
154 in the DataAccessDescriptor.</p>
156 @see com::sun::star::sdb::RowSet
157 @see ResultSet
159 [attribute,bound] string Filter;
161 /** indicates whether the filter should be applied or not,
162 default is <FALSE/>.
164 [attribute,bound] boolean ApplyFilter;
166 /** additional having clause for the row set
168 [attribute,bound] string HavingClause
170 set raises (com::sun::star::beans::UnknownPropertyException);
173 /** additional group by for the row set
175 [attribute,bound] string GroupBy
177 set raises (com::sun::star::beans::UnknownPropertyException);
180 /** is a additional sort order definition for a rowset.
182 [attribute,bound] string Order;
184 /** specifies if the <member>Command</member> should be analyzed on the client side before sending it
185 to the database server.
187 <p>The default value of this property is <TRUE/>. By switching it to <FALSE/>, you can pass
188 backend-specific SQL statements, which are not standard SQL, to your database.</p>
190 <p>This property is usually present together with the <member>Command</member> and
191 <member>CommandType</member> properties, and is evaluated if and only if <member>CommandType</member>
192 equals <member>CommandType::COMMAND</member>.</p>
194 [attribute,bound] boolean EscapeProcessing;
196 /** specifies the maximal count of rows which should be fetched.
197 <p>A value of zero implies that no limit exists.</p>
199 [attribute,bound] long RowLimit;
201 /** specifies the active connection which is used to create the resulting report.
203 [attribute,bound] com::sun::star::sdbc::XConnection ActiveConnection
205 set raises (com::sun::star::lang::IllegalArgumentException);
207 /** is the name of the datasource to use, this could be a named datasource
208 or the URL of a data access component.
210 [attribute,bound] string DataSourceName;
213 service DatabaseDataProvider : XDatabaseDataProvider
215 createWithConnection([in] com::sun::star::sdbc::XConnection connection);
217 //=============================================================================
219 }; }; }; }; };
221 /*=============================================================================
223 =============================================================================*/
224 #endif