Class ProDataRelationMetaData

java.lang.Object
com.progress.open4gl.dynamicapi.DataRelationMetaData
com.progress.open4gl.ProDataRelationMetaData
All Implemented Interfaces:
Serializable

public class ProDataRelationMetaData extends 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.
See Also:
  • Constructor Details

    • ProDataRelationMetaData

      public ProDataRelationMetaData()
    • ProDataRelationMetaData

      public ProDataRelationMetaData(String linkname, ProDataObjectMetaData parentMetaData, ProDataObjectMetaData childMetaData)
      Creates ProDataRelationMetaData object
      Parameters:
      linkname -
      parentMetaData - Represents parent ProDataObject
      childMetaData - Represents child ProDataObject
    • ProDataRelationMetaData

      public ProDataRelationMetaData(String linkname, int parentIx, int childIx, int numPairs, String pairsList)
      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(String linkname, int parentIx, int childIx, int numPairs, String pairsList, int flag, String extendedProperties)
    • ProDataRelationMetaData

      public ProDataRelationMetaData(ProDataRelationMetaData mdata)
  • Method Details

    • addSchemaInfoToClass

      public void addSchemaInfoToClass(commonj.sdo.Type[] typeList, ProDataGraphMetaData dgMetaData)
    • 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
    • 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
    • getParentColumns

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

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

      protected int getNumPairs()
    • setNumPairs

      protected void setNumPairs(int value)
    • hasLoadedChildren

      protected boolean hasLoadedChildren(ProDataObject pdo)
    • setHasLoadedChildren

      protected void setHasLoadedChildren(ProDataObject pdo)
    • getRelationName

      public String getRelationName()
      Returns:
      Data Relation's name
    • setRelationName

      protected void setRelationName(String value)
    • getExtendedProperties

      protected String getExtendedProperties()
    • setExtendedProperties

      protected void setExtendedProperties(String value)
    • getParentRefColIdx

      protected int getParentRefColIdx()
    • getChildIx

      protected int getChildIx()
    • setChildIx

      protected void setChildIx(int value)
    • getParentIx

      protected int getParentIx()
    • setParentIx

      protected void setParentIx(int value)
    • getChildRefColIdx

      protected int getChildRefColIdx()
    • fillChildRelations

      protected void fillChildRelations(List<ProDataObject> parentDOList, List<ProDataObject> childDOList)
      Overrides:
      fillChildRelations in class DataRelationMetaData
    • writeRelationXML

      protected void writeRelationXML(Document document, Element appInfoElement)
    • writeKeyRefXML

      protected void writeKeyRefXML(Document document, Element outerElement, String uniqueIndexName)