Show TOC

Handling the OutputLocate this document in the navigation structure

Use

For a Function

IInteraction.execute returns MappedRecord as output.

Using MappedRecord can retrieve output parameter values by parameter name: MappedRecord.get(paramname) , which returns an object. There are four possibilities of output handling:

  1. If the parameter type is a primitive, you get an object, such as String, Integer, Float .

  2. If the parameter type is tabular, IRecordset is returned. ( IRecordset is parallel to the standard java.sql.resultset .)

    Note

    Inside IRecordset , each column may also be of one of these four types.

  3. If the parameter type is array, then it returns an array of objects of one of these four types.

  4. If the output is a set of objects where each of them may be one of these four types, IRecordset is returned.

    Note

    The following explanation applies to case 2 and 4:

    IRecord and IRecordset are both extensions of IAbstractRecord (which is also similar to java.sql.resultset) . IAbstractRecord exposes get methods to a specific type of object, such as getInteger ; it also expose a general return pipe, such as getObject . All get methods can be invoked by column name or index.

    IAbstractRecord can also expose the metadata of each column by invoking retrieveMetaData . This may be useful before invoking other get methods.

    IRecordset can use a set of methods, such as next() to manipulate cursor position. This is also similar to java.sql.resultset .

For a Query

INativeQuery returns an object, the type of which depends on the EIS. For example, an RDBMS using the JDBC connector returns java.sql.resultset .

execute(IOperation operation) returns an integer indicating a number of rows. Iterate using IExection methods to retrieve the entire record set.

See the Javadoc for the portal and portal runtime APIs at http://help.sap.com/javadocs. The packages related to the connector framework start with com.sapportals.connector* .