tdf#154285 Check upper bound of arguments in SbRtl_Minute function
[LibreOffice.git] / offapi / com / sun / star / sdbc / XSQLOutput.idl
blob8985f792bf4c85a401789c367d846ff786d74453
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
20 module com { module sun { module star { module io {
21 published interface XInputStream;
22 };};};};
24 module com { module sun { module star { module sdbc {
26 published interface XRef;
27 published interface XArray;
28 published interface XBlob;
29 published interface XClob;
30 published interface XStruct;
31 published interface XSQLData;
34 /** is used as an output stream for writing the attributes of a user-defined
35 type back to the database. This interface, used only for custom mapping,
36 is used by the driver, and its methods are never directly invoked
37 by a programmer.
40 <p>
41 When an object of a class implementing interface
42 com::sun::star::sdbc::XSQLData
43 is passed as an argument to a SQL statement, the JDBC driver calls
44 com::sun::star::sdbc::SQLData::getSQLType()
45 to determine the kind of SQL datum being passed to the database.
46 <br/>
47 The driver then creates an instance of
48 <code>XSQLOutput</code>
49 and passes it to the method
50 com::sun::star::sdbc::XSQLData::writeSQL()
51 . The method
52 <code>writeSQL</code>
53 in turn calls the appropriate
54 <code>XSQLOutput.writeXXX</code>
55 methods to write data from the
56 com::sun::star::sdbc::XSQLData
57 object to the
58 <code>XSQLOutput</code>
59 output stream as the representation of a SQL user-defined type.</p>
61 published interface XSQLOutput: com::sun::star::uno::XInterface
64 /** writes the next attribute to the stream as a string.
65 @param x
66 the value to pass to the database.
67 @throws SQLException
68 if a database access error occurs.
70 void writeString([in]string x) raises (SQLException);
72 /** writes the next attribute to the stream as boolean.
73 @param x
74 the value to pass to the database.
75 @throws SQLException
76 if a database access error occurs.
78 void writeBoolean([in]boolean x) raises (SQLException);
80 /** writes the next attribute to the stream as byte.
81 @param x
82 the value to pass to the database.
83 @throws SQLException
84 if a database access error occurs.
86 void writeByte([in]byte x) raises (SQLException);
88 /** writes the next attribute to the stream as short.
89 @param x
90 the value to pass to the database.
91 @throws SQLException
92 if a database access error occurs.
94 void writeShort([in]short x) raises (SQLException);
96 /** writes the next attribute to the stream as long.
97 @param x
98 the value to pass to the database.
99 @throws SQLException
100 if a database access error occurs.
102 void writeInt([in]long x) raises (SQLException);
104 /** writes the next attribute to the stream as hyper.
105 @param x
106 the value to pass to the database.
107 @throws SQLException
108 if a database access error occurs.
110 void writeLong([in]hyper x) raises (SQLException);
112 /** writes the next attribute to the stream as float.
113 @param x
114 the value to pass to the database.
115 @throws SQLException
116 if a database access error occurs.
118 void writeFloat([in]float x) raises (SQLException);
120 /** writes the next attribute to the stream as double.
121 @param x
122 the value to pass to the database.
123 @throws SQLException
124 if a database access error occurs.
126 void writeDouble([in]double x) raises (SQLException);
128 /** writes the next attribute to the stream as byte sequence.
129 @param x
130 the value to pass to the database.
131 @throws SQLException
132 if a database access error occurs.
134 void writeBytes([in]sequence<byte> x) raises (SQLException);
136 /** writes the next attribute to the stream as a date.
137 @param x
138 the value to pass to the database.
139 @throws SQLException
140 if a database access error occurs.
142 void writeDate([in]com::sun::star::util::Date x) raises (SQLException);
144 /** writes the next attribute to the stream as a time.
145 @param x
146 the value to pass to the database.
147 @throws SQLException
148 if a database access error occurs.
150 void writeTime([in]com::sun::star::util::Time x) raises (SQLException);
152 /** writes the next attribute to the stream as a datetime.
153 @param x
154 the value to pass to the database.
155 @throws SQLException
156 if a database access error occurs.
158 void writeTimestamp([in]com::sun::star::util::DateTime x)
159 raises (SQLException);
161 /** writes the next attribute to the stream as a stream of uninterpreted
162 bytes.
163 @param x
164 the value to pass to the database.
165 @throws SQLException
166 if a database access error occurs.
168 void writeBinaryStream([in]com::sun::star::io::XInputStream x)
169 raises (SQLException);
171 /** writes the next attribute to the stream as a stream of Unicode string.
172 @param x
173 the value to pass to the database.
174 @throws SQLException
175 if a database access error occurs.
177 void writeCharacterStream([in]com::sun::star::io::XInputStream x)
178 raises (SQLException);
180 /** writes to the stream the data contained in the given
181 <code>XSQLData</code> object.
185 >When the
186 <code>XSQLData</code>
187 object is
188 `NULL`
189 , this method writes an SQL NULL to the stream.
190 Otherwise, it calls the
191 com::sun::star::sdbc::XSQLData::writeSQL()
192 method of the given object, which
193 writes the object's attributes to the stream.
194 The implementation of the method
195 <code>XSQLData::writeSQL()</code>
196 calls the appropriate
197 <code>XSQLOutput.writeXXX</code>
198 method(s) for writing each of the object's attributes in order.
199 <br/>
200 The attributes must be read from an
201 com::sun::star::sdbc::XSQLInput
202 input stream and written to an
203 <code>XSQLOutput</code>
204 output stream in the same order in which they were
205 listed in the SQL definition of the user-defined type.
206 </p>
207 @param x
208 the value to pass to the database.
209 @throws SQLException
210 if a database access error occurs.
212 void writeObject([in]XSQLData x) raises (SQLException);
214 /** writes a REF(&amp;lt;structured-type&amp;gt;) to the stream.
215 @param x
216 the value to pass to the database.
217 @throws SQLException
218 if a database access error occurs.
220 void writeRef([in]XRef x) raises (SQLException);
222 /** writes a BLOB to the stream.
223 @param x
224 the value to pass to the database.
225 @throws SQLException
226 if a database access error occurs.
228 void writeBlob([in]XBlob x) raises (SQLException);
230 /** writes a CLOB to the stream.
231 @param x
232 the value to pass to the database.
233 @throws SQLException
234 if a database access error occurs.
236 void writeClob([in]XClob x) raises (SQLException);
238 /** writes a structured-type to the stream.
239 @param x
240 the value to pass to the database.
241 @throws SQLException
242 if a database access error occurs.
244 void writeStruct([in]XStruct x) raises (SQLException);
246 /** writes an array to the stream.
247 @param x
248 the value to pass to the database.
249 @throws SQLException
250 if a database access error occurs.
252 void writeArray([in]XArray x) raises (SQLException);
256 }; }; }; };
258 /*===========================================================================
259 ===========================================================================*/
261 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */