Use com.progress.open4gl.InputResultSet
- Last Updated: January 16, 2024
- 2 minute read
- OpenEdge
- Version 12.8
- Documentation
The com.progress.open4gl.InputResultSet abstract
class implements the java.sql.ResultSet interface
except for two methods that you must implement in your extended
class. The proxy calls back through these methods to get the data
to pass to ABL.
There are two methods you must implement. The first is:
Syntax
|
This advances the ResultSet cursor to the next
row. The cursor always is initially positioned before the first
row of the ResultSet; as a result, the first time next() is
called the cursor moves to the first row. It returns false when there
are no more rows.
ResultSet
cursor is positioned before the first row if you plan to pass the InputResultSet as an input parameter, and you want the receiving context to have
access to all rows from the beginning of the InputResultSet.
Only rows after the current cursor position are passed to the application server.The second method is:
Syntax
|
- columnNum
- Obtains the value of an individual column as an object. The
columnNumparameter is a 1-based index indicating which column value to get. This must correctly map to the order in which the temp-table fields are defined in the ABL procedure.If there is an array field in the temp-table, it is treated as a flattened set of columns by this method. On input, since the proxy is calling back to the client, there can be only one way to get the data, and that one way assumes the flat column model native to the standard JDBC
ResultSet.
Your implementation of these methods can differ depending on the data source for the input temp-table. For example, the data might come from an in-memory vector or be read from a file. The exact implementation, therefore, depends on the specific requirements of your application.
You can use the following methods with the InputResultSet class to omit all schema information when marshaling data from the
Java Open Client to the application server. Using these methods suppresses index descriptions
and all field information and aids in faster transmission of data, thereby increasing the
performance of your application. You can use these methods when the receiving side knows the
schema definition for the table and validation is not necessary.
The following method tells the proxy to marshal the specified InputResultSet from the Java client to the application server
without schema information, when flag is set to true:
Syntax
|
The corresponding ABL temp-table on the application server must have the same
schema as the ResultSet on the client.
The Java Open Client generates a RunTime4GLErrorException when:
- The ABL temp-table's schema does not match the incoming data from the Java client
-
flag is set to
trueand theInputResultSetis passed to aTABLE-HANDLEparameter on the application server
The following method on the InputResultSet
returns true if the proxy will not marshal schema information
to the application server; it returns false if it will
marshall information:
Syntax
|