Class MReportTree


  • public class MReportTree
    extends Object
    Report Tree Model
    Version:
    $Id: MReportTree.java,v 1.3 2006/07/30 00:51:05 jjanke Exp $
    Author:
    Jorg Janke
    • Constructor Detail

      • MReportTree

        public MReportTree​(Properties ctx,
                           int PA_Hierarchy_ID,
                           String ElementType)
      • MReportTree

        public MReportTree​(Properties ctx,
                           int PA_Hierarchy_ID,
                           boolean allNodes,
                           String ElementType)
        Report Tree
        Parameters:
        ctx - context
        PA_Hierarchy_ID - optional hierarchy
        allNodes - true to always get full tree
        ElementType - Account Schema Element Type
    • Method Detail

      • get

        public static MReportTree get​(Properties ctx,
                                      int PA_Hierarchy_ID,
                                      String ElementType)
        Get Report Tree (cached)
        Parameters:
        ctx - context
        PA_Hierarchy_ID - optional hierarchy
        ElementType - Account Schema Element Type
        Returns:
        tree
      • getWhereClause

        public static String getWhereClause​(Properties ctx,
                                            int PA_Hierarchy_ID,
                                            String ElementType,
                                            int ID)
        Get Where Clause
        Parameters:
        ctx - context
        PA_Hierarchy_ID - optional hierarchy
        ElementType - Account Schema Element Type
        ID - leaf element id
        Returns:
        where clause
      • getChildIDs

        public static Integer[] getChildIDs​(Properties ctx,
                                            int PA_Hierarchy_ID,
                                            String ElementType,
                                            int ID)
        Get Child IDs
        Parameters:
        ctx - context
        PA_Hierarchy_ID - optional hierarchie
        ElementType - Account Schema Element Type
        ID - id
        Returns:
        array of IDs
      • getAD_Tree_ID

        protected int getAD_Tree_ID()
        Get AD_Tree_ID
        Returns:
        tree
      • getDefaultAD_Tree_ID

        protected int getDefaultAD_Tree_ID()
        Get Default AD_Tree_ID see MTree.getDefaultAD_Tree_ID
        Returns:
        tree
      • getElementType

        public String getElementType()
        Get Account Schema Element Type
        Returns:
        element Type
      • getTreeType

        public String getTreeType()
        Get Tree Type
        Returns:
        tree type
      • getTree

        public MTree getTree()
        Get Tree
        Returns:
        tree
      • getWhereClause

        public String getWhereClause​(int ID)
        Get Where Clause
        Parameters:
        ID - start node
        Returns:
        ColumnName = 1 or ( ColumnName = 1 OR ColumnName = 2 OR ColumnName = 3)
      • getChildIDs

        public Integer[] getChildIDs​(int ID)
        Get Child IDs
        Parameters:
        ID - start node
        Returns:
        array if IDs
      • toString

        public String toString()
        String Representation
        Overrides:
        toString in class Object
        Returns:
        info