Work with opaque types

An opaque data type is an atomic data type that you define to extend the database server. The database server has no information about the opaque data type until you provide routines that describe it.

Extending the database server also frequently requires that you create user-defined routines (UDRs) to support the extensions. A UDR is a routine that you create that can be invoked in an SQL statement, by the database server, or from another UDR. UDRs can be part of opaque types, or they can be separate.

The JDBC 3.0 standard provides the java.sql.SQLInput and java.sql.SQLOutput methods to access opaque types. The definition of these interfaces is extended to fully support HCL OneDB™ fixed binary and variable binary opaque types. This extension includes the following interfaces:
  • IfmxUdtSQLInput
  • IfmxUdtSQLOutput
In addition, the following classes simplify creating Java™ opaque types and UDRs in the database server from a JDBC client application:
  • UDTManager
  • UDTMetaData
  • UDRManager
  • UDRMetaData

The UDTManager and UDRManager classes provide an infrastructure for mapping client-side Java classes as opaque data types and UDRs and storing their instances in the database.

This facility works only in client-side JDBC. For details about the features and limitations of server-side JDBC, see the HCL® J/Foundation Developer's Guide.

For detailed information about opaque types and UDRs, see the following publications:
  • HCL OneDB User-Defined Routines and Data Types Developer's Guide discusses the terms and concepts about opaque types and UDRs that you need to use the information in this section, including the internal data structure, support functions, and implicit and explicit casts.
  • The HCL J/Foundation Developer's Guide discusses information specific to writing UDRs in Java.