Class TableGroup
- java.lang.Object
-
- com.orchestranetworks.addon.dmdv.model.extension.DiagramNode
-
- com.orchestranetworks.addon.dmdv.model.extension.TableGroup
-
public final class TableGroup extends DiagramNode
Represents a group node at the table level (should be differentiated fromDatasetGroup
).- Since:
- 1.0.0
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TableField
addField(java.lang.String name)
Adds a child field node inside the current group node.TableGroup
addGroup(java.lang.String name)
Adds a child group to the current group.TableField
addPrimaryKeyField(java.lang.String name)
Adds a child field node as the primary key for the current group node.java.util.List<DiagramNode>
getChildren()
Returns an unmodifiable list of direct child nodes inside the current group node.Table
getContainerTable()
Returns the container table.java.lang.String
getDataType()
Returns a string that describes the node data type.int
getMaxOccurrence()
Returns the maximum number of occurrences of this node.int
getMinOccurrence()
Returns the minimum number of occurrences of this node.TableGroup
getParent()
Returns the direct parent group node of the current node; returnsnull
if the current group node is a direct child of the table node.boolean
isTableGroup()
Returnstrue
if the current node is a group contained in a table node.void
setCardinality(int minOccurrence, int maxOccurrence)
Sets a node's cardinality.void
setDataType(java.lang.String dataType)
Sets the node dataType.-
Methods inherited from class com.orchestranetworks.addon.dmdv.model.extension.DiagramNode
getLabel, getName, isDatasetField, isDatasetGroup, isTable, isTableField, setLabel, setLabel
-
-
-
-
Method Detail
-
getParent
public TableGroup getParent()
Returns the direct parent group node of the current node; returnsnull
if the current group node is a direct child of the table node.- Overrides:
getParent
in classDiagramNode
-
isTableGroup
public boolean isTableGroup()
Description copied from class:DiagramNode
Returnstrue
if the current node is a group contained in a table node.- Overrides:
isTableGroup
in classDiagramNode
-
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 occurrencemaxOccurrence
- 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
-
-