Try OpenEdge Now
skip to main content
Java Open Clients
Accessing ABL ProDataSets : Preparing and passing ProDataSets as ProDataGraph parameters : Passing a ProDataGraph as INPUT or INPUT-OUTPUT
 

Passing a ProDataGraph as INPUT or INPUT-OUTPUT

To pass a ProDataGraph for INPUT or INPUT-OUTPUT to an application service, you must as a minimum, create a ProDataGraph that maps to the corresponding ProDataSet parameter of the application service. While the mechanisms for programming an input ProDataGraph are identical regardless of the type of ProDataSet parameter it maps to, the requirements for preparing the ProDataGraph depend on the ProDataSet parameter passing mode, data type, and requirements of the application service.
To pass a ProDataGraph when the parameter passing mode of the ProDataSet is INPUT:
1. Prepare the ProDataGaph as required. For more information, see Preparing an input ProDataGraph.
2. Pass the ProDataGraph directly as a parameter to the proxy method.By comparison, handling INPUT-OUT parameters is more complex.
To pass a ProDataGraph when the parameter passing mode of the ProDataSet is INPUT-OUTPUT:
1. Prepare the ProDataGaph as required. For more information, see Preparing an input ProDataGraph.
2. Create a ProDataGraphHolder object that includes a reference to the ProDataGraph. You can set the reference by using the constructor or by using the setProDataGraphValue() method on the holder object after you create it.
3. Pass the ProDataGraphHolder as a parameter to the proxy method.
4. Get the returned ProDataGraph from the ProDataGraphHolder using the getProDataGraphValue() method on the holder object and access it similar to an OUTPUT parameter. For more information, see Passinga ProDataGraph as OUTPUT.
For some application services, especially those that conform to the OERA, you might never have to prepare a ProDataGraph parameter with meta data. You might well receive the initial ProDataGraph as an application service OUTPUT parameter, update the ProDataGraph in your Java Open Client, and pass the modified ProDataGraph back to the application service as an INPUT-OUTPUT parameter without having to touch any meta data. For more information, see Updatinga ProDataSet.
* Preparing an input ProDataGraph
* Creating and initializing a ProDataGraph object with meta data
* Adding data to a ProDataGraph