Try OpenEdge Now
skip to main content
Java Open Clients
Using the Open Client Java OpenAPI to Directly Access the AppServer : Setting up parameters : Defining the schema for a ProDataSet parameter : Defining the data-relations for the ProDataGraphMetaData object
 
Defining the data-relations for the ProDataGraphMetaData object
You must define any data-relations that are defined for the ABL ProDataSet using com.progress.open4gl.ProDataRelationMetaData objects. You can create a ProDataRelationMetaData object for each data-relation between a parent and child temp-table using the following constructor:
Syntax
public ProDataRelationMetaData(String dataRelationName, int parentIx,
                               int childIx, int numPairs, String pairsList)
dataRelationName
Specifies the name of the ProDataRelationMetaData object.
parentIx
Specifies a 0-based index to a parent temp-table (ProDataObject collection) that corresponds to an index into the array of table names returned by the ProDataGraphMetaData getTableNames() method.
childIx
Specifies a 0-based index to a child temp-table (ProDataObject collection) that corresponds to an index into the array of table names returned by the ProDataGraphMetaData getTableNames() method.
numPairs
Specifies the number of column property pairs (key field pairs) that represent this relationship. This allows multiple fields to represent a key relationship between the parent and child temp-table.
pairsList
Specifies a String containing a comma-separated list of field names. The list consists of numPairs field pairs, where the parent temp-table field name for each pair is followed by its matching child temp-table field name. The data types of the named parent and child temp-table field pairs must be comparable.
Note: For the equivalent ProDataRelationMetaData() constructor in the .NET OpenAPI, the order of parent and child field names in the pairsList parameter is reversed. For more information, see OpenEdge Development: .NET Open Clients.
You can add each data-relation definition to the ProDataGraphMetaData object using the following method:
Syntax
public void addDataRelation(ProDataRelationMetaData drMetaData)
drMetaData
Specifies a data-relation to include in the ProDataGraphMetaData object.