source: trunk/gcc/libjava/java/sql/SQLOutput.java

Last change on this file was 1392, checked in by bird, 21 years ago

This commit was generated by cvs2svn to compensate for changes in r1391,
which included commits to RCS files with non-trunk default branches.

  • Property cvs2svn:cvs-rev set to 1.1.1.2
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 7.9 KB
Line 
1/* SQLOutput.java -- Write SQL values to a stream
2 Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
3
4This file is part of GNU Classpath.
5
6GNU Classpath is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2, or (at your option)
9any later version.
10
11GNU Classpath is distributed in the hope that it will be useful, but
12WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GNU Classpath; see the file COPYING. If not, write to the
18Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1902111-1307 USA.
20
21Linking this library statically or dynamically with other modules is
22making a combined work based on this library. Thus, the terms and
23conditions of the GNU General Public License cover the whole
24combination.
25
26As a special exception, the copyright holders of this library give you
27permission to link this library with independent modules to produce an
28executable, regardless of the license terms of these independent
29modules, and to copy and distribute the resulting executable under
30terms of your choice, provided that you also meet, for each linked
31independent module, the terms and conditions of the license of that
32module. An independent module is a module which is not derived from
33or based on this library. If you modify this library, you may extend
34this exception to your version of the library, but you are not
35obligated to do so. If you do not wish to do so, delete this
36exception statement from your version. */
37
38
39package java.sql;
40
41import java.io.InputStream;
42import java.io.Reader;
43import java.math.BigDecimal;
44import java.net.URL;
45
46/**
47 * This interface provides methods for writing Java types to a SQL stream.
48 * It is used for implemented custom type mappings for user defined data
49 * types.
50 *
51 * @author Aaron M. Renn (arenn@urbanophile.com)
52 */
53public interface SQLOutput
54{
55 /**
56 * This method writes the specified Java <code>String</code>
57 * to the SQL stream.
58 *
59 * @param value The value to write to the stream.
60 * @exception SQLException If an error occurs.
61 */
62 public void writeString(String x) throws SQLException;
63
64 /**
65 * This method writes the specified Java <code>boolean</code>
66 * to the SQL stream.
67 *
68 * @param value The value to write to the stream.
69 * @exception SQLException If an error occurs.
70 */
71 public void writeBoolean(boolean x) throws SQLException;
72
73 /**
74 * This method writes the specified Java <code>byte</code>
75 * to the SQL stream.
76 *
77 * @param value The value to write to the stream.
78 * @exception SQLException If an error occurs.
79 */
80 public void writeByte(byte x) throws SQLException;
81
82 /**
83 * This method writes the specified Java <code>short</code>
84 * to the SQL stream.
85 *
86 * @param value The value to write to the stream.
87 * @exception SQLException If an error occurs.
88 */
89 public void writeShort(short x) throws SQLException;
90
91 /**
92 * This method writes the specified Java <code>int</code>
93 * to the SQL stream.
94 *
95 * @param value The value to write to the stream.
96 * @exception SQLException If an error occurs.
97 */
98 public void writeInt(int x) throws SQLException;
99
100 /**
101 * This method writes the specified Java <code>long</code>
102 * to the SQL stream.
103 *
104 * @param value The value to write to the stream.
105 * @exception SQLException If an error occurs.
106 */
107 public void writeLong(long x) throws SQLException;
108
109 /**
110 * This method writes the specified Java <code>float</code>
111 * to the SQL stream.
112 *
113 * @param value The value to write to the stream.
114 * @exception SQLException If an error occurs.
115 */
116 public void writeFloat(float x) throws SQLException;
117
118 /**
119 * This method writes the specified Java <code>double</code>
120 * to the SQL stream.
121 *
122 * @param value The value to write to the stream.
123 * @exception SQLException If an error occurs.
124 */
125 public void writeDouble(double x) throws SQLException;
126
127 /**
128 * This method writes the specified Java <code>BigDecimal</code>
129 * to the SQL stream.
130 *
131 * @param value The value to write to the stream.
132 * @exception SQLException If an error occurs.
133 */
134 public void writeBigDecimal(BigDecimal x) throws SQLException;
135
136 /**
137 * This method writes the specified Java <code>byte</code> array
138 * to the SQL stream.
139 *
140 * @param value The value to write to the stream.
141 * @exception SQLException If an error occurs.
142 */
143 public void writeBytes(byte[] x) throws SQLException;
144
145 /**
146 * This method writes the specified Java <code>java.sql.Date</code>
147 * to the SQL stream.
148 *
149 * @param value The value to write to the stream.
150 * @exception SQLException If an error occurs.
151 */
152 public void writeDate(Date x) throws SQLException;
153
154 /**
155 * This method writes the specified Java <code>java.sql.Time</code>
156 * to the SQL stream.
157 *
158 * @param value The value to write to the stream.
159 * @exception SQLException If an error occurs.
160 */
161 public void writeTime(Time x) throws SQLException;
162
163 /**
164 * This method writes the specified Java <code>java.sql.Timestamp</code>
165 * to the SQL stream.
166 *
167 * @param value The value to write to the stream.
168 * @exception SQLException If an error occurs.
169 */
170 public void writeTimestamp(Timestamp x) throws SQLException;
171
172 /**
173 * This method writes the specified Java character stream
174 * to the SQL stream.
175 *
176 * @param value The value to write to the stream.
177 * @exception SQLException If an error occurs.
178 */
179 public void writeCharacterStream(Reader x) throws SQLException;
180
181 /**
182 * This method writes the specified ASCII text stream
183 * to the SQL stream.
184 *
185 * @param value The value to write to the stream.
186 * @exception SQLException If an error occurs.
187 */
188 public void writeAsciiStream(InputStream x) throws SQLException;
189
190 /**
191 * This method writes the specified uninterpreted binary byte stream
192 * to the SQL stream.
193 *
194 * @param value The value to write to the stream.
195 * @exception SQLException If an error occurs.
196 */
197 public void writeBinaryStream(InputStream x) throws SQLException;
198
199 /**
200 * This method writes the specified Java <code>SQLData</code> object
201 * to the SQL stream.
202 *
203 * @param value The value to write to the stream.
204 * @exception SQLException If an error occurs.
205 */
206 public void writeObject(SQLData x) throws SQLException;
207
208 /**
209 * This method writes the specified Java SQL <code>Ref</code> object
210 * to the SQL stream.
211 *
212 * @param value The value to write to the stream.
213 * @exception SQLException If an error occurs.
214 */
215 public void writeRef(Ref x) throws SQLException;
216
217 /**
218 * This method writes the specified Java SQL <code>Blob</code> object
219 * to the SQL stream.
220 *
221 * @param value The value to write to the stream.
222 * @exception SQLException If an error occurs.
223 */
224 public void writeBlob(Blob x) throws SQLException;
225
226 /**
227 * This method writes the specified Java SQL <code>Clob</code> object
228 * to the SQL stream.
229 *
230 * @param value The value to write to the stream.
231 * @exception SQLException If an error occurs.
232 */
233 public void writeClob(Clob x) throws SQLException;
234
235 /**
236 * This method writes the specified Java SQL <code>Struct</code> object
237 * to the SQL stream.
238 *
239 * @param value The value to write to the stream.
240 * @exception SQLException If an error occurs.
241 */
242 public void writeStruct(Struct x) throws SQLException;
243
244 /**
245 * This method writes the specified Java SQL <code>Array</code> object
246 * to the SQL stream.
247 *
248 * @param value The value to write to the stream.
249 * @exception SQLException If an error occurs.
250 */
251 public void writeArray(Array x) throws SQLException;
252
253 /**
254 * @since 1.4
255 */
256 public void writeURL(URL x) throws SQLException;
257}
Note: See TracBrowser for help on using the repository browser.