public interface HasCreateFromConnectionMethods
Modifier and Type | Method and Description |
---|---|
Array |
createArrayOf(String typeName,
Object[] elements)
Factory method for creating Array objects.
|
Blob |
createBlob()
Constructs an object that implements the
Blob interface. |
Clob |
createClob()
Constructs an object that implements the
Clob interface. |
NClob |
createNClob()
Constructs an object that implements the
NClob interface. |
SQLXML |
createSQLXML()
Constructs an object that implements the
SQLXML interface. |
Struct |
createStruct(String typeName,
Object[] attributes)
Factory method for creating Struct objects.
|
Clob createClob() throws SQLException
Clob
interface. The
object returned initially contains no data. The
setAsciiStream
, setCharacterStream
and
setString
methods of the Clob
interface may be
used to add data to the Clob
.Clob
interfaceSQLException
- if an object that implements the Clob
interface can not be constructed, this method is called on a closed
connection or a database access error occurs.SQLFeatureNotSupportedException
- if the JDBC driver does not
support this data typeBlob createBlob() throws SQLException
Blob
interface. The
object returned initially contains no data. The
setBinaryStream
and setBytes
methods of the
Blob
interface may be used to add data to the
Blob
.Blob
interfaceSQLException
- if an object that implements the Blob
interface can not be constructed, this method is called on a closed
connection or a database access error occurs.SQLFeatureNotSupportedException
- if the JDBC driver does not
support this data typeNClob createNClob() throws SQLException
NClob
interface.
The object returned initially contains no data. The
setAsciiStream
, setCharacterStream
and
setString
methods of the NClob
interface may be
used to add data to the NClob
.NClob
interfaceSQLException
- if an object that implements the NClob
interface can not be constructed, this method is called on a closed
connection or a database access error occurs.SQLFeatureNotSupportedException
- if the JDBC driver does not
support this data typeSQLXML createSQLXML() throws SQLException
SQLXML
interface.
The object returned initially contains no data. The
createXmlStreamWriter
object and setString
method of the SQLXML
interface may be used to add data to
the SQLXML
object.SQLXML
interfaceSQLException
- if an object that implements the SQLXML
interface can not be constructed, this method is called on a closed
connection or a database access error occurs.SQLFeatureNotSupportedException
- if the JDBC driver does not
support this data typeArray createArrayOf(String typeName, Object[] elements) throws SQLException
Note: When createArrayOf
is used to create an array
object that maps to a primitive data type, then it is
implementation-defined whether the Array
object is an array
of that primitive data type or an array of Object
.
Note: The JDBC driver is responsible for mapping the elements
Object
array to the default JDBC SQL type defined in
java.sql.Types for the given class of Object
. The default
mapping is specified in Appendix B of the JDBC specification. If the
resulting JDBC type is not the appropriate type for the given typeName
then it is implementation defined whether an SQLException
is
thrown or the driver supports the resulting conversion.
typeName
- the SQL name of the type the elements of the array map
to. The typeName is a database-specific name which may be the name of a
built-in type, a user-defined type or a standard SQL type supported by
this database. This is the value returned by
Array.getBaseTypeName
elements
- the elements that populate the returned objectSQLException
- if a database error occurs, the JDBC type is not
appropriate for the typeName and the conversion is not supported, the
typeName is null or this method is called on a closed connectionSQLFeatureNotSupportedException
- if the JDBC driver does not
support this data typeStruct createStruct(String typeName, Object[] attributes) throws SQLException
typeName
- the SQL type name of the SQL structured type that this
Struct
object maps to. The typeName is the name of a
user-defined type that has been defined for this database. It is the
value returned by Struct.getSQLTypeName
.attributes
- the attributes that populate the returned objectSQLException
- if a database error occurs, the typeName is null or
this method is called on a closed connectionSQLFeatureNotSupportedException
- if the JDBC driver does not
support this data typeCopyright © 2016 Speedment, Inc.. All rights reserved.