com.progress.open4gl
Class ProDataRelationMetaData

java.lang.Object
  extended bycom.progress.open4gl.dynamicapi.DataRelationMetaData
      extended bycom.progress.open4gl.ProDataRelationMetaData

public class ProDataRelationMetaData
extends com.progress.open4gl.dynamicapi.DataRelationMetaData

Schema info that defines the relationship between parent and child ProDataObjects within a ProDataGraph. It maps to a DataRelation object in the 4GL DataSet. It names the fields in the parent and child ProDataObjects that form their primary-foreign key relationship.


Field Summary
 
Fields inherited from class com.progress.open4gl.dynamicapi.DataRelationMetaData
m_ChildIx, m_ChildMetaData, m_ChildRef, m_ChildRefColIdx, m_ExtendedProperties, m_Flag, m_LinkName, m_NumPairs, m_PairsArray, m_PairsIdxArray, m_PairsList, m_ParentIx, m_ParentMetaData, m_ParentRef, m_ParentRefColIdx
 
Constructor Summary
ProDataRelationMetaData()
           
ProDataRelationMetaData(int childIx, int parentIx, int flag, int numPairs, java.lang.String pairsList, java.lang.String linkname, java.lang.String extendedProperties)
           
ProDataRelationMetaData(int childIx, int parentIx, int numPairs, java.lang.String pairsList, java.lang.String linkname)
          Creates ProDataRelationMetaData object
ProDataRelationMetaData(ProDataRelationMetaData mdata)
           
ProDataRelationMetaData(java.lang.String linkname, ProDataObjectMetaData parentMetaData, ProDataObjectMetaData childMetaData)
          Creates ProDataRelationMetaData object
 
Method Summary
protected  void addSchemaInfoToClass(EClass[] ttClassList, ProDataGraphMetaData dgMetaData)
           
protected  void fillChildRelations(java.util.List parentDOList, java.util.List childDOList)
           
 int[] getChildColumns()
           
protected  int getChildIx()
           
protected  int getChildRefColIdx()
           
protected  java.lang.String getExtendedProperties()
           
protected  int getNumPairs()
           
 int[] getParentColumns()
           
protected  int getParentIx()
           
protected  int getParentRefColIdx()
           
 java.lang.String getRelationName()
           
protected  void setChildIx(int value)
           
 void setColumns(int[] pColIdx, int[] cColIdx)
          Specifies mulitple indexes for the parent and child ProDataObjects that forms primary-foreign key relationship.
 void setColumns(int pColIdx, int cColIdx)
          Specifies the index for the parent ProDataObject and child ProDataObject that forms primary-foreign key relationship.
protected  void setExtendedProperties(java.lang.String value)
           
protected  void setNumPairs(int value)
           
protected  void setParentIx(int value)
           
protected  void setRelationName(java.lang.String value)
           
 
Methods inherited from class com.progress.open4gl.dynamicapi.DataRelationMetaData
getChildRef, getChildTable, getFlag, getPair, getPair, getPairIdx, getPairsList, getParentRef, getParentTable, setFlag, setPairsIndexInfo, setPairsList, setTableIxs, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProDataRelationMetaData

public ProDataRelationMetaData()

ProDataRelationMetaData

public ProDataRelationMetaData(int childIx,
                               int parentIx,
                               int flag,
                               int numPairs,
                               java.lang.String pairsList,
                               java.lang.String linkname,
                               java.lang.String extendedProperties)

ProDataRelationMetaData

public ProDataRelationMetaData(int childIx,
                               int parentIx,
                               int numPairs,
                               java.lang.String pairsList,
                               java.lang.String linkname)
Creates ProDataRelationMetaData object

Parameters:
childIx - 0-based child table index
parentIx - 0-based parent table index
numPairs - Number of column pairs that represent relationship
pairsList - Comma-separated string of all the column pairs where the parent's column name is followed by its matching child's column name.
linkname - Name of Data Relation

ProDataRelationMetaData

public ProDataRelationMetaData(ProDataRelationMetaData mdata)

ProDataRelationMetaData

public ProDataRelationMetaData(java.lang.String linkname,
                               ProDataObjectMetaData parentMetaData,
                               ProDataObjectMetaData childMetaData)
Creates ProDataRelationMetaData object

Parameters:
linkname -
parentMetaData - Represents parent ProDataObject
childMetaData - Represents child ProDataObject
Method Detail

addSchemaInfoToClass

protected void addSchemaInfoToClass(EClass[] ttClassList,
                                    ProDataGraphMetaData dgMetaData)

fillChildRelations

protected void fillChildRelations(java.util.List parentDOList,
                                  java.util.List childDOList)

getChildColumns

public int[] getChildColumns()
                      throws ProDataException
Returns:
The indexes of the child's columns
Throws:
ProDataException

getChildIx

protected int getChildIx()

getChildRefColIdx

protected int getChildRefColIdx()

getExtendedProperties

protected java.lang.String getExtendedProperties()

getNumPairs

protected int getNumPairs()

getParentColumns

public int[] getParentColumns()
                       throws ProDataException
Returns:
The indexes of the parent's columns
Throws:
ProDataException

getParentIx

protected int getParentIx()

getParentRefColIdx

protected int getParentRefColIdx()

getRelationName

public java.lang.String getRelationName()
Returns:
Data Relation's name

setChildIx

protected void setChildIx(int value)

setColumns

public void setColumns(int[] pColIdx,
                       int[] cColIdx)
                throws ProDataException
Specifies mulitple indexes for the parent and child ProDataObjects that forms primary-foreign key relationship.

Parameters:
pColIdx - Array of 0-based parent property indexes
cColIdx - Array of 0-based child property indexes
Throws:
ProDataException

setColumns

public void setColumns(int pColIdx,
                       int cColIdx)
                throws ProDataException
Specifies the index for the parent ProDataObject and child ProDataObject that forms primary-foreign key relationship.

Parameters:
pColIdx - 0-based parent property index
cColIdx - 0-based child property index
Throws:
ProDataException

setExtendedProperties

protected void setExtendedProperties(java.lang.String value)

setNumPairs

protected void setNumPairs(int value)

setParentIx

protected void setParentIx(int value)

setRelationName

protected void setRelationName(java.lang.String value)