Release 10.1A: OpenEdge Development:
Java Open Clients

> ## Preparing and managing a ProDataGraph parameter

> The Progress 4GL requires a different programming model to manage `DATASET` or `DATASET-HANDLE` (static or dynamic ProDataSet) parameters. However to manage a `ProDataGraph` parameter in a Java Open Client application, you use the same programming model to map both types of ProDataSet parameters.

> ##### Parameter passing modes

> From the viewpoint of the Java Open Client, the minimum information that you must provide in a `ProDataGraph` to map a ProDataSet parameter depends on the parameter passing mode of the application service:

> - `OUTPUT` parameters — You must pass a `com.progress.open4gl.ProDataGraphHolder` object instance (see the "ProDataGraphHolder class" section). Use of this holder class is similar to holder classes for other parameter data type mappings. On output, the holder object contains a reference to a `com.progress.open4gl.ProDataGraph` object that you can access. For more information on managing a `ProDataGraph` for an `OUTPUT` ProDataSet parameter, see the "Passing a ProDataGraph as OUTPUT" section.

> - `INPUT` parameters — You must pass a `com.progress.open4gl.ProDataGraph` object instance. Before passing the `ProDataGraph`, as a minimum, you must create and initialize (or obtain) the object with a `ProDataGraphMetaData` object specifying the number and meta data of its underlying tables (ProDataObjectMetaData objects), and which must map to the ProDataSet temp-table schemas. In this meta data, you must also include `ProDataRelationMetaData` objects that map to all `DATA-RELATION` objects defined in a static ProDataSet parameter. Differences do exist for how the schema must be passed between static and dynamic ProDataSets. For more information on managing a `ProDataGraph` for an `INPUT` ProDataSet parameter, see the "Passing a ProDataGraph as INPUT or INPUT-OUTPUT" section.

> - `INPUT-OUTPUT` parameters — You must pass an instance of `com.progress.open4gl.ProDataGraphHolder` that contains a reference to a client-supplied `com.progress.open4gl.ProDataGraph` object instance (see the "ProDataGraphHolder class" section). Use of this holder class is similar to holder classes for other parameter data type mappings. The requirements for supplying the input `ProDataGraph` are the same as for passing an `INPUT` parameter. On output, the same holder object is changed to reference a `com.progress.open4gl.ProDataGraph` object that represents the ProDataSet that is passed as output. For more information on managing a `ProDataGraph` for an `INPUT-OUTPUT` ProDataSet parameter, see the "Passing a ProDataGraph as INPUT or INPUT-OUTPUT" section.

> ##### ProDataGraphHolder class

> The following class definition shows the constructor and method signatures for the `ProDataGraphHolder` class:

> Example 5–1: ProDataGraphHolder class definition
>     public class ProDataGraphHolder extends Holder
>     {
>       ProDataGraphHolder();
>       ProDataGraphHolder(com.progess.open4gl.ProDataGraph);
>       void setProDataGraphValue(com.progess.open4gl.ProDataGraph);
>       ProDataGraph getProDataGraphValue();
>       public boolean isNull();
>     }

> For more information on holder classes, see Chapter 4, " Passing Parameters."

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