Release 10.1A: OpenEdge Development:
Java Open Clients

> ## Meta data methods

> Meta data about the SDOResultSet is exposed through the `com.progress.open4gl.SDOResultSetMetaData` interface. An object that implements SDOResultSetMetaData is returned using the `SDOResultSet.getMetaData()` method. The interface, `com.progress.open4gl.SDOResultSetMetaData`, is an extended subset of the standard JDBC 2 `java.sql.ResultSetMetaData` interface.

> SDOResultSetMetaData works with both JDK 1.1.x and JDK 1.2; therefore, much of the Java 1.2 functionality (standard JDBC ResultSetMetaData interface) is supported even with JDK 1.1.x.

> ##### JDBC 2 meta data methods

> The supported standard JDBC 2 methods include the ones listed in Table 9–6.

> Table 9–6: Standard JDBC meta data methods
> Method | Description
> --- | ---
>     int getColumnCount()
> | The number of columns in the SDOResultSet.
>     int getColumnDisplaySize
>     (int columnIndex)
> | The maximum display size width of this column in characters.
>     String getColumnLabel
>     (int columnIndex)
> | The 4GL dictionary label for this column.
>     String getColumnName
>     (int columnIndex)
> | The`` name`` of the column.
>     int getColumnType
>     (int columnIndex)
> | The SQL type of the column.
>     String getColumnTypeName
>     (int columnIndex)
> | The 4GL data type name of the column.
>     String getTableName
>     (int columnIndex)
> | The table name for this column. This is especially useful where you want to determine the original table for a column participating in a table join.
>     int isNullable
>     (int columnIndex)
> | 0 if this column is mandatory (does not allow the Unknown value (`?`)); 1 if it is not mandatory (allows the Unknown value (`?`)).
>     boolean isReadOnly
>     (int columnIndex)
> | True if the column is an SDOResultSet read-only column.
>     boolean isWritable
>     (int columnIndex)
> | False if the column is an SDOResultSet read-only column.

> ##### Nonstandard meta data methods [extension]

> SDOResultSetMetaData extensions to the standard interface include the following features:

> - Methods that expose meta data information that exists in the schema of the OpenEdge database but does not have an equivalent standard (for example, `getColumnInitialValue()`).

> - Methods that expose 4GL-to-Java mapping information (for example, `getColumnJavaTypeName()`).

> Note: The SDOResultSetMetaData interface also hides SmartDataObject system fields. SmartDataObject system fields are fields (such as `changedFieldsList`) that are used only by the SmartDataObject implementation code. They have no meaning for the Open Client and should not be accessed directly.

> Table 9–7 lists the supported nonstandard SDOResultSetMetaData methods.

> Table 9–7: Nonstandard SDOResultSetMetaData methods
> Method | Description
> --- | ---
>     String getColumnFormat
>     (int column) [Extension]
> | The 4GL dictionary display format.
>     String getColumnInitalValue
>     (int column) [Extension]
> | The 4GL dictionary initial value as a string.
>     String getColumnJavaTypeName
>     (int column) [Extension]
> | The Java type name.
>     int getColumnProType
>     (int column) [Extension]
> | The 4GL data type number. The return value corresponds to one of the class constants defined in `com.progress.open4gl.Parameter`. For more information, see Chapter 4, " Passing Parameters."
>     String getColumnValExp
>     (int column) [Extension]
> | The 4GL dictionary validation expression.
>     String getColumnValMsg
>     (int column) [Extension]
> | The 4GL dictionary validation message.

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095