com.groupdocs.assembly.system.data

Class DataRelationCollection

  • java.lang.Object
    • com.groupdocs.assembly.system.data.DataRelationCollection
  • All Implemented Interfaces:
    java.lang.Iterable


    public final class DataRelationCollection
    extends java.lang.Object
    implements java.lang.Iterable
    Represents the collection of DataRelation objects for this DataSet.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void add(DataColumn parentColumn, DataColumn childColumn)
      Creates a DataRelation with a specified parent and child column, and adds it to the collection.
      void add(DataRelation relation)
      void add(DataTable parentTable, DataTable childTable, java.lang.String[] parentColumnNames, java.lang.String[] childColumnNames)
      Adds a relation to the collection.
      void add(DataTable parentTable, DataTable childTable, java.lang.String parentColumnName, java.lang.String childColumnName)
      Adds a relation to the collection.
      void add(java.lang.String name, DataColumn parentColumn, DataColumn childColumn, boolean createConstraints)
      Creates a DataRelation with the specified name, parent and child columns, with optional constraints according to the value of the createConstraints parameter, and adds it to the collection.
      void clear()
      Clears the collection of any relations.
      boolean contains(DataRelation relation)
      Verifies whether a DataRelation with the specific name (case insensitive) exists in the collection.
      DataRelation get(int index)
      Gets the DataRelation object at the specified index.
      DataRelation get(java.lang.String name)
      Gets the DataRelation object specified by name.
      int getCount() 
      int indexOf(DataRelation relation)
      Gets the index of the specified DataRelation object.
      java.util.Iterator iterator() 
      void removeAt(int index)
      Removes the relation at the specified index from the collection.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Method Detail

      • add

        public final void add(DataTable parentTable,
                              DataTable childTable,
                              java.lang.String parentColumnName,
                              java.lang.String childColumnName)
        Adds a relation to the collection. Performs no checks on the duplication etc.
        Parameters:
        parentTable - The parent table of the relation.
        childTable - The child table of the relation.
        parentColumnName - The parent column's name of the relation.
        childColumnName - The child column's name of the relation.
      • add

        public final void add(DataTable parentTable,
                              DataTable childTable,
                              java.lang.String[] parentColumnNames,
                              java.lang.String[] childColumnNames)
        Adds a relation to the collection. Performs no checks on the duplication etc.
        Parameters:
        parentTable - The parent table of the relation.
        childTable - The child table of the relation.
        parentColumnNames - The array of parent column's name of the relation.
        childColumnNames - The array of child column's name of the relation.
      • add

        public final void add(java.lang.String name,
                              DataColumn parentColumn,
                              DataColumn childColumn,
                              boolean createConstraints)
        Creates a DataRelation with the specified name, parent and child columns, with optional constraints according to the value of the createConstraints parameter, and adds it to the collection.
        Parameters:
        name - The name of the relation.
        parentColumn - The parent column of the relation.
        childColumn - The child column of the relation.
        createConstraints - true to create constraints; otherwise false. (The default is true).
      • add

        public final void add(DataColumn parentColumn,
                              DataColumn childColumn)
        Creates a DataRelation with a specified parent and child column, and adds it to the collection.
        Parameters:
        parentColumn - The parent column of the relation.
        childColumn - The child column of the relation.
      • iterator

        public final java.util.Iterator iterator()
        Specified by:
        iterator in interface java.lang.Iterable
      • getCount

        public final int getCount()
        Returns:
        the total number of elements in a collection
      • contains

        public final boolean contains(DataRelation relation)
        Verifies whether a DataRelation with the specific name (case insensitive) exists in the collection.
        Parameters:
        relation - The name of the relation to find.
        Returns:
        true, if a relation with the specified name exists; otherwise false.
      • indexOf

        public final int indexOf(DataRelation relation)
        Gets the index of the specified DataRelation object.
        Parameters:
        relation - The relation to search for.
        Returns:
        The 0-based index of the relation, or -1 if the relation is not found in the collection.
      • get

        public final DataRelation get(java.lang.String name)
        Gets the DataRelation object specified by name.
        Parameters:
        name - The name of the relation to find.
        Returns:
        The named DataRelation, or a null value if the specified DataRelation does not exist.
      • get

        public final DataRelation get(int index)
        Gets the DataRelation object at the specified index.
        Parameters:
        index - The zero-based index to find.
        Returns:
        The DataRelation, or a null value if the specified DataRelation does not exist.
      • removeAt

        public final void removeAt(int index)
        Removes the relation at the specified index from the collection.
        Parameters:
        index - The index of the relation to remove.
      • clear

        public final void clear()
        Clears the collection of any relations.