Class MTree_Base

All Implemented Interfaces:
Serializable, Cloneable, Comparator<Object>, I_AD_Tree, I_Persistent, Evaluatee, ImmutablePOSupport
Direct Known Subclasses:
MTree

public class MTree_Base extends X_AD_Tree implements ImmutablePOSupport
Base Tree Model. (see also MTree in project base)
Version:
$Id: MTree_Base.java,v 1.2 2006/07/30 00:58:37 jjanke Exp $
Author:
Jorg Janke
See Also:
  • Constructor Details

    • MTree_Base

      public MTree_Base(Properties ctx, String AD_Tree_UU, String trxName)
      UUID based Constructor
      Parameters:
      ctx - Context
      AD_Tree_UU - UUID key
      trxName - Transaction
    • 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 -
    • MTree_Base

      public MTree_Base(Properties ctx, MTree_Base copy)
      Parameters:
      ctx -
      copy -
    • MTree_Base

      public MTree_Base(Properties ctx, MTree_Base copy, String trxName)
      Parameters:
      ctx -
      copy -
      trxName -
  • Method Details

    • 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
    • markImmutable

      public MTree_Base markImmutable()
      Description copied from interface: ImmutablePOSupport
      mark PO as immutable
      Specified by:
      markImmutable in interface ImmutablePOSupport
      Returns:
      PO
    • isLoadAllNodesImmediately

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