Update ooo320-m1
[ooovba.git] / offapi / com / sun / star / sdb / XSQLQueryComposer.idl
blobc7bfdb459bef85cb05b425ede8987e449bd4ef04
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XSQLQueryComposer.idl,v $
10 * $Revision: 1.11 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef __com_sun_star_sdb_XSQLQueryComposer_idl__
31 #define __com_sun_star_sdb_XSQLQueryComposer_idl__
33 #ifndef __com_sun_star_beans_XPropertySet_idl__
34 #include <com/sun/star/beans/XPropertySet.idl>
35 #endif
37 #ifndef __com_sun_star_beans_PropertyValue_idl__
38 #include <com/sun/star/beans/PropertyValue.idl>
39 #endif
41 #ifndef __com_sun_star_sdbc_SQLException_idl__
42 #include <com/sun/star/sdbc/SQLException.idl>
43 #endif
45 //=============================================================================
47 module com { module sun { module star { module sdb {
49 //=============================================================================
51 /** should be provided by a tool which simplifies the handling with SQL select statements.
53 <p>
54 The interface can be used for composing SELECT statements without knowing the
55 structure of the used query.
56 </p>
58 published interface XSQLQueryComposer: com::sun::star::uno::XInterface
61 /** returns the query used for composing.
62 @returns
63 the query
65 string getQuery();
66 //-------------------------------------------------------------------------
68 /** sets a new query for the composer, which may be expanded by filters
69 and sort criteria.
70 @param command
71 the command to set
72 @throws com::sun::star::sdbc::SQLException
73 if a database access error occurs.
75 void setQuery([in] string command )
76 raises (com::sun::star::sdbc::SQLException);
77 //-------------------------------------------------------------------------
79 /** returns the query composed with filters and sort criterias.
80 @returns
81 the composed query
83 string getComposedQuery();
84 //-------------------------------------------------------------------------
86 /** returns the currently used filter.
88 <p>
89 The filter criteria returned is part of the where condition of the
90 select command, but it does not contain the where token.
91 </p>
92 @returns
93 the filter
95 string getFilter();
96 //-------------------------------------------------------------------------
98 /** returns the currently used filter.
99 <p>
100 The filter criteria is split into levels. Each level represents the
101 OR criterias. Within each level, the filters are provided as an AND criteria
102 with the name of the column and the filter condition. The filter condition
103 is of type string.
104 </p>
105 @returns
106 the structured filter
108 sequence< sequence<com::sun::star::beans::PropertyValue> >
109 getStructuredFilter();
110 //-------------------------------------------------------------------------
112 /** returns the currently used sort order.
116 The order criteria returned is part of the ORDER BY clause of the
117 select command, but it does not contain the ORDER BY keyword .
118 </p>
119 @returns
120 the order
122 string getOrder();
123 //-------------------------------------------------------------------------
125 /** appends a new filter condition by a
126 <type scope="com::sun::star::sdb">DataColumn</type>
127 providing the name and the value for the filter.
128 @param column
129 the column which is used to create a filter
130 @throws com::sun::star::sdbc::SQLException
131 if a database access error occurs.
133 void appendFilterByColumn([in] com::sun::star::beans::XPropertySet column)
134 raises (com::sun::star::sdbc::SQLException);
135 //-------------------------------------------------------------------------
137 /** appends an additional part to the sort order criteria of the select
138 statement.
139 @param column
140 the column which is used to create a order part
141 @param ascending
142 <TRUE/> when the order should be ascending, otherwise <FALSE/>
143 @throws com::sun::star::sdbc::SQLException
144 if a database access error occurs.
146 void appendOrderByColumn([in] com::sun::star::beans::XPropertySet column,
147 [in] boolean ascending)
148 raises (com::sun::star::sdbc::SQLException);
149 //-------------------------------------------------------------------------
151 /** makes it possible to set a filter condition for the query.
152 @param filter
153 the filter to set
154 @throws com::sun::star::sdbc::SQLException
155 if a database access error occurs.
157 void setFilter([in] string filter)
158 raises (com::sun::star::sdbc::SQLException);
159 //-------------------------------------------------------------------------
161 /** makes it possibile to set a sort condition for the query.
162 @param order
163 the order part to set
164 @throws com::sun::star::sdbc::SQLException
165 if a database access error occurs.
167 void setOrder([in] string order)
168 raises (com::sun::star::sdbc::SQLException);
171 //=============================================================================
173 }; }; }; };
175 /*=============================================================================
177 =============================================================================*/
178 #endif