When an application calls the
method PreparedStatement.setObject, the driver
checks to see whether the value to be written is a UDT with
a custom mapping. If it is, there will be an entry in a
type map containing the Class object for the
class that implements SQLData for this UDT.
If the value to be written is an instance of SQLData,
the driver will create an instance of SQLOutputImpl
and pass it to the method SQLData.writeSQL.
The method writeSQL in turn calls the
appropriate SQLOutputImpl.writeXXX methods
to write data from the SQLData object to
the SQLOutputImpl output stream as the
representation of an SQL user-defined type.
| Modifier and Type | Field and Description |
|---|---|
| private Vector | attribs
A reference to an existing vector that
contains the attributes of a |
| private Map | map
The type map the driver supplies to a newly created
|
| Access | Constructor and Description |
|---|---|
| public | SQLOutputImpl(Vector<?>
a attributes, Map<String, ?> Vector object containing the attributes of
the UDT to be mapped to one or more objects in the Java
programming languagea map)java.util.Map object containing zero or
more entries, with each entry consisting of 1) a String
giving the fully qualified name of a UDT and 2) the
Class object for the SQLData implementation
that defines how the UDT is to be mappedCreates a new |
| Modifier and Type | Method and Description |
|---|---|
| public void | writeArray(Array
an object representing an SQL x)ARRAY valueImplements java. Writes an |
| public void | writeAsciiStream(InputStream
the value to pass to the database x)Implements java. Writes a stream of ASCII characters to this
|
| public void | writeBigDecimal(BigDecimal
the value to pass to the database x)Implements java. Writes a |
| public void | writeBinaryStream(InputStream
the value to pass to the database x)Implements java. Writes a stream of uninterpreted bytes to this |
| public void | writeBlob(Blob
an object representing an SQL x)BLOB valueImplements java. Writes a |
| public void | writeBoolean(boolean
the value to pass to the database x)Implements java. Writes a |
| public void | writeByte(byte
the value to pass to the database x)Implements java. Writes a |
| public void | writeBytes(byte[]
the value to pass to the database x)Implements java. Writes an array of |
| public void | writeCharacterStream(Reader
the value to pass to the database x)Implements java. Writes a stream of Unicode characters to this
|
| public void | writeClob(Clob
an object representing an SQL x)CLOB valueImplements java. Writes a |
| public void | writeDate(Date
the value to pass to the database x)Implements java. Writes a |
| public void | writeDouble(double
the value to pass to the database x)Implements java. Writes a |
| public void | writeFloat(float
the value to pass to the database x)Implements java. Writes a |
| public void | writeInt(int
the value to pass to the database x)Implements java. Writes an |
| public void | writeLong(long
the value to pass to the database x)Implements java. Writes a |
| public void | writeNClob(NClob
a x)NClob object representing data of an SQL
NCLOB valueImplements java. Writes an SQL |
| public void | writeNString(String
the value to pass to the database x)Implements java. Writes the next attribute to the stream as a |
| public void | writeObject(SQLData
the object representing data of an SQL structured or
distinct type x)Implements java. Writes to the stream the data contained in the given
|
| public void | writeRef(Ref
an object representing an SQL x)REF valueImplements java. Writes a |
| public void | writeRowId(RowId
a x)RowId object representing data of an SQL
ROWID valueImplements java. Writes an SQL |
| public void | writeShort(short
the value to pass to the database x)Implements java. Writes a |
| public void | writeSQLXML(SQLXML
a x)SQLXML object representing data of an SQL
XML valueImplements java. Writes an SQL |
| public void | writeString(String
the value to pass to the database x)Implements java. Writes a |
| public void | writeStruct(Struct
an object representing the attributes of an SQL structured type x)Implements java. Writes a |
| public void | writeTime(Time
the value to pass to the database x)Implements java. Writes a |
| public void | writeTimestamp(Timestamp
the value to pass to the database x)Implements java. Writes a |
| public void | writeURL(URL
an object representing a SQL url)DATALINK valueImplements java. Writes an |
| attribs | back to summary |
|---|---|
| private Vector<E> attribs A reference to an existing vector that
contains the attributes of a
| |
| map | back to summary |
|---|---|
| private Map<K, V> map The type map the driver supplies to a newly created
| |
| SQLOutputImpl | back to summary |
|---|---|
| public SQLOutputImpl(Vector<?> attributes, Map<String, ?> map) throws SQLException Creates a new
| |
| writeArray | back to summary |
|---|---|
| public void writeArray(Array x) throws SQLException Implements java. Writes an
| |
| writeAsciiStream | back to summary |
|---|---|
| public void writeAsciiStream(InputStream x) throws SQLException Implements java. Writes a stream of ASCII characters to this
| |
| writeBigDecimal | back to summary |
|---|---|
| public void writeBigDecimal(BigDecimal x) throws SQLException Implements java. Writes a
| |
| writeBinaryStream | back to summary |
|---|---|
| public void writeBinaryStream(InputStream x) throws SQLException Implements java. Writes a stream of uninterpreted bytes to this
| |
| writeBlob | back to summary |
|---|---|
| public void writeBlob(Blob x) throws SQLException Implements java. Writes a
| |
| writeBoolean | back to summary |
|---|---|
| public void writeBoolean(boolean x) throws SQLException Implements java. Writes a
| |
| writeByte | back to summary |
|---|---|
| public void writeByte(byte x) throws SQLException Implements java. Writes a
| |
| writeBytes | back to summary |
|---|---|
| public void writeBytes(byte[] x) throws SQLException Implements java. Writes an array of
| |
| writeCharacterStream | back to summary |
|---|---|
| public void writeCharacterStream(Reader x) throws SQLException Implements java. Writes a stream of Unicode characters to this
| |
| writeClob | back to summary |
|---|---|
| public void writeClob(Clob x) throws SQLException Implements java. Writes a
| |
| writeDate | back to summary |
|---|---|
| public void writeDate(Date x) throws SQLException Implements java. Writes a
| |
| writeDouble | back to summary |
|---|---|
| public void writeDouble(double x) throws SQLException Implements java. Writes a
| |
| writeFloat | back to summary |
|---|---|
| public void writeFloat(float x) throws SQLException Implements java. Writes a
| |
| writeInt | back to summary |
|---|---|
| public void writeInt(int x) throws SQLException Implements java. Writes an
| |
| writeLong | back to summary |
|---|---|
| public void writeLong(long x) throws SQLException Implements java. Writes a
| |
| writeNClob | back to summary |
|---|---|
| public void writeNClob(NClob x) throws SQLException Implements java. Writes an SQL
| |
| writeNString | back to summary |
|---|---|
| public void writeNString(String x) throws SQLException Implements java. Writes the next attribute to the stream as a
| |
| writeObject | back to summary |
|---|---|
| public void writeObject(SQLData x) throws SQLException Implements java. Writes to the stream the data contained in the given
The implementation of the method
| |
| writeRef | back to summary |
|---|---|
| public void writeRef(Ref x) throws SQLException Implements java. Writes a
| |
| writeRowId | back to summary |
|---|---|
| public void writeRowId(RowId x) throws SQLException Implements java. Writes an SQL
| |
| writeShort | back to summary |
|---|---|
| public void writeShort(short x) throws SQLException Implements java. Writes a
| |
| writeSQLXML | back to summary |
|---|---|
| public void writeSQLXML(SQLXML x) throws SQLException Implements java. Writes an SQL
| |
| writeString | back to summary |
|---|---|
| public void writeString(String x) throws SQLException Implements java. Writes a
| |
| writeStruct | back to summary |
|---|---|
| public void writeStruct(Struct x) throws SQLException Implements java. Writes a
This method should be used when an SQL structured type has been
mapped to a
| |
| writeTime | back to summary |
|---|---|
| public void writeTime(Time x) throws SQLException Implements java. Writes a
| |
| writeTimestamp | back to summary |
|---|---|
| public void writeTimestamp(Timestamp x) throws SQLException Implements java. Writes a
| |
| writeURL | back to summary |
|---|---|
| public void writeURL(URL url) throws SQLException Implements java. Writes an
| |