src/java.sql/share/classes/java/sql/SQLOutput.java
author darcy
Thu, 01 Nov 2018 20:37:45 -0700
changeset 52380 6b31efbf833e
parent 47216 71c04702a3d5
permissions -rw-r--r--
6304578: (reflect) toGenericString fails to print bounds of type variables on generic methods Reviewed-by: vromero, plevart, briangoetz, mcimadamore
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
15643
5e3b735b74ac 8006505: additional changes for JSR 310 support
lancea
parents: 5506
diff changeset
     2
 * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
package java.sql;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
 * The output stream for writing the attributes of a user-defined
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
 * type back to the database.  This interface, used
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
 * only for custom mapping, is used by the driver, and its
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
 * methods are never directly invoked by a programmer.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
 * <p>When an object of a class implementing the interface
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
 * <code>SQLData</code> is passed as an argument to an SQL statement, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
 * JDBC driver calls the method <code>SQLData.getSQLType</code> to
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
 * determine the  kind of SQL
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
 * datum being passed to the database.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
 * The driver then creates an instance of <code>SQLOutput</code> and
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
 * passes it to the method <code>SQLData.writeSQL</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
 * The method <code>writeSQL</code> in turn calls the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
 * appropriate <code>SQLOutput</code> <i>writer</i> methods
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
 * <code>writeBoolean</code>, <code>writeCharacterStream</code>, and so on)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
 * to write data from the <code>SQLData</code> object to
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
 * the <code>SQLOutput</code> output stream as the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
 * representation of an SQL user-defined type.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
 * @since 1.2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
 public interface SQLOutput {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
  //================================================================
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
  // Methods for writing attributes to the stream of SQL data.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
  // These methods correspond to the column-accessor methods of
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
  // java.sql.ResultSet.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
  //================================================================
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
  /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
   * Writes the next attribute to the stream as a <code>String</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
   * in the Java programming language.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
   * @param x the value to pass to the database
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
   * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
   * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
   * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
   * @since 1.2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
   */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
  void writeString(String x) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
  /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
   * Writes the next attribute to the stream as a Java boolean.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
   * Writes the next attribute to the stream as a <code>String</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
   * in the Java programming language.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
   * @param x the value to pass to the database
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
   * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
   * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
   * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
   * @since 1.2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
   */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
  void writeBoolean(boolean x) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
  /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
   * Writes the next attribute to the stream as a Java byte.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
   * Writes the next attribute to the stream as a <code>String</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
   * in the Java programming language.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
   * @param x the value to pass to the database
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
   * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
   * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
   * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
   * @since 1.2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
   */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
  void writeByte(byte x) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
  /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
   * Writes the next attribute to the stream as a Java short.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
   * Writes the next attribute to the stream as a <code>String</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
   * in the Java programming language.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
   * @param x the value to pass to the database
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
   * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
   * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
   * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
   * @since 1.2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
   */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
  void writeShort(short x) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
  /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
   * Writes the next attribute to the stream as a Java int.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
   * Writes the next attribute to the stream as a <code>String</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
   * in the Java programming language.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
   * @param x the value to pass to the database
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
   * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
   * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
   * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
   * @since 1.2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
   */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
  void writeInt(int x) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
  /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
   * Writes the next attribute to the stream as a Java long.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
   * Writes the next attribute to the stream as a <code>String</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
   * in the Java programming language.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
   * @param x the value to pass to the database
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
   * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
   * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
   * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
   * @since 1.2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
   */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
  void writeLong(long x) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
  /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
   * Writes the next attribute to the stream as a Java float.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
   * Writes the next attribute to the stream as a <code>String</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
   * in the Java programming language.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
   * @param x the value to pass to the database
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
   * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
   * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
   * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
   * @since 1.2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
   */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
  void writeFloat(float x) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
  /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
   * Writes the next attribute to the stream as a Java double.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
   * Writes the next attribute to the stream as a <code>String</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
   * in the Java programming language.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
   * @param x the value to pass to the database
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
   * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
   * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
   * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
   * @since 1.2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
   */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
  void writeDouble(double x) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
  /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
   * Writes the next attribute to the stream as a java.math.BigDecimal object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
   * Writes the next attribute to the stream as a <code>String</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
   * in the Java programming language.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
   * @param x the value to pass to the database
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
   * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
   * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
   * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
   * @since 1.2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
   */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
  void writeBigDecimal(java.math.BigDecimal x) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
  /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
   * Writes the next attribute to the stream as an array of bytes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
   * Writes the next attribute to the stream as a <code>String</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
   * in the Java programming language.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
   * @param x the value to pass to the database
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
   * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
   * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
   * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
   * @since 1.2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
   */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
  void writeBytes(byte[] x) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
  /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
   * Writes the next attribute to the stream as a java.sql.Date object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
   * Writes the next attribute to the stream as a <code>java.sql.Date</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
   * in the Java programming language.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
   * @param x the value to pass to the database
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
   * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
   * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
   * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
   * @since 1.2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
   */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
  void writeDate(java.sql.Date x) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
  /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
   * Writes the next attribute to the stream as a java.sql.Time object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
   * Writes the next attribute to the stream as a <code>java.sql.Date</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
   * in the Java programming language.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
   * @param x the value to pass to the database
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
   * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
   * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
   * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
   * @since 1.2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
   */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
  void writeTime(java.sql.Time x) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
  /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
   * Writes the next attribute to the stream as a java.sql.Timestamp object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
   * Writes the next attribute to the stream as a <code>java.sql.Date</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
   * in the Java programming language.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
   * @param x the value to pass to the database
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
   * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
   * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
   * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
   * @since 1.2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
   */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
  void writeTimestamp(java.sql.Timestamp x) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
  /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
   * Writes the next attribute to the stream as a stream of Unicode characters.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
   * @param x the value to pass to the database
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
   * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
   * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
   * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
   * @since 1.2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
   */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
  void writeCharacterStream(java.io.Reader x) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
  /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
   * Writes the next attribute to the stream as a stream of ASCII characters.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
   * @param x the value to pass to the database
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
   * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
   * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
   * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
   * @since 1.2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
   */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
  void writeAsciiStream(java.io.InputStream x) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
  /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
   * Writes the next attribute to the stream as a stream of uninterpreted
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
   * bytes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
   * @param x the value to pass to the database
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
   * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
   * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
   * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
   * @since 1.2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
   */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
  void writeBinaryStream(java.io.InputStream x) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
  //================================================================
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
  // Methods for writing items of SQL user-defined types to the stream.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
  // These methods pass objects to the database as values of SQL
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
  // Structured Types, Distinct Types, Constructed Types, and Locator
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
  // Types.  They decompose the Java object(s) and write leaf data
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
  // items using the methods above.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
  //================================================================
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
  /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
   * Writes to the stream the data contained in the given
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
   * <code>SQLData</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
   * When the <code>SQLData</code> object is <code>null</code>, this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
   * method writes an SQL <code>NULL</code> to the stream.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
   * Otherwise, it calls the <code>SQLData.writeSQL</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
   * method of the given object, which
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
   * writes the object's attributes to the stream.
15643
5e3b735b74ac 8006505: additional changes for JSR 310 support
lancea
parents: 5506
diff changeset
   275
   * The implementation of the method <code>SQLData.writeSQL</code>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
   * calls the appropriate <code>SQLOutput</code> writer method(s)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
   * for writing each of the object's attributes in order.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   278
   * The attributes must be read from an <code>SQLInput</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   279
   * input stream and written to an <code>SQLOutput</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   280
   * output stream in the same order in which they were
90ce3da70b43 Initial load
duke
parents:
diff changeset
   281
   * listed in the SQL definition of the user-defined type.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   282
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   283
   * @param x the object representing data of an SQL structured or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   284
   * distinct type
90ce3da70b43 Initial load
duke
parents:
diff changeset
   285
   * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
   * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
   * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
   * @since 1.2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
   */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   290
  void writeObject(SQLData x) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
  /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   293
   * Writes an SQL <code>REF</code> value to the stream.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   294
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   295
   * @param x a <code>Ref</code> object representing data of an SQL
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
   * <code>REF</code> value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   297
   * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
   * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
   * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
   * @since 1.2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
   */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
  void writeRef(Ref x) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
90ce3da70b43 Initial load
duke
parents:
diff changeset
   304
  /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   305
   * Writes an SQL <code>BLOB</code> value to the stream.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   306
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   307
   * @param x a <code>Blob</code> object representing data of an SQL
90ce3da70b43 Initial load
duke
parents:
diff changeset
   308
   * <code>BLOB</code> value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   309
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   310
   * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   311
   * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
   312
   * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   313
   * @since 1.2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   314
   */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   315
  void writeBlob(Blob x) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   316
90ce3da70b43 Initial load
duke
parents:
diff changeset
   317
  /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   318
   * Writes an SQL <code>CLOB</code> value to the stream.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   319
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   320
   * @param x a <code>Clob</code> object representing data of an SQL
90ce3da70b43 Initial load
duke
parents:
diff changeset
   321
   * <code>CLOB</code> value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   322
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   323
   * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   324
   * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
   325
   * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   326
   * @since 1.2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   327
   */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   328
  void writeClob(Clob x) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   329
90ce3da70b43 Initial load
duke
parents:
diff changeset
   330
  /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   331
   * Writes an SQL structured type value to the stream.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   332
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   333
   * @param x a <code>Struct</code> object representing data of an SQL
90ce3da70b43 Initial load
duke
parents:
diff changeset
   334
   * structured type
90ce3da70b43 Initial load
duke
parents:
diff changeset
   335
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   336
   * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   337
   * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
   338
   * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   339
   * @since 1.2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   340
   */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   341
  void writeStruct(Struct x) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   342
90ce3da70b43 Initial load
duke
parents:
diff changeset
   343
  /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   344
   * Writes an SQL <code>ARRAY</code> value to the stream.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   345
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   346
   * @param x an <code>Array</code> object representing data of an SQL
90ce3da70b43 Initial load
duke
parents:
diff changeset
   347
   * <code>ARRAY</code> type
90ce3da70b43 Initial load
duke
parents:
diff changeset
   348
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   349
   * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   350
   * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
   351
   * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   352
   * @since 1.2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   353
   */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   354
  void writeArray(Array x) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   355
90ce3da70b43 Initial load
duke
parents:
diff changeset
   356
     //--------------------------- JDBC 3.0 ------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
   357
90ce3da70b43 Initial load
duke
parents:
diff changeset
   358
     /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   359
      * Writes a SQL <code>DATALINK</code> value to the stream.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   360
      *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   361
      * @param x a <code>java.net.URL</code> object representing the data
90ce3da70b43 Initial load
duke
parents:
diff changeset
   362
      * of SQL DATALINK type
90ce3da70b43 Initial load
duke
parents:
diff changeset
   363
      *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   364
      * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   365
      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
   366
      * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   367
      * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
   368
      */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   369
     void writeURL(java.net.URL x) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   370
90ce3da70b43 Initial load
duke
parents:
diff changeset
   371
     //--------------------------- JDBC 4.0 ------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
   372
90ce3da70b43 Initial load
duke
parents:
diff changeset
   373
  /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   374
   * Writes the next attribute to the stream as a <code>String</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   375
   * in the Java programming language. The driver converts this to a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   376
   * SQL <code>NCHAR</code> or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   377
   * <code>NVARCHAR</code> or <code>LONGNVARCHAR</code> value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   378
   * (depending on the argument's
90ce3da70b43 Initial load
duke
parents:
diff changeset
   379
   * size relative to the driver's limits on <code>NVARCHAR</code> values)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   380
   * when it sends it to the stream.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   381
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   382
   * @param x the value to pass to the database
90ce3da70b43 Initial load
duke
parents:
diff changeset
   383
   * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   384
   * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
   385
   * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   386
   * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   387
   */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   388
  void writeNString(String x) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   389
90ce3da70b43 Initial load
duke
parents:
diff changeset
   390
  /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   391
   * Writes an SQL <code>NCLOB</code> value to the stream.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   392
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   393
   * @param x a <code>NClob</code> object representing data of an SQL
90ce3da70b43 Initial load
duke
parents:
diff changeset
   394
   * <code>NCLOB</code> value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   395
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   396
   * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   397
   * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
   398
   * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   399
   * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   400
   */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   401
  void writeNClob(NClob x) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   402
90ce3da70b43 Initial load
duke
parents:
diff changeset
   403
90ce3da70b43 Initial load
duke
parents:
diff changeset
   404
  /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   405
   * Writes an SQL <code>ROWID</code> value to the stream.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   406
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   407
   * @param x a <code>RowId</code> object representing data of an SQL
90ce3da70b43 Initial load
duke
parents:
diff changeset
   408
   * <code>ROWID</code> value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   409
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   410
   * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   411
   * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
   412
   * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   413
   * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   414
   */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   415
  void writeRowId(RowId x) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   416
90ce3da70b43 Initial load
duke
parents:
diff changeset
   417
90ce3da70b43 Initial load
duke
parents:
diff changeset
   418
  /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   419
   * Writes an SQL <code>XML</code> value to the stream.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   420
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   421
   * @param x a <code>SQLXML</code> object representing data of an SQL
90ce3da70b43 Initial load
duke
parents:
diff changeset
   422
   * <code>XML</code> value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   423
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   424
   * @throws SQLException if a database access error occurs,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   425
   * the <code>java.xml.transform.Result</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   426
   *  <code>Writer</code> or <code>OutputStream</code> has not been closed for the <code>SQLXML</code> object or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   427
   *  if there is an error processing the XML value.  The <code>getCause</code> method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   428
   *  of the exception may provide a more detailed exception, for example, if the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   429
   *  stream does not contain valid XML.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   430
   * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
90ce3da70b43 Initial load
duke
parents:
diff changeset
   431
   * this method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   432
   * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   433
   */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   434
  void writeSQLXML(SQLXML x) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   435
15643
5e3b735b74ac 8006505: additional changes for JSR 310 support
lancea
parents: 5506
diff changeset
   436
  //--------------------------JDBC 4.2 -----------------------------
5e3b735b74ac 8006505: additional changes for JSR 310 support
lancea
parents: 5506
diff changeset
   437
5e3b735b74ac 8006505: additional changes for JSR 310 support
lancea
parents: 5506
diff changeset
   438
  /**
5e3b735b74ac 8006505: additional changes for JSR 310 support
lancea
parents: 5506
diff changeset
   439
   * Writes to the stream the data contained in the given object. The
5e3b735b74ac 8006505: additional changes for JSR 310 support
lancea
parents: 5506
diff changeset
   440
   * object will be converted to the specified targetSqlType
5e3b735b74ac 8006505: additional changes for JSR 310 support
lancea
parents: 5506
diff changeset
   441
   * before being sent to the stream.
5e3b735b74ac 8006505: additional changes for JSR 310 support
lancea
parents: 5506
diff changeset
   442
   *<p>
5e3b735b74ac 8006505: additional changes for JSR 310 support
lancea
parents: 5506
diff changeset
   443
   * When the {@code object} is {@code null}, this
5e3b735b74ac 8006505: additional changes for JSR 310 support
lancea
parents: 5506
diff changeset
   444
   * method writes an SQL {@code NULL} to the stream.
5e3b735b74ac 8006505: additional changes for JSR 310 support
lancea
parents: 5506
diff changeset
   445
   * <p>
5e3b735b74ac 8006505: additional changes for JSR 310 support
lancea
parents: 5506
diff changeset
   446
   * If the object has a custom mapping (is of a class implementing the
5e3b735b74ac 8006505: additional changes for JSR 310 support
lancea
parents: 5506
diff changeset
   447
   * interface {@code SQLData}),
5e3b735b74ac 8006505: additional changes for JSR 310 support
lancea
parents: 5506
diff changeset
   448
   * the JDBC driver should call the method {@code SQLData.writeSQL} to
5e3b735b74ac 8006505: additional changes for JSR 310 support
lancea
parents: 5506
diff changeset
   449
   * write it to the SQL data stream.
5e3b735b74ac 8006505: additional changes for JSR 310 support
lancea
parents: 5506
diff changeset
   450
   * If, on the other hand, the object is of a class implementing
5e3b735b74ac 8006505: additional changes for JSR 310 support
lancea
parents: 5506
diff changeset
   451
   * {@code Ref}, {@code Blob}, {@code Clob},  {@code NClob},
5e3b735b74ac 8006505: additional changes for JSR 310 support
lancea
parents: 5506
diff changeset
   452
   *  {@code Struct}, {@code java.net.URL},
5e3b735b74ac 8006505: additional changes for JSR 310 support
lancea
parents: 5506
diff changeset
   453
   * or {@code Array}, the driver should pass it to the database as a
5e3b735b74ac 8006505: additional changes for JSR 310 support
lancea
parents: 5506
diff changeset
   454
   * value of the corresponding SQL type.
5e3b735b74ac 8006505: additional changes for JSR 310 support
lancea
parents: 5506
diff changeset
   455
   *<P>
5e3b735b74ac 8006505: additional changes for JSR 310 support
lancea
parents: 5506
diff changeset
   456
   * The default implementation will throw {@code SQLFeatureNotSupportedException}
5e3b735b74ac 8006505: additional changes for JSR 310 support
lancea
parents: 5506
diff changeset
   457
   *
5e3b735b74ac 8006505: additional changes for JSR 310 support
lancea
parents: 5506
diff changeset
   458
   * @param x the object containing the input parameter value
5e3b735b74ac 8006505: additional changes for JSR 310 support
lancea
parents: 5506
diff changeset
   459
   * @param targetSqlType the SQL type to be sent to the database.
5e3b735b74ac 8006505: additional changes for JSR 310 support
lancea
parents: 5506
diff changeset
   460
   * @exception SQLException if a database access error occurs  or
5e3b735b74ac 8006505: additional changes for JSR 310 support
lancea
parents: 5506
diff changeset
   461
   *            if the Java Object specified by x is an InputStream
5e3b735b74ac 8006505: additional changes for JSR 310 support
lancea
parents: 5506
diff changeset
   462
   *            or Reader object and the value of the scale parameter is less
5e3b735b74ac 8006505: additional changes for JSR 310 support
lancea
parents: 5506
diff changeset
   463
   *            than zero
5e3b735b74ac 8006505: additional changes for JSR 310 support
lancea
parents: 5506
diff changeset
   464
   * @exception SQLFeatureNotSupportedException if
5e3b735b74ac 8006505: additional changes for JSR 310 support
lancea
parents: 5506
diff changeset
   465
   * the JDBC driver does not support this data type
5e3b735b74ac 8006505: additional changes for JSR 310 support
lancea
parents: 5506
diff changeset
   466
   * @see JDBCType
5e3b735b74ac 8006505: additional changes for JSR 310 support
lancea
parents: 5506
diff changeset
   467
   * @see SQLType
5e3b735b74ac 8006505: additional changes for JSR 310 support
lancea
parents: 5506
diff changeset
   468
   * @since 1.8
5e3b735b74ac 8006505: additional changes for JSR 310 support
lancea
parents: 5506
diff changeset
   469
   */
5e3b735b74ac 8006505: additional changes for JSR 310 support
lancea
parents: 5506
diff changeset
   470
  default void writeObject(Object x, SQLType targetSqlType) throws SQLException {
5e3b735b74ac 8006505: additional changes for JSR 310 support
lancea
parents: 5506
diff changeset
   471
        throw new SQLFeatureNotSupportedException();
5e3b735b74ac 8006505: additional changes for JSR 310 support
lancea
parents: 5506
diff changeset
   472
  }
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   473
90ce3da70b43 Initial load
duke
parents:
diff changeset
   474
}
15643
5e3b735b74ac 8006505: additional changes for JSR 310 support
lancea
parents: 5506
diff changeset
   475