public class STRUCT extends DatumWithConnection implements oracle.jdbc.internal.OracleStruct
Struct
interface for declaration instead of using
concrete class oracle.sql.STRUCT. java.sql.Struct has methods declared
for all opertions. For Oracle specific methods use the interface
OracleStruct
.
Obtaining a Struct from the ResultSet
java.sql.Struct struct = resultSet.getStruct(...);
Creating a Struct using factory method Connection.createStruct(java.lang.String, java.lang.Object[])
java.sql.Struct struct = connection.createStruct(...);
Constructor and Description |
---|
STRUCT(StructDescriptor type,
Connection conn,
Map attrList)
Deprecated.
|
STRUCT(StructDescriptor type,
Connection conn,
Object[] attributes)
Deprecated.
Constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
dump()
Deprecated.
Create a string which show the contents of this Object and
of all its component parts.
|
static void |
dump(Object o,
PrintStream ps)
Deprecated.
|
static void |
dump(Object o,
PrintWriter pw)
Deprecated.
|
Object[] |
getAttributes()
Deprecated.
Implements the Struct interface function.
|
Object[] |
getAttributes(Map map)
Deprecated.
Implements the Struct interface function.
|
boolean |
getAutoBuffering()
Deprecated.
Performance hint.
|
StructDescriptor |
getDescriptor()
Deprecated.
Oracle extension.
|
Connection |
getJavaSqlConnection()
Deprecated.
Oracle extension
Return the java.sql.Connection associated with the
receiver.
|
Datum[] |
getOracleAttributes()
Deprecated.
Oracle extension.
|
OracleDataFactory |
getOracleDataFactory(Hashtable map,
String classname)
Deprecated.
|
OracleTypeMetaData |
getOracleMetaData()
Deprecated.
Return the type data for this object
|
String |
getSQLTypeName()
Deprecated.
Implements the Struct interface function
Retrieves the SQL type name of the SQL structured type
that this
Struct object represents. |
boolean |
isConvertibleTo(Class jClass)
Deprecated.
Determines if datum object can be converted to a particular class
|
void |
setAutoBuffering(boolean enable)
Deprecated.
Performance hint.
|
Object |
toJdbc()
Deprecated.
Oracle extension.
|
Object |
toJdbc(Map map)
Deprecated.
Oracle extension.
|
assertNotNull, assertNotNull, getConnection, getConnectionDuringExceptionHandling, getOracleConnection
asciiStreamValue, bigDecimalValue, binaryStreamValue, booleanValue, bytesEqual, bytesHashCode, byteValue, characterStreamValue, compareBytes, dateValue, doubleValue, equals, floatValue, getBytes, getLength, getStream, intValue, isNull, longValue, setBytes, setShareBytes, shareBytes, stringValue, stringValue, timestampValue, timestampValue, timeValue, timeValue
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
asciiStreamValue, bigDecimalValue, binaryStreamValue, booleanValue, byteValue, characterStreamValue, dateValue, doubleValue, floatValue, getBytes, getConnection, getInternalConnection, getLength, getOracleConnection, getStream, intValue, longValue, setBytes, setPhysicalConnectionOf, setShareBytes, shareBytes, stringValue, stringValue, timestampValue, timestampValue, timeValue, timeValue
public STRUCT(StructDescriptor type, Connection conn, Object[] attributes) throws SQLException
type
- the SQLStructType used to convert the type toattributes
- the array specifying the attributes to be
converted to raw bytes.SQLException
oracle.sql.SQLStructType
public STRUCT(StructDescriptor type, Connection conn, Map attrList) throws SQLException
SQLException
public String getSQLTypeName() throws SQLException
Struct
object represents.getSQLTypeName
in interface Struct
Struct
object
is the generic representationSQLException
- if a database access error occurspublic Object[] getAttributes() throws SQLException
Struct
object represents.
Each call returns a fresh array.
This method uses the type map associated with the
connection for customizations of the type mappings.
If there is no
entry in the connection's type map that matches the structured
type that this Struct
object represents,
the driver uses the standard mapping.
Conceptually, this method calls the method
getObject
on each attribute
of the structured type and returns a Java array containing
the result.
getAttributes
in interface Struct
SQLException
- if a database access error occurspublic Object[] getAttributes(Map map) throws SQLException
Struct
object represents.
Each call returns a fresh array.
This method uses the given type map
for customizations of the type mappings.
If there is no
entry in the given type map that matches the structured
type that this Struct
object represents,
the driver uses the standard mapping.
Conceptually, this method calls the method
getObject
on each attribute
of the structured type and returns a Java array containing
the result.
getAttributes
in interface Struct
map
- a mapping of SQL type names to Java classesSQLException
- if a database access error occurspublic OracleTypeMetaData getOracleMetaData() throws SQLException
getOracleMetaData
in interface OracleStruct
SQLException
- if an error occurspublic StructDescriptor getDescriptor() throws SQLException
SQLException
public Datum[] getOracleAttributes() throws SQLException
SQLException
public Object toJdbc() throws SQLException
toJdbc
in interface oracle.jdbc.internal.OracleDatumWithConnection
toJdbc
in class Datum
SQLException
- if conversion to JDBC representation results in
an errorpublic Object toJdbc(Map map) throws SQLException
SQLException
public boolean isConvertibleTo(Class jClass)
isConvertibleTo
in interface oracle.jdbc.internal.OracleDatumWithConnection
isConvertibleTo
in class Datum
cls
- Class to convert topublic void setAutoBuffering(boolean enable) throws SQLException
enable
- - true enables auto-buffering; false disables auto-bufferingSQLException
getAutoBuffering()
public boolean getAutoBuffering() throws SQLException
SQLException
setAutoBuffering(boolean)
public OracleDataFactory getOracleDataFactory(Hashtable map, String classname) throws SQLException
SQLException
public Connection getJavaSqlConnection() throws SQLException
DatumWithConnection
getJavaSqlConnection
in interface oracle.jdbc.internal.OracleDatumWithConnection
getJavaSqlConnection
in class DatumWithConnection
SQLException
- if an error occurspublic String dump() throws SQLException
SQLException
public static void dump(Object o, PrintStream ps) throws SQLException
SQLException
public static void dump(Object o, PrintWriter pw) throws SQLException
SQLException
Copyright © 2008, 2016, Oracle. All rights reserved.