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)
      Copy constructor
      Parameters:
      copy -
    • MTree_Base

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

      public MTree_Base(Properties ctx, MTree_Base copy, String trxName)
      Copy constructor
      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 - session context
      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 type
      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)
      Description copied from class: PO
      Called before Save for Pre-Save Operation.
      Default implementation is nop, to be implemented in sub-classes that needed it.
      Overrides:
      beforeSave in class PO
      Parameters:
      newRecord - true if it is a new record
      Returns:
      true if record can be saved
    • afterSave

      protected boolean afterSave(boolean newRecord, boolean success)
      Description copied from class: PO
      Called after Save for Post-Save Operation.
      Default implementation is nop, to be implemented in sub-classes that needed it.
      Overrides:
      afterSave in class PO
      Parameters:
      newRecord - true if it is a new record
      success - true if save operation was success
      Returns:
      if save was a 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)
      Is load all tree nodes immediately
      Returns:
      true if tree will load all nodes immediately