Class MTree_Base

    • Constructor Detail

      • MTree_Base

        public MTree_Base​(Properties ctx,
                          int AD_Tree_ID,
                          String trxName)
        Standard Constructor
        Parameters:
        ctx - context
        AD_Tree_ID - id
        trxName - transaction
      • MTree_Base

        public MTree_Base​(Properties ctx,
                          ResultSet rs,
                          String trxName)
        Load Constructor
        Parameters:
        ctx - context
        rs - result set
        trxName - transaction
      • MTree_Base

        public MTree_Base​(MClient client,
                          String name,
                          String treeType)
        Parent Constructor
        Parameters:
        client - client
        name - name
        treeType -
      • MTree_Base

        public MTree_Base​(Properties ctx,
                          String Name,
                          String TreeType,
                          String trxName)
        Full Constructor
        Parameters:
        ctx - context
        Name - name
        TreeType - tree type
        trxName - transaction
      • MTree_Base

        public MTree_Base​(MTree_Base copy)
        Parameters:
        copy -
    • Method Detail

      • addNode

        public static boolean addNode​(Properties ctx,
                                      String treeType,
                                      int Record_ID,
                                      String trxName)
        Add Node to correct tree
        Parameters:
        ctx - cpntext
        treeType - tree type
        Record_ID - id
        trxName - transaction
        Returns:
        true if node added
      • getNodeTableName

        public static String getNodeTableName​(String treeType)
        Get Node TableName
        Parameters:
        treeType - tree type
        Returns:
        node table name, e.g. AD_TreeNode
      • getSourceTableName

        public static String getSourceTableName​(String treeType)
        Get Source TableName
        Parameters:
        treeType - tree typw
        Returns:
        source table name, e.g. AD_Org or null
      • get

        public static MTree_Base get​(int AD_Tree_ID)
        Get MTree_Base from Cache (immutable)
        Parameters:
        AD_Tree_ID - id
        Returns:
        MTree_Base
      • get

        public static MTree_Base get​(int AD_Tree_ID,
                                     String trxName)
        Get MTree_Base from Cache (immutable)
        Parameters:
        AD_Tree_ID - id
        trxName - transaction
        Returns:
        MTree_Base
      • get

        public static MTree_Base get​(Properties ctx,
                                     int AD_Tree_ID,
                                     String trxName)
        Get MTree_Base from Cache (immutable)
        Parameters:
        ctx - context
        AD_Tree_ID - id
        trxName - transaction
        Returns:
        MTree_Base
      • getNodeTableName

        public String getNodeTableName()
        Get Node TableName
        Returns:
        node table name, e.g. AD_TreeNode
      • getSourceTableName

        public String getSourceTableName​(boolean tableNameOnly)
        Get Source TableName (i.e. where to get the name and color)
        Parameters:
        tableNameOnly - if false return From clause (alias = t)
        Returns:
        source table name, e.g. AD_Org or null
      • getActionColorName

        public String getActionColorName()
        Get fully qualified Name of Action/Color Column
        Returns:
        NULL or Action or Color
      • beforeSave

        protected boolean beforeSave​(boolean newRecord)
        Before Save
        Overrides:
        beforeSave in class PO
        Parameters:
        newRecord - new
        Returns:
        true
      • afterSave

        protected boolean afterSave​(boolean newRecord,
                                    boolean success)
        After Save
        Overrides:
        afterSave in class PO
        Parameters:
        newRecord - new
        success - success
        Returns:
        success
      • isLoadAllNodesImmediately

        public static boolean isLoadAllNodesImmediately​(int treeID,
                                                        String trxName)
        Returns true if should load all tree nodes immediately