Class TableGroup


  • public final class TableGroup
    extends DiagramNode
    Represents a group node at the table level (should be differentiated from DatasetGroup).
    Since:
    1.0.0
    • Method Detail

      • getParent

        public TableGroup getParent()
        Returns the direct parent group node of the current node; returns null if the current group node is a direct child of the table node.
        Overrides:
        getParent in class DiagramNode
      • isTableGroup

        public boolean isTableGroup()
        Description copied from class: DiagramNode
        Returns true if the current node is a group contained in a table node.
        Overrides:
        isTableGroup in class DiagramNode
      • getContainerTable

        public Table getContainerTable()
        Returns the container table.
      • getChildren

        public java.util.List<DiagramNode> getChildren()
        Returns an unmodifiable list of direct child nodes inside the current group node.
      • getMinOccurrence

        public int getMinOccurrence()
        Returns the minimum number of occurrences of this node.
      • getMaxOccurrence

        public int getMaxOccurrence()
        Returns the maximum number of occurrences of this node.
      • setCardinality

        public void setCardinality​(int minOccurrence,
                                   int maxOccurrence)
        Sets a node's cardinality.
        Parameters:
        minOccurrence - minimum number of occurrence
        maxOccurrence - maximum number of occurrence
      • getDataType

        public java.lang.String getDataType()
        Returns a string that describes the node data type.
      • setDataType

        public void setDataType​(java.lang.String dataType)
        Sets the node dataType.
        Parameters:
        dataType - - a string describes the data type
      • addGroup

        public TableGroup addGroup​(java.lang.String name)
        Adds a child group to the current group.
        Parameters:
        name - a specific name for the child group
        Returns:
        a table group
        See Also:
        TableGroup
      • addField

        public TableField addField​(java.lang.String name)
        Adds a child field node inside the current group node.
        Parameters:
        name - a specific name for the child field node
        Returns:
        a table field
        See Also:
        DatasetField
      • addPrimaryKeyField

        public TableField addPrimaryKeyField​(java.lang.String name)
        Adds a child field node as the primary key for the current group node.
        Parameters:
        name - a specific name for the child field node
        Returns:
        a table field
        See Also:
        TableField