Class MTree

    • Constructor Detail

      • MTree

        public MTree​(Properties ctx,
                     int AD_Tree_ID,
                     String trxName)
        Default Constructor. Need to call loadNodes explicitly
        Parameters:
        ctx - context for security
        AD_Tree_ID - The tree to build
        trxName - transaction
      • MTree

        public MTree​(Properties ctx,
                     ResultSet rs,
                     String trxName)
        Resultset constructor for model factory. Need to call loadNodes explicitly
        Parameters:
        ctx -
        rs -
        trxName -
      • MTree

        public MTree​(Properties ctx,
                     int AD_Tree_ID,
                     boolean editable,
                     boolean clientTree,
                     String trxName)
        Construct and Load Tree
        Parameters:
        AD_Tree_ID - The tree to build
        editable - True, if tree can be modified - includes inactive and empty summary nodes
        ctx - context for security
        clientTree - the tree is displayed on the java client (not on web)
        trxName - transaction
      • MTree

        public MTree​(Properties ctx,
                     int AD_Tree_ID,
                     boolean editable,
                     boolean clientTree,
                     String trxName,
                     String linkColName,
                     int linkID)
      • MTree

        public MTree​(Properties ctx,
                     int AD_Tree_ID,
                     boolean editable,
                     boolean clientTree,
                     boolean allNodes,
                     String trxName)
      • MTree

        public MTree​(Properties ctx,
                     int AD_Tree_ID,
                     boolean editable,
                     boolean clientTree,
                     boolean allNodes,
                     String trxName,
                     String linkColName,
                     int linkID)
    • Method Detail

      • getDefaultAD_Tree_ID

        public static int getDefaultAD_Tree_ID​(int AD_Client_ID,
                                               String keyColumnName)
        Get default (oldest) complete AD_Tree_ID for KeyColumn. Called from GridController
        Parameters:
        keyColumnName - key column name, eg. C_Project_ID
        AD_Client_ID - client
        Returns:
        AD_Tree_ID
      • trimTree

        public void trimTree()
        Trim tree of empty summary nodes
      • getRoot

        public MTreeNode getRoot()
        Get Root node
        Returns:
        root
      • isMenu

        public boolean isMenu()
        Is Menu Tree
        Returns:
        true if menu
      • isProduct

        public boolean isProduct()
        Is Product Tree
        Returns:
        true if product
      • isBPartner

        public boolean isBPartner()
        Is Business Partner Tree
        Returns:
        true if partner