Interface NiceModelTree

All Known Implementing Classes:
NiceModuleTreeImpl

public interface NiceModelTree

A tree containing model information per module. It has the following outline:

  .root
  |-- module nodes
  |   |-- model-element nodes (entity)
  |   |   |-- column nodes
  |   |-- model-element nodes (relation)
 

The module node holds a reference to a module. Below the module nodes, there are model-element nodes which hold either an entity model or a relation model. An entity-node in turn has one ore more column nodes, which hold information in a ModelColumnInfo object that either refers to a field model or a relation model where the relation represents a 1:n relation with the foreign key located in the corresponding entity. You can get foreign key information by getForeignKey() method.

Since the foreign key values are inside each specific entity model node, all n:0..1 relations are covered by column nodes. The model element nodes containing relation models only hold the remaining n:m relations.

The tree reflects the model as it is defined in the corresponding modules. It does not represent the "merged" or "overall" model (for that use NiceDataModel) but it shows the model separated by modules. The ModelElementNode.Entity node only holds the columns/fields that are defined in the corresponding module. If the module extends an existing entity can be obtained via ModelElementNode.Entity.isExtended()

method.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Comparator<AppModule>
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable ModuleNode
    getModuleNode(String modulename)
    Returns the module node in this tree for the specified module name, or null if not found.
    Returns the root node that holds all other nodes of the tree.
  • Field Details

  • Method Details

    • getRoot

      RootNode getRoot()
      Returns the root node that holds all other nodes of the tree.
    • getModuleNode

      @Nullable @Nullable ModuleNode getModuleNode(String modulename)
      Returns the module node in this tree for the specified module name, or null if not found.
      Parameters:
      modulename - the module name of the module to lookup