Bump for 3.6-28
[LibreOffice.git] / offapi / com / sun / star / chart2 / data / XDatabaseDataProvider.idl
blob8fe8c63da8e4f260ee0cf00744faa1b0a7fdc49e
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
28 #ifndef __com_sun_star_report_XDatabaseDataProvider_idl__
29 #define __com_sun_star_report_XDatabaseDataProvider_idl__
31 #include <com/sun/star/container/NoSuchElementException.idl>
32 #include <com/sun/star/beans/XPropertySet.idl>
33 #include <com/sun/star/beans/UnknownPropertyException.idl>
34 #include <com/sun/star/lang/XInitialization.idl>
35 #include <com/sun/star/lang/XComponent.idl>
36 #include <com/sun/star/sdbc/XConnection.idl>
37 #include <com/sun/star/sdbc/XParameters.idl>
38 #include <com/sun/star/sdbc/XRowSet.idl>
39 #include <com/sun/star/chart2/data/XDataProvider.idl>
40 #include <com/sun/star/chart2/data/XRangeXMLConversion.idl>
42 //=============================================================================
44 module com { module sun { module star { module chart2 { module data {
46 //=============================================================================
48 /** identifies a <type>XDataProvider</type> for result sets.
50 @see XDataProvider
51 @see DataProvider
53 interface XDatabaseDataProvider
55 /** For accessing data a component provides for being used by
56 charts.
58 interface XDataProvider;
60 /** allows you to convert the ranges a data provider deals with
61 internally into valid XML.
63 interface XRangeXMLConversion;
65 /** allows access to the properties of the instance.
67 interface com::sun::star::lang::XInitialization;
69 /** allows life-time control of the database data provider.
71 interface com::sun::star::lang::XComponent;
73 /** allows access to the properties of the instance.
75 interface com::sun::star::beans::XPropertySet;
77 interface com::sun::star::sdbc::XParameters;
78 interface com::sun::star::sdbc::XRowSet;
80 /** is used for subreports and contains the names of columns of the parent report.
81 <p> These columns are typically the foreign key fields of the parent report.
82 The values of theses columns are used to identify the data for the subreport.
83 Each time the parent report changes it's current row, the subreport requeries
84 it's data based on the values of the master fields.</p>
85 <p>If the report is no sub report (e.g. it's parent is not a report itself), this
86 property is not evaluated.</p>
89 [attribute,bound] sequence<string> MasterFields;
91 /**is used for subreports and contains the names of the columns of the subreport
92 which are related to the master fields of the parent report.
93 <p>Entries in this sequence can either denote column names in the sub report,
94 or parameter names.<br/>
95 For instance, you could base the report on the SQL statement
96 <code>SELECT * FROM invoices WHERE cust_ref = :cid</code>, and add <code>cid</code>
97 to the DetailFields property. In this case, the parameter will be filled from
98 the corresponding master field.<br/>
99 Alternatively, you could simply base your report on the table <code>invoices</code>,
100 and add the column name <code>cust_ref</code> to the DetailFields. In this case,
101 and implicit filter clause <code>WHERE cust_ref = :&lt;new_param_name&gt;</code> will
102 be created, and the artificial parameter will be filled from the corresponding
103 master field.<br/>
104 If a string in this property denotes both a column name and a parameter name, it
105 is undefined which way it is interpreted, but implementations of the service are required
106 to either decide for the parameter or the column, and proceed as usual.
107 </p>
108 <p>The columns specified herein typically represent a part of the primary key
109 fields or their aliases of the detail report.</p>
110 <p>If the report is no sub report (e.g. it's parent is not a report itself), this
111 property is not evaluated.</p>
114 [attribute,bound] sequence<string> DetailFields;
116 /** is the command which should be executed, the type of command depends
117 on the CommandType.
118 <p>In case of a <member>CommandType</member> of <member>CommandType::COMMAND</member>,
119 means in case the <member>Command</member> specifies an SQL statement, the inherited
120 <member scope="com::sun::star::sdbc">RowSet::EscapeProcessing</member>
121 becomes relevant:<br/>
122 It then can be to used to specify whether the SQL statement should be analyzed on the
123 client side before sending it to the database server.<br/>
124 The default value for <member scope="com::sun::star::sdbc">RowSet::EscapeProcessing</member>
125 is <TRUE/>. By switching it to <FALSE/>, you can pass backend-specific SQL statements,
126 which are not standard SQL, to your database.</p>
129 @see com::sun::star::sdb::CommandType
131 [attribute,bound] string Command;
133 /** specifies the type of the command to be executed to retrieve a result set.
135 <p><member>Command</member> needs to be interpreted depending on the value of this property.</p>
137 <p>This property is only meaningful together with the <member>Command</member>
138 property, thus either <em>both</em> or <em>none</em> of them are present.</p>
140 @see com::sun::star::sdb::CommandType
142 [attribute,bound] long CommandType;
144 /** specifies an additional filter to optionally use.
146 <p>The Filter string has to form a SQL WHERE-clause, <em>without</em> the WHERE-string itself.</p>
148 <p>If a <member>DataSourceName</member>, <member>Command</member> and <member>CommandType</member>
149 are specified, a <type>RowSet</type> can be created with this information. If the results provided by the
150 row set are to be additionally filtered, the Filter property can be used.</p>
152 <p>Note that the Filter property does not make sense if a <member>ResultSet</member> has been specified
153 in the DataAccessDescriptor.</p>
155 @see com::sun::star::sdb::RowSet
156 @see ResultSet
158 [attribute,bound] string Filter;
160 /** indicates whether the filter should be applied or not,
161 default is <FALSE/>.
163 [attribute,bound] boolean ApplyFilter;
165 /** additional having clause for the row set
167 [attribute,bound] string HavingClause
169 set raises (com::sun::star::beans::UnknownPropertyException);
172 /** additional group by for the row set
174 [attribute,bound] string GroupBy
176 set raises (com::sun::star::beans::UnknownPropertyException);
179 /** is a additional sort order definition for a row set.
181 [attribute,bound] string Order;
183 /** specifies if the <member>Command</member> should be analyzed on the client side before sending it
184 to the database server.
186 <p>The default value of this property is <TRUE/>. By switching it to <FALSE/>, you can pass
187 backend-specific SQL statements, which are not standard SQL, to your database.</p>
189 <p>This property is usually present together with the <member>Command</member> and
190 <member>CommandType</member> properties, and is evaluated if and only if <member>CommandType</member>
191 equals <member>CommandType::COMMAND</member>.</p>
193 [attribute,bound] boolean EscapeProcessing;
195 /** specifies the maximal count of rows which should be fetched.
196 <p>A value of zero implies that no limit exists.</p>
198 [attribute,bound] long RowLimit;
200 /** specifies the active connection which is used to create the resulting report.
202 [attribute,bound] com::sun::star::sdbc::XConnection ActiveConnection
204 set raises (com::sun::star::lang::IllegalArgumentException);
206 /** is the name of the data source to use, this could be a named data source
207 or the URL of a data access component.
209 [attribute,bound] string DataSourceName;
212 //=============================================================================
214 }; }; }; }; };
216 /*=============================================================================
218 =============================================================================*/
219 #endif
221 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */