1*b1cdbd2cSJim Jagielski/**************************************************************
2*b1cdbd2cSJim Jagielski *
3*b1cdbd2cSJim Jagielski * Licensed to the Apache Software Foundation (ASF) under one
4*b1cdbd2cSJim Jagielski * or more contributor license agreements.  See the NOTICE file
5*b1cdbd2cSJim Jagielski * distributed with this work for additional information
6*b1cdbd2cSJim Jagielski * regarding copyright ownership.  The ASF licenses this file
7*b1cdbd2cSJim Jagielski * to you under the Apache License, Version 2.0 (the
8*b1cdbd2cSJim Jagielski * "License"); you may not use this file except in compliance
9*b1cdbd2cSJim Jagielski * with the License.  You may obtain a copy of the License at
10*b1cdbd2cSJim Jagielski *
11*b1cdbd2cSJim Jagielski *   http://www.apache.org/licenses/LICENSE-2.0
12*b1cdbd2cSJim Jagielski *
13*b1cdbd2cSJim Jagielski * Unless required by applicable law or agreed to in writing,
14*b1cdbd2cSJim Jagielski * software distributed under the License is distributed on an
15*b1cdbd2cSJim Jagielski * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*b1cdbd2cSJim Jagielski * KIND, either express or implied.  See the License for the
17*b1cdbd2cSJim Jagielski * specific language governing permissions and limitations
18*b1cdbd2cSJim Jagielski * under the License.
19*b1cdbd2cSJim Jagielski *
20*b1cdbd2cSJim Jagielski *************************************************************/
21*b1cdbd2cSJim Jagielski
22*b1cdbd2cSJim Jagielski
23*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_sdbc_XParameters_idl__
24*b1cdbd2cSJim Jagielski#define __com_sun_star_sdbc_XParameters_idl__
25*b1cdbd2cSJim Jagielski
26*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_uno_XInterface_idl__
27*b1cdbd2cSJim Jagielski#include <com/sun/star/uno/XInterface.idl>
28*b1cdbd2cSJim Jagielski#endif
29*b1cdbd2cSJim Jagielski
30*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_util_Date_idl__
31*b1cdbd2cSJim Jagielski#include <com/sun/star/util/Date.idl>
32*b1cdbd2cSJim Jagielski#endif
33*b1cdbd2cSJim Jagielski
34*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_util_DateTime_idl__
35*b1cdbd2cSJim Jagielski#include <com/sun/star/util/DateTime.idl>
36*b1cdbd2cSJim Jagielski#endif
37*b1cdbd2cSJim Jagielski
38*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_util_Time_idl__
39*b1cdbd2cSJim Jagielski#include <com/sun/star/util/Time.idl>
40*b1cdbd2cSJim Jagielski#endif
41*b1cdbd2cSJim Jagielski
42*b1cdbd2cSJim Jagielski module com {  module sun {  module star {  module io {
43*b1cdbd2cSJim Jagielski published interface XInputStream;
44*b1cdbd2cSJim Jagielski};};};};
45*b1cdbd2cSJim Jagielski
46*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_sdbc_SQLException_idl__
47*b1cdbd2cSJim Jagielski#include <com/sun/star/sdbc/SQLException.idl>
48*b1cdbd2cSJim Jagielski#endif
49*b1cdbd2cSJim Jagielski
50*b1cdbd2cSJim Jagielski module com {  module sun {  module star {  module sdbc {
51*b1cdbd2cSJim Jagielski
52*b1cdbd2cSJim Jagielski published interface XRef;
53*b1cdbd2cSJim Jagielski published interface XArray;
54*b1cdbd2cSJim Jagielski published interface XBlob;
55*b1cdbd2cSJim Jagielski published interface XClob;
56*b1cdbd2cSJim Jagielski
57*b1cdbd2cSJim Jagielski
58*b1cdbd2cSJim Jagielski/** is used for parameter setting, commonly implemented in conjunction with
59*b1cdbd2cSJim Jagielski	PreparedStatements.
60*b1cdbd2cSJim Jagielski
61*b1cdbd2cSJim Jagielski
62*b1cdbd2cSJim Jagielski	<p>
63*b1cdbd2cSJim Jagielski	<b>Note:</b> The setXXX methods for setting IN parameter values
64*b1cdbd2cSJim Jagielski	must specify types that are compatible with the defined SQL type of
65*b1cdbd2cSJim Jagielski	the input parameter. For instance, if the IN parameter has SQL type
66*b1cdbd2cSJim Jagielski	Integer, then the method
67*b1cdbd2cSJim Jagielski	<member scope="com::sun::star::sdbc">XParameters::setInt()</member>
68*b1cdbd2cSJim Jagielski	should be used.
69*b1cdbd2cSJim Jagielski
70*b1cdbd2cSJim Jagielski	</p>
71*b1cdbd2cSJim Jagielski	<p>
72*b1cdbd2cSJim Jagielski	If arbitrary parameter type conversions are required, the method
73*b1cdbd2cSJim Jagielski	<member scope="com::sun::star::sdbc">XParameters::setObject()</member>
74*b1cdbd2cSJim Jagielski	should be used with a target SQL type.
75*b1cdbd2cSJim Jagielski	<br/>
76*b1cdbd2cSJim Jagielski	<br/>
77*b1cdbd2cSJim Jagielski	Example of setting a parameter;
78*b1cdbd2cSJim Jagielski	<code>con</code>
79*b1cdbd2cSJim Jagielski	is an active connection.
80*b1cdbd2cSJim Jagielski	</p>
81*b1cdbd2cSJim Jagielski
82*b1cdbd2cSJim Jagielski	@example <listing>pstmt = con.prepareStatement("UPDATE EMPLOYEES SET SALARY = ? WHERE ID = ?")
83*b1cdbd2cSJim Jagielski	pstmt.setDouble(1, 153833.00)
84*b1cdbd2cSJim Jagielski	pstmt.setLong(2, 110592)
85*b1cdbd2cSJim Jagielski	</listing>@see com::sun::star::sdbc::XPreparedStatement
86*b1cdbd2cSJim Jagielski */
87*b1cdbd2cSJim Jagielskipublished interface XParameters: com::sun::star::uno::XInterface
88*b1cdbd2cSJim Jagielski{
89*b1cdbd2cSJim Jagielski
90*b1cdbd2cSJim Jagielski	/** sets the designated parameter to SQL NULL.
91*b1cdbd2cSJim Jagielski	 */
92*b1cdbd2cSJim Jagielski	void setNull([in]long parameterIndex,
93*b1cdbd2cSJim Jagielski				 [in]long sqlType) raises (SQLException);
94*b1cdbd2cSJim Jagielski	//-------------------------------------------------------------------------
95*b1cdbd2cSJim Jagielski
96*b1cdbd2cSJim Jagielski	/** sets the designated parameter to SQL NULL.  This version of setNull should
97*b1cdbd2cSJim Jagielski		be used for user-named types and REF type parameters.  Examples
98*b1cdbd2cSJim Jagielski		of user-named types include: STRUCT, DISTINCT, OBJECT, and
99*b1cdbd2cSJim Jagielski		named array types.
100*b1cdbd2cSJim Jagielski
101*b1cdbd2cSJim Jagielski
102*b1cdbd2cSJim Jagielski		<p>
103*b1cdbd2cSJim Jagielski		<b>Note:</b> To be portable, applications must give the
104*b1cdbd2cSJim Jagielski		SQL type code and the fully-qualified SQL type name when specifying
105*b1cdbd2cSJim Jagielski		a NULL user-defined or REF parameter. In the case of a user-named type
106*b1cdbd2cSJim Jagielski		the name is the type name of the parameter itself.  For a REF
107*b1cdbd2cSJim Jagielski		parameter the name is the type name of the referenced type.  If
108*b1cdbd2cSJim Jagielski		a SDBC driver does not need the type code or type name information,
109*b1cdbd2cSJim Jagielski		it may ignore it.
110*b1cdbd2cSJim Jagielski		<br/>
111*b1cdbd2cSJim Jagielski		Although it is intended for user-named and Ref parameters,
112*b1cdbd2cSJim Jagielski		this method may be used to set a null parameter of any JDBC type.
113*b1cdbd2cSJim Jagielski		If the parameter does not have a user-named or REF type, the given
114*b1cdbd2cSJim Jagielski		typeName is ignored.
115*b1cdbd2cSJim Jagielski		</p>
116*b1cdbd2cSJim Jagielski		@param parameterIndex
117*b1cdbd2cSJim Jagielski			the first parameter is 1, the second is 2, ...
118*b1cdbd2cSJim Jagielski		@param sqlType
119*b1cdbd2cSJim Jagielski			the type of the column to set to <NULL/>
120*b1cdbd2cSJim Jagielski		@param typeName
121*b1cdbd2cSJim Jagielski			the name of the type
122*b1cdbd2cSJim Jagielski		@throws SQLException
123*b1cdbd2cSJim Jagielski			if a database access error occurs.
124*b1cdbd2cSJim Jagielski	 */
125*b1cdbd2cSJim Jagielski	void setObjectNull([in]long parameterIndex,
126*b1cdbd2cSJim Jagielski				 	   [in]long sqlType,
127*b1cdbd2cSJim Jagielski				 	   [in]string typeName) raises (SQLException);
128*b1cdbd2cSJim Jagielski	//-------------------------------------------------------------------------
129*b1cdbd2cSJim Jagielski
130*b1cdbd2cSJim Jagielski	/** sets the designated parameter to a boolean value.  The driver converts this
131*b1cdbd2cSJim Jagielski		to a SQL BIT value when it sends it to the database.
132*b1cdbd2cSJim Jagielski		@param parameterIndex
133*b1cdbd2cSJim Jagielski			the first parameter is 1, the second is 2, ...
134*b1cdbd2cSJim Jagielski		@param x
135*b1cdbd2cSJim Jagielski			the parameter value
136*b1cdbd2cSJim Jagielski		@throws SQLException
137*b1cdbd2cSJim Jagielski			if a database access error occurs.
138*b1cdbd2cSJim Jagielski	 */
139*b1cdbd2cSJim Jagielski	void setBoolean([in]long parameterIndex, [in]boolean x)
140*b1cdbd2cSJim Jagielski		raises (SQLException);
141*b1cdbd2cSJim Jagielski	//-------------------------------------------------------------------------
142*b1cdbd2cSJim Jagielski
143*b1cdbd2cSJim Jagielski	/** sets the designated parameter to a byte value.  The driver converts this
144*b1cdbd2cSJim Jagielski		to a SQL TINYINT value when it sends it to the database.
145*b1cdbd2cSJim Jagielski		@param parameterIndex
146*b1cdbd2cSJim Jagielski			the first parameter is 1, the second is 2, ...
147*b1cdbd2cSJim Jagielski		@param x
148*b1cdbd2cSJim Jagielski			the parameter value
149*b1cdbd2cSJim Jagielski		@throws SQLException
150*b1cdbd2cSJim Jagielski			if a database access error occurs.
151*b1cdbd2cSJim Jagielski	 */
152*b1cdbd2cSJim Jagielski	void setByte([in]long parameterIndex, [in]byte x) raises (SQLException);
153*b1cdbd2cSJim Jagielski	//-------------------------------------------------------------------------
154*b1cdbd2cSJim Jagielski
155*b1cdbd2cSJim Jagielski	/** sets the designated parameter to a short value.  The driver converts this
156*b1cdbd2cSJim Jagielski		to a SQL SMALLINT value when it sends it to the database.
157*b1cdbd2cSJim Jagielski		@param parameterIndex
158*b1cdbd2cSJim Jagielski			the first parameter is 1, the second is 2, ...
159*b1cdbd2cSJim Jagielski		@param x
160*b1cdbd2cSJim Jagielski			the parameter value
161*b1cdbd2cSJim Jagielski		@throws SQLException
162*b1cdbd2cSJim Jagielski			if a database access error occurs.
163*b1cdbd2cSJim Jagielski	 */
164*b1cdbd2cSJim Jagielski	void setShort([in]long parameterIndex, [in]short x) raises (SQLException);
165*b1cdbd2cSJim Jagielski	//-------------------------------------------------------------------------
166*b1cdbd2cSJim Jagielski
167*b1cdbd2cSJim Jagielski	/** sets the designated parameter to a long value.  The driver converts this
168*b1cdbd2cSJim Jagielski		to a SQL INTEGER value when it sends it to the database.
169*b1cdbd2cSJim Jagielski		@param parameterIndex
170*b1cdbd2cSJim Jagielski			the first parameter is 1, the second is 2, ...
171*b1cdbd2cSJim Jagielski		@param x
172*b1cdbd2cSJim Jagielski			the parameter value
173*b1cdbd2cSJim Jagielski		@throws SQLException
174*b1cdbd2cSJim Jagielski			if a database access error occurs.
175*b1cdbd2cSJim Jagielski	 */
176*b1cdbd2cSJim Jagielski	void setInt([in]long parameterIndex, [in]long x) raises (SQLException);
177*b1cdbd2cSJim Jagielski	//-------------------------------------------------------------------------
178*b1cdbd2cSJim Jagielski
179*b1cdbd2cSJim Jagielski	/** sets the designated parameter to a hyper value.  The driver converts this
180*b1cdbd2cSJim Jagielski		to a SQL BIGINT value when it sends it to the database.
181*b1cdbd2cSJim Jagielski		@param parameterIndex
182*b1cdbd2cSJim Jagielski			the first parameter is 1, the second is 2, ...
183*b1cdbd2cSJim Jagielski		@param x
184*b1cdbd2cSJim Jagielski			the parameter value
185*b1cdbd2cSJim Jagielski		@throws SQLException
186*b1cdbd2cSJim Jagielski			if a database access error occurs.
187*b1cdbd2cSJim Jagielski	 */
188*b1cdbd2cSJim Jagielski	void setLong([in]long parameterIndex, [in]hyper x) raises (SQLException);
189*b1cdbd2cSJim Jagielski	//-------------------------------------------------------------------------
190*b1cdbd2cSJim Jagielski
191*b1cdbd2cSJim Jagielski	/** sets the designated parameter to a float value. The driver converts this
192*b1cdbd2cSJim Jagielski		to a SQL FLOAT value when it sends it to the database.
193*b1cdbd2cSJim Jagielski		@param parameterIndex
194*b1cdbd2cSJim Jagielski			the first parameter is 1, the second is 2, ...
195*b1cdbd2cSJim Jagielski		@param x
196*b1cdbd2cSJim Jagielski			the parameter value
197*b1cdbd2cSJim Jagielski		@throws SQLException
198*b1cdbd2cSJim Jagielski			if a database access error occurs.
199*b1cdbd2cSJim Jagielski	 */
200*b1cdbd2cSJim Jagielski	void setFloat([in]long parameterIndex, [in]float x) raises (SQLException);
201*b1cdbd2cSJim Jagielski	//-------------------------------------------------------------------------
202*b1cdbd2cSJim Jagielski
203*b1cdbd2cSJim Jagielski	/** sets the designated parameter to a double value.  The driver converts this
204*b1cdbd2cSJim Jagielski		to a SQL DOUBLE value when it sends it to the database.
205*b1cdbd2cSJim Jagielski		@param parameterIndex
206*b1cdbd2cSJim Jagielski			the first parameter is 1, the second is 2, ...
207*b1cdbd2cSJim Jagielski		@param x
208*b1cdbd2cSJim Jagielski			the parameter value
209*b1cdbd2cSJim Jagielski		@throws SQLException
210*b1cdbd2cSJim Jagielski			if a database access error occurs.
211*b1cdbd2cSJim Jagielski	 */
212*b1cdbd2cSJim Jagielski	void setDouble([in]long parameterIndex, [in]double x) raises (SQLException);
213*b1cdbd2cSJim Jagielski	//-------------------------------------------------------------------------
214*b1cdbd2cSJim Jagielski
215*b1cdbd2cSJim Jagielski	/** sets the designated parameter to a string value. The driver converts this
216*b1cdbd2cSJim Jagielski		to a SQL VARCHAR or LONGVARCHAR value (depending on the argument's
217*b1cdbd2cSJim Jagielski		size relative to the driver's limits on VARCHARs) when it sends
218*b1cdbd2cSJim Jagielski		it to the database.
219*b1cdbd2cSJim Jagielski		@param parameterIndex
220*b1cdbd2cSJim Jagielski			the first parameter is 1, the second is 2, ...
221*b1cdbd2cSJim Jagielski		@param x
222*b1cdbd2cSJim Jagielski			the parameter value
223*b1cdbd2cSJim Jagielski		@throws SQLException
224*b1cdbd2cSJim Jagielski			if a database access error occurs.
225*b1cdbd2cSJim Jagielski	 */
226*b1cdbd2cSJim Jagielski	void setString([in]long parameterIndex, [in]string x) raises (SQLException);
227*b1cdbd2cSJim Jagielski	//-------------------------------------------------------------------------
228*b1cdbd2cSJim Jagielski
229*b1cdbd2cSJim Jagielski	/** sets the designated parameter to a sequence of bytes.  The driver converts
230*b1cdbd2cSJim Jagielski		this to a SQL VARBINARY or LONGVARBINARY (depending on the
231*b1cdbd2cSJim Jagielski		argument's size relative to the driver's limits on VARBINARYs)
232*b1cdbd2cSJim Jagielski		when it sends it to the database.
233*b1cdbd2cSJim Jagielski		@param parameterIndex
234*b1cdbd2cSJim Jagielski			the first parameter is 1, the second is 2, ...
235*b1cdbd2cSJim Jagielski		@param x
236*b1cdbd2cSJim Jagielski			the parameter value
237*b1cdbd2cSJim Jagielski		@throws SQLException
238*b1cdbd2cSJim Jagielski			if a database access error occurs.
239*b1cdbd2cSJim Jagielski	 */
240*b1cdbd2cSJim Jagielski	void setBytes([in]long parameterIndex, [in]sequence<byte> x)
241*b1cdbd2cSJim Jagielski		raises (SQLException);
242*b1cdbd2cSJim Jagielski	//-------------------------------------------------------------------------
243*b1cdbd2cSJim Jagielski
244*b1cdbd2cSJim Jagielski	/** sets the designated parameter to a date value. The driver converts this
245*b1cdbd2cSJim Jagielski		to a SQL DATE value when it sends it to the database.
246*b1cdbd2cSJim Jagielski		@param parameterIndex
247*b1cdbd2cSJim Jagielski			the first parameter is 1, the second is 2, ...
248*b1cdbd2cSJim Jagielski		@param x
249*b1cdbd2cSJim Jagielski			the parameter value
250*b1cdbd2cSJim Jagielski		@throws SQLException
251*b1cdbd2cSJim Jagielski			if a database access error occurs.
252*b1cdbd2cSJim Jagielski	 */
253*b1cdbd2cSJim Jagielski	void setDate([in]long parameterIndex, [in]com::sun::star::util::Date x)
254*b1cdbd2cSJim Jagielski		raises (SQLException);
255*b1cdbd2cSJim Jagielski	//-------------------------------------------------------------------------
256*b1cdbd2cSJim Jagielski
257*b1cdbd2cSJim Jagielski	/** sets the designated parameter to a time value. The driver converts this
258*b1cdbd2cSJim Jagielski		to a SQL TIME value when it sends it to the database.
259*b1cdbd2cSJim Jagielski		@param parameterIndex
260*b1cdbd2cSJim Jagielski			the first parameter is 1, the second is 2, ...
261*b1cdbd2cSJim Jagielski		@param x
262*b1cdbd2cSJim Jagielski			the parameter value
263*b1cdbd2cSJim Jagielski		@throws SQLException
264*b1cdbd2cSJim Jagielski			if a database access error occurs.
265*b1cdbd2cSJim Jagielski	 */
266*b1cdbd2cSJim Jagielski	void setTime([in]long parameterIndex, [in]com::sun::star::util::Time x)
267*b1cdbd2cSJim Jagielski		raises (SQLException);
268*b1cdbd2cSJim Jagielski	//-------------------------------------------------------------------------
269*b1cdbd2cSJim Jagielski
270*b1cdbd2cSJim Jagielski	/** sets the designated parameter to a datetime value.  The driver
271*b1cdbd2cSJim Jagielski		converts this to a SQL TIMESTAMP value when it sends it to the
272*b1cdbd2cSJim Jagielski		database.
273*b1cdbd2cSJim Jagielski		@param parameterIndex
274*b1cdbd2cSJim Jagielski			the first parameter is 1, the second is 2, ...
275*b1cdbd2cSJim Jagielski		@param x
276*b1cdbd2cSJim Jagielski			the parameter value
277*b1cdbd2cSJim Jagielski		@throws SQLException
278*b1cdbd2cSJim Jagielski			if a database access error occurs.
279*b1cdbd2cSJim Jagielski	 */
280*b1cdbd2cSJim Jagielski	void setTimestamp([in]long parameterIndex,
281*b1cdbd2cSJim Jagielski					  [in]com::sun::star::util::DateTime x) raises (SQLException);
282*b1cdbd2cSJim Jagielski	//-------------------------------------------------------------------------
283*b1cdbd2cSJim Jagielski
284*b1cdbd2cSJim Jagielski	/** sets the designated parameter to the given input stream, which will have
285*b1cdbd2cSJim Jagielski		the specified number of bytes.
286*b1cdbd2cSJim Jagielski		When a very large binary value is input to a LONGVARBINARY or LONGVARCHAR
287*b1cdbd2cSJim Jagielski		parameter, it may be more practical to send it via an
288*b1cdbd2cSJim Jagielski		<type scope="com::sun::star::io">XInputStream</type>
289*b1cdbd2cSJim Jagielski		. SDBC will read the data from the stream as needed, until it reaches end-of-file.
290*b1cdbd2cSJim Jagielski		@param parameterIndex
291*b1cdbd2cSJim Jagielski			the first parameter is 1, the second is 2, ...
292*b1cdbd2cSJim Jagielski		@param x
293*b1cdbd2cSJim Jagielski			the parameter value
294*b1cdbd2cSJim Jagielski		@param length
295*b1cdbd2cSJim Jagielski			the number of bytes in the stream
296*b1cdbd2cSJim Jagielski		@throws SQLException
297*b1cdbd2cSJim Jagielski			if a database access error occurs.
298*b1cdbd2cSJim Jagielski	 */
299*b1cdbd2cSJim Jagielski	void setBinaryStream([in]long parameterIndex,
300*b1cdbd2cSJim Jagielski				   		 [in]com::sun::star::io::XInputStream x,
301*b1cdbd2cSJim Jagielski			 	   		 [in]long length) raises (SQLException);
302*b1cdbd2cSJim Jagielski	//-------------------------------------------------------------------------
303*b1cdbd2cSJim Jagielski
304*b1cdbd2cSJim Jagielski	/** sets the designated parameter to the given input stream, which will have
305*b1cdbd2cSJim Jagielski		the specified number of bytes.
306*b1cdbd2cSJim Jagielski		When a very large binary value is input to a LONGVARCHAR
307*b1cdbd2cSJim Jagielski		parameter, it may be more practical to send it via a
308*b1cdbd2cSJim Jagielski		<type scope="com::sun::star::io">XInputStream</type>
309*b1cdbd2cSJim Jagielski		. SDBC will read the data from the stream as needed, until it reaches end-of-file.
310*b1cdbd2cSJim Jagielski		@param parameterIndex
311*b1cdbd2cSJim Jagielski			the first parameter is 1, the second is 2, ...
312*b1cdbd2cSJim Jagielski		@param x
313*b1cdbd2cSJim Jagielski			the parameter value
314*b1cdbd2cSJim Jagielski		@param length
315*b1cdbd2cSJim Jagielski			the number of characters in the stream
316*b1cdbd2cSJim Jagielski		@throws SQLException
317*b1cdbd2cSJim Jagielski			if a database access error occurs.
318*b1cdbd2cSJim Jagielski	 */
319*b1cdbd2cSJim Jagielski	void setCharacterStream([in]long parameterIndex,
320*b1cdbd2cSJim Jagielski			 	   		 [in]com::sun::star::io::XInputStream x,
321*b1cdbd2cSJim Jagielski			 	   		 [in]long length) raises (SQLException);
322*b1cdbd2cSJim Jagielski	//-------------------------------------------------------------------------
323*b1cdbd2cSJim Jagielski
324*b1cdbd2cSJim Jagielski	/** sets the value of a parameter using an any.
325*b1cdbd2cSJim Jagielski
326*b1cdbd2cSJim Jagielski
327*b1cdbd2cSJim Jagielski		<p>The given object will be converted to the targetSqlType
328*b1cdbd2cSJim Jagielski		before being sent to the database.
329*b1cdbd2cSJim Jagielski		If the object has a custom mapping (is of a class implementing SQLData),
330*b1cdbd2cSJim Jagielski		the SDBC driver should call its method <code>writeSQL</code> to write it
331*b1cdbd2cSJim Jagielski		to the SQL data stream.
332*b1cdbd2cSJim Jagielski		If, on the other hand, the object is of a service implementing Ref, Blob,
333*b1cdbd2cSJim Jagielski		Clob, Struct, or Array, the driver should pass it to the database as a
334*b1cdbd2cSJim Jagielski		value of the corresponding SQL type.
335*b1cdbd2cSJim Jagielski		</p>
336*b1cdbd2cSJim Jagielski		<p>Note that this method may be used to pass database-specific
337*b1cdbd2cSJim Jagielski		abstract data types.
338*b1cdbd2cSJim Jagielski		</p>
339*b1cdbd2cSJim Jagielski		@param parameterIndex
340*b1cdbd2cSJim Jagielski			the first parameter is 1, the second is 2, ...
341*b1cdbd2cSJim Jagielski		@param x
342*b1cdbd2cSJim Jagielski			the parameter value
343*b1cdbd2cSJim Jagielski		@throws SQLException
344*b1cdbd2cSJim Jagielski			if a database access error occurs.
345*b1cdbd2cSJim Jagielski	 */
346*b1cdbd2cSJim Jagielski	void setObject([in]long parameterIndex, [in]any x)
347*b1cdbd2cSJim Jagielski			raises (SQLException);
348*b1cdbd2cSJim Jagielski	//-------------------------------------------------------------------------
349*b1cdbd2cSJim Jagielski
350*b1cdbd2cSJim Jagielski	/** set a value from the Datatype ANY for a parameter.
351*b1cdbd2cSJim Jagielski
352*b1cdbd2cSJim Jagielski
353*b1cdbd2cSJim Jagielski
354*b1cdbd2cSJim Jagielski		<p>The given object will be converted to the targetSqlType
355*b1cdbd2cSJim Jagielski		before being sent to the database.
356*b1cdbd2cSJim Jagielski		If the object has a custom mapping (is of a class implementing SQLData),
357*b1cdbd2cSJim Jagielski		the SDBC driver should call its method <code>writeSQL</code> to write it
358*b1cdbd2cSJim Jagielski		to the SQL data stream.
359*b1cdbd2cSJim Jagielski		If, on the other hand, the object is of a service implementing Ref, Blob,
360*b1cdbd2cSJim Jagielski		Clob, Struct, or Array, the driver should pass it to the database as a
361*b1cdbd2cSJim Jagielski		value of the corresponding SQL type.
362*b1cdbd2cSJim Jagielski		</p>
363*b1cdbd2cSJim Jagielski		<p>Note that this method may be used to pass database-specific
364*b1cdbd2cSJim Jagielski		abstract data types.
365*b1cdbd2cSJim Jagielski		</p>
366*b1cdbd2cSJim Jagielski		@param parameterIndex
367*b1cdbd2cSJim Jagielski			the first parameter is 1, the second is 2, ...
368*b1cdbd2cSJim Jagielski		@param x
369*b1cdbd2cSJim Jagielski			the parameter value
370*b1cdbd2cSJim Jagielski		@param targetSqlType
371*b1cdbd2cSJim Jagielski			the SQL type (as defined in
372*b1cdbd2cSJim Jagielski			<type scope="com::sun::star::sdbc">DataType</type>
373*b1cdbd2cSJim Jagielski			) to be sent to the database. The scale argument may further qualify this type.
374*b1cdbd2cSJim Jagielski		@param scale
375*b1cdbd2cSJim Jagielski			for
376*b1cdbd2cSJim Jagielski			<member scope="com::sun::star::sdbc">DataType::DECIMAL</member>
377*b1cdbd2cSJim Jagielski			 or
378*b1cdbd2cSJim Jagielski			 <member scope="com::sun::star::sdbc">DataType::NUMERIC</member>
379*b1cdbd2cSJim Jagielski			 types, this is the number of digits after the decimal point. For all other types, this value will be ignored.
380*b1cdbd2cSJim Jagielski		@throws SQLException
381*b1cdbd2cSJim Jagielski			if a database access error occurs.
382*b1cdbd2cSJim Jagielski	 */
383*b1cdbd2cSJim Jagielski	void setObjectWithInfo([in]long parameterIndex,
384*b1cdbd2cSJim Jagielski				   		   [in]any x, [in]long targetSqlType, [in]long scale)
385*b1cdbd2cSJim Jagielski			raises (SQLException);
386*b1cdbd2cSJim Jagielski	//-------------------------------------------------------------------------
387*b1cdbd2cSJim Jagielski
388*b1cdbd2cSJim Jagielski	/** sets a REF(&amp;lt;structured-type&amp;gt;) parameter.
389*b1cdbd2cSJim Jagielski		@param parameterIndex
390*b1cdbd2cSJim Jagielski			the first parameter is 1, the second is 2, ...
391*b1cdbd2cSJim Jagielski		@param x
392*b1cdbd2cSJim Jagielski			the parameter value
393*b1cdbd2cSJim Jagielski		@throws SQLException
394*b1cdbd2cSJim Jagielski			if a database access error occurs.
395*b1cdbd2cSJim Jagielski	 */
396*b1cdbd2cSJim Jagielski	void setRef ([in]long parameterIndex, [in]XRef x) raises (SQLException);
397*b1cdbd2cSJim Jagielski	//-------------------------------------------------------------------------
398*b1cdbd2cSJim Jagielski
399*b1cdbd2cSJim Jagielski	/** sets a BLOB parameter.
400*b1cdbd2cSJim Jagielski		@param parameterIndex
401*b1cdbd2cSJim Jagielski			the first parameter is 1, the second is 2, ...
402*b1cdbd2cSJim Jagielski		@param x
403*b1cdbd2cSJim Jagielski			the parameter value
404*b1cdbd2cSJim Jagielski		@throws SQLException
405*b1cdbd2cSJim Jagielski			if a database access error occurs.
406*b1cdbd2cSJim Jagielski	 */
407*b1cdbd2cSJim Jagielski	void setBlob ([in]long parameterIndex, [in]XBlob x) raises (SQLException);
408*b1cdbd2cSJim Jagielski	//-------------------------------------------------------------------------
409*b1cdbd2cSJim Jagielski
410*b1cdbd2cSJim Jagielski	/** sets a CLOB parameter.
411*b1cdbd2cSJim Jagielski		@param parameterIndex
412*b1cdbd2cSJim Jagielski			the first parameter is 1, the second is 2, ...
413*b1cdbd2cSJim Jagielski		@param x
414*b1cdbd2cSJim Jagielski			the parameter value
415*b1cdbd2cSJim Jagielski		@throws SQLException
416*b1cdbd2cSJim Jagielski			if a database access error occurs.
417*b1cdbd2cSJim Jagielski	 */
418*b1cdbd2cSJim Jagielski	void setClob ([in]long parameterIndex, [in]XClob x) raises (SQLException);
419*b1cdbd2cSJim Jagielski	//-------------------------------------------------------------------------
420*b1cdbd2cSJim Jagielski
421*b1cdbd2cSJim Jagielski	/** sets an Array parameter.
422*b1cdbd2cSJim Jagielski		@param parameterIndex
423*b1cdbd2cSJim Jagielski			the first parameter is 1, the second is 2, ...
424*b1cdbd2cSJim Jagielski		@param x
425*b1cdbd2cSJim Jagielski			the parameter value
426*b1cdbd2cSJim Jagielski		@throws SQLException
427*b1cdbd2cSJim Jagielski			if a database access error occurs.
428*b1cdbd2cSJim Jagielski	 */
429*b1cdbd2cSJim Jagielski	void setArray ([in]long parameterIndex, [in]XArray x) raises (SQLException);
430*b1cdbd2cSJim Jagielski
431*b1cdbd2cSJim Jagielski	//-------------------------------------------------------------------------
432*b1cdbd2cSJim Jagielski
433*b1cdbd2cSJim Jagielski	/** clears the current parameter values immediately.
434*b1cdbd2cSJim Jagielski
435*b1cdbd2cSJim Jagielski
436*b1cdbd2cSJim Jagielski		<p>In general, parameter values remain in force for repeated use of a
437*b1cdbd2cSJim Jagielski		Statement. Setting a parameter value automatically clears its
438*b1cdbd2cSJim Jagielski		previous value. However, in some cases it is useful to immediately
439*b1cdbd2cSJim Jagielski		release the resources used by the current parameter values; this can
440*b1cdbd2cSJim Jagielski		be done by calling clearParameters.
441*b1cdbd2cSJim Jagielski		</p>
442*b1cdbd2cSJim Jagielski		@throws SQLException
443*b1cdbd2cSJim Jagielski			if a database access error occurs.
444*b1cdbd2cSJim Jagielski	 */
445*b1cdbd2cSJim Jagielski	void clearParameters() raises (SQLException);
446*b1cdbd2cSJim Jagielski};
447*b1cdbd2cSJim Jagielski
448*b1cdbd2cSJim Jagielski//=============================================================================
449*b1cdbd2cSJim Jagielski
450*b1cdbd2cSJim Jagielski}; }; }; };
451*b1cdbd2cSJim Jagielski
452*b1cdbd2cSJim Jagielski/*===========================================================================
453*b1cdbd2cSJim Jagielski===========================================================================*/
454*b1cdbd2cSJim Jagielski#endif
455