Many of the setXXX() methods in the UDTMetaData and UDRMetaData classes have parallel getXXX() methods for obtaining characteristics of existing opaque types and UDRs.
The following table summarizes the available getXXX() methods in the UDTMetaData class. For the field parameter, 1 designates the first field in the internal data structure, 2 is the second, and so forth. For details about SQL names, see SQL Names.
Information Obtained | Method Signature | Notes |
---|---|---|
Number of fields in the internal data structure | public int getFieldCount() | Returns 0 if no fields are present |
Name of a field in the internal data structure | public
String getFieldName
int field) throws SQLException |
Returns NULL if no name exists |
Data type code of a field in the internal data structure | public
int getFieldType
(int field) throws SQLException |
Data type codes come from the class com.informix.lang.IfxTypes. Returns -1 if no data type exists |
Data type name of a field in the internal data structure | public
String getFieldTypeName
(int field) throws SQLException |
Returns NULL if no name exists |
For character type: maximum number of characters
in the field;
for date-time or interval type: encoded qualifier |
public
int getFieldLength
(int field) throws SQLException |
Returns -1 if no length was set |
SQL name of the opaque type | public String getSQLName() | Returns NULL if no name was set |
SQL name of the JAR file | public String getJarFileSQLName() | Returns NULL if no name was set |
Name of the Java class for the opaque type | public String getClassName() | If no class name was set through setClassName(), sqlname is returned (this is the default). If no SQL name was set through setSQLName(), returns NULL |
Length of a fixed-length opaque type | public int getLength() | Returns-1 if no length was set |
Alignment of an opaque type | public int getAlignment() | Returns -1 if no alignment was set
For the alignment codes, see Alignment Values. |
An array of Method objects that have been specified as support UDRs through setSupportUDR() | public Method[] getSupportUDRs() | For details about support UDRs, see the description of setSupportUDR() in Creating an Opaque Type from Existing Code. Returns NULL if no support UDRs were specified |
SQL name of a Java method that was specified as a support UDR through setSupportUDR() | public String
getSupportUDRSQLName (Method method) throws SQLException |
Returns NULL if no name was set |
To obtain information about UDRs, use the methods in the following table.