Class MTree

All Implemented Interfaces:
Serializable, Cloneable, Comparator<Object>, I_AD_Tree, I_Persistent, Evaluatee, ImmutablePOSupport

public class MTree extends MTree_Base
Builds Tree.
Version:
$Id: MTree.java,v 1.2 2006/07/30 00:51:02 jjanke Exp $
Author:
Jorg Janke
See Also:
  • Constructor Details

    • 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:
      ctx -
      AD_Tree_ID - The tree to build
      editable - True, if tree can be modified - includes inactive and empty summary nodes
      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)
      Parameters:
      ctx -
      AD_Tree_ID -
      editable -
      clientTree -
      trxName -
      linkColName -
      linkID -
    • MTree

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

      public MTree(Properties ctx, int AD_Tree_ID, boolean editable, boolean clientTree, boolean allNodes, String trxName, String linkColName, int linkID)
      Parameters:
      ctx -
      AD_Tree_ID -
      editable -
      clientTree -
      allNodes -
      trxName -
      linkColName -
      linkID -
  • Method Details

    • getDefaultAD_Tree_ID

      public static int getDefaultAD_Tree_ID(int AD_Client_ID, String keyColumnName)
      Get default (oldest) 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
    • toString

      public String toString()
      String representation
      Overrides:
      toString in class X_AD_Tree
      Returns:
      info