oracle.sql
Class OPAQUE
java.lang.Object
|
+--oracle.sql.Datum
|
+--oracle.sql.OPAQUE
- public class OPAQUE
- extends Datum
Constructor Summary |
OPAQUE(OpaqueDescriptor type, java.sql.Connection conn, java.lang.Object value)
Constructor. |
Method Summary |
byte[] |
getBytesValue()
Return a byte array that represents the attributes into the format that is actually used in the database. |
OracleConnection |
getConnection()
Deprecated. since 9.0.0. Use getJavaSqlConnection() instead. |
OpaqueDescriptor |
getDescriptor()
Oracle extension. |
java.sql.Connection |
getJavaSqlConnection()
Oracle extension Return the java.sql.Connection associated with the receiver. |
java.lang.String |
getSQLTypeName()
Implements the Struct interface function Retrieves the SQL type name of the SQL structured type that this Struct object represents. |
java.lang.Object |
getValue()
Return the Opaque value. |
boolean |
isConvertibleTo(java.lang.Class jClass)
Determines if datum object can be converted to a particular class |
java.lang.Object |
toJdbc()
Returns the JDBC representation of the datum object |
Methods inherited from class oracle.sql.Datum |
asciiStreamValue, bigDecimalValue, binaryStreamValue, booleanValue, byteValue, characterStreamValue, dateValue, doubleValue, equals, floatValue, getBytes, getLength, getStream, intValue, longValue, makeJdbcArray, setBytes, setShareBytes, shareBytes, stringValue, timestampValue, timeValue |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OPAQUE
public OPAQUE(OpaqueDescriptor type,
java.sql.Connection conn,
java.lang.Object value)
throws java.sql.SQLException
- Constructor. The raw bytes are computed at this time or a copy of attributes is made. In any event the caller is free to modify the array without affecting the values held in the OPAQUE.
-
- Parameters:
type
- the SQLStructType used to convert the type to
attributes
- the array specifying the attributes to be converted to raw bytes.
- See Also:
oracle.sql.SQLStructType
getSQLTypeName
public java.lang.String getSQLTypeName()
throws java.sql.SQLException
- Implements the Struct interface function Retrieves the SQL type name of the SQL structured type that this
Struct
object represents.
-
- Throws:
- java.sql.SQLException - if a database access error occurs
getDescriptor
public OpaqueDescriptor getDescriptor()
throws java.sql.SQLException
- Oracle extension. Return the OpaqueDescriptor object that contains the type information.
-
- Returns:
- the type descriptor
getJavaSqlConnection
public java.sql.Connection getJavaSqlConnection()
throws java.sql.SQLException
- Oracle extension Return the java.sql.Connection associated with the receiver. Since 9.0.0 not all Oracle JDBC connection objects are assignment compatible with oracle.jdbc.driver.OracleConnection.
-
- Returns:
- the connection
- Throws:
- java.sql.SQLException - if an error occurs
- Since:
- 9.0.0
getConnection
public OracleConnection getConnection()
throws java.sql.SQLException
- Deprecated. since 9.0.0. Use
getJavaSqlConnection()
instead.
- Oracle extension. The OracleConnection object associated with the array.
-
- Returns:
- the connection if it is assignment compatible with oracle.jdbc.driver.OracleConnection
- Throws:
- java.sql.SQLException - if the connection is not assignment compatible
getValue
public java.lang.Object getValue()
throws java.sql.SQLException
- Return the Opaque value.
-
- Returns:
- a Java object that represents the opaque value
getBytesValue
public byte[] getBytesValue()
throws java.sql.SQLException
- Return a byte array that represents the attributes into the format that is actually used in the database.
-
- Returns:
- a byte array that represents the opaque value
isConvertibleTo
public boolean isConvertibleTo(java.lang.Class jClass)
- Determines if datum object can be converted to a particular class
-
- Parameters:
cls
- Class to convert to
- Returns:
- true, if conversion to cls is permitted false, if conversion to cls is not permitted
- Overrides:
- isConvertibleTo in class Datum
toJdbc
public java.lang.Object toJdbc()
throws java.sql.SQLException
- Returns the JDBC representation of the datum object
-
- Returns:
- an object containing the JDBC value
- Throws:
- java.sql.SQLException - if conversion to JDBC representation results in an error
- Overrides:
- toJdbc in class Datum