com.groupdocs.assembly.system.data

Class DataRelation

  • java.lang.Object
    • com.groupdocs.assembly.system.data.DataRelation


  • public final class DataRelation
    extends java.lang.Object
    Represents a parent/child relationship between two DataTable objects.
    • Constructor Detail

      • DataRelation

        public DataRelation(java.lang.String relationName,
                            DataTable parentTable,
                            DataTable childTable,
                            java.lang.String[] parentColumnNames,
                            java.lang.String[] childColumnNames)
        Initializes a new instance of the DataRelation class using the specified name, parent and child tables, matched arrays of parent and child columns.
        Parameters:
        relationName - The name of the DataRelation. If null or an empty string (""), a default name will be given when the created object is added to the DataRelationCollection.
        parentTable - The parent table in the relationship.
        childTable - The child table in the relationship.
        parentColumnNames - The parent DataColumn's name in the relationship.
        childColumnNames - The child DataColumn;s in the relationship.
      • DataRelation

        public DataRelation(java.lang.String relationName,
                            DataColumn[] parentColumns,
                            DataColumn[] childColumns,
                            boolean createConstraints)
        Initializes a new instance of the DataRelation class using the specified name, matched arrays of parent and child DataColumn objects, and value that indicates whether to create constraints.
        Parameters:
        relationName - The name of the relation. If null or an empty string (""), a default name will be given when the created object is added to the DataRelationCollection.
        parentColumns - An array of parent DataColumn objects.
        childColumns - An array of child DataColumn objects.
        createConstraints - A value that indicates whether to create constraints. true, if constraints are created. Otherwise, false.
      • DataRelation

        public DataRelation(java.lang.String relationName,
                            DataColumn parentColumn,
                            DataColumn childColumn,
                            boolean createConstraints)
        Initializes a new instance of the DataRelation class using the specified name, parent and child DataColumn objects, and a value that indicates whether to create constraints.
        Parameters:
        relationName - The name of the relation. If null or an empty string (""), a default name will be given when the created object is added to the DataRelationCollection.
        parentColumn - The parent DataColumn in the relation.
        childColumn - The child DataColumn in the relation.
        createConstraints - A value that indicates whether constraints are created. true, if constraints are created. Otherwise, false.
      • DataRelation

        public DataRelation(java.lang.String relationName,
                            DataColumn parentColumn,
                            DataColumn childColumn)
        Initializes a new instance of the DataRelation class using the specified DataRelation name, and parent and child DataColumn objects.
        Parameters:
        relationName - The name of the DataRelation. If null or an empty string (""), a default name will be given when the created object is added to the DataRelationCollection.
        parentColumn - The parent DataColumn in the relationship.
        childColumn - The child DataColumn in the relationship.
    • Method Detail

      • getParentTableName

        public final java.lang.String getParentTableName()
        Returns:
        the parent DataTable's name of this DataRelation.
      • getChildTableName

        public final java.lang.String getChildTableName()
        Returns:
        the child DataTable's name of this DataRelation.
      • getChildTable

        public final DataTable getChildTable()
        Gets the child table of this relation.
        Returns:
        A DataTable that is the child table of the relation.
      • getParentColumnNames

        public final java.lang.String[] getParentColumnNames()
        Returns:
        the parent DataColumn names of this relation.
      • getChildColumnNames

        public final java.lang.String[] getChildColumnNames()
        Returns:
        the child DataColumn names of this relation.
      • getChildColumns

        public final DataColumn[] getChildColumns()
        Gets the child DataColumn objects of this relation.
        Returns:
        An array of DataColumn objects.
      • setNested

        public final void setNested(boolean value)
        Sets a value that indicates whether DataRelation objects are nested.
        Parameters:
        value - true, if DataRelation objects are nested; otherwise, false.
      • setParentKeyConstraint

        public final void setParentKeyConstraint(UniqueConstraint parentKeyConstraint)
      • setChildKeyConstraint

        public final void setChildKeyConstraint(ForeignKeyConstraint childKeyConstraint)
      • getChildKey

        public final DataKey getChildKey()
      • getParentKey

        public final DataKey getParentKey()
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public final boolean equals(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object