|
Oracle JDBC API Reference 11g Release 2 ("11.2.0.3.0") |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ORAData
Oracle interface for customized user-defined types.
This is an interface for encapsulating SQL types into Java types of the user's choice. User's class, which implements the ORAData interface, can present a customized version of the SQL type.
One can have lots of different classes implementing CustomDatum for a particular SQL type but generally each type implementing ORAData will be used for only a single SQL type.
For use as a SQL type, a class that implements ORAData must contain the following static fields and methods:
public static ORADataFactory getFactory() { ... } public static final int _SQL_TYPECODE = oracle.jdbc.OracleTypes....; // for STRUCT and ARRAY public static final String _SQL_NAME = "..."; // for REF and ARRAY public static final String _SQL_BASETYPE = "...";
This interface is the replacement of the old CustomDatum interface that has been deprecated in the Oracle 9i release.
oracle.jdbc.ORADataFactory
,
oracle.jdbc.PreparedStatement
,
SQLData
Method Summary | |
---|---|
Datum |
toDatum(java.sql.Connection c)
Extract an oracle.sql.Datum object. |
Method Detail |
---|
Datum toDatum(java.sql.Connection c) throws java.sql.SQLException
This method is invoked by setORAData() to extract a Datum. The implementation of this method must return the correct type of Datum.
Although most implementation will ignore the connection, it is occassionally needed. For example, if the class embeds CHAR attributes, connection may be needed to determine the database character set.
c
- The connection into which the value is being sent.
java.sql.SQLException
- if an error occurred.
|
Oracle JDBC API Reference 11g Release 2 ("11.2.0.3.0") |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |