Try OpenEdge Now
skip to main content
Java Open Clients
Accessing ABL ProDataSets : ProDataRelationMetaData class : Constructors : Creating a data-relation from selected parent and child key fields
 
Creating a data-relation from selected parent and child key fields
The following constructor creates a ProDataRelationMetaData object from column properties selected as key fields in specified parent and child tables (ProDataObject collections):

Syntax

ProDataRelationMetaData(String name, int parentIx, int childIx, int numPairs,
                        String pairsList, )
name
Specifies the name of the ProDataRelationMetaData object.
parentIx
Specifies a 0-based index to a parent ProDataObject collection that corresponds to an index into the array of table names returned by the ProDataGraphMetaDatagetTableNames( ) method.
childIx
Specifies a 0-based index to a child ProDataObject collection that corresponds to an index into the array of table names returned by the ProDataGraphMetaDatagetTableNames( ) method.
numPairs
Specifies the number of column property pairs (key field pairs) that represent this relationship.
pairsList
Specifies a String containing a comma-separated list of column property names. The list consists of numPairs column pairs, where the parent's column property name is followed by its matching child column property name. For example:
*If numPairs = 1, pairsList might contain: "pCustName,cOrderCustName" as one pair of parent and child property names
*If numPairs = 2, pairsList might contain: "pCustName,cOrderCustName,pCustBranch,cOrderBranch" as two pair of parent and child property names
The data types of the named parent and child column property pairs must be comparable.