Class MPPProductBOM

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

public class MPPProductBOM extends X_PP_Product_BOM implements ImmutablePOSupport
PP Product BOM Model.
Author:
Victor Perez www.e-evolution.com, Teo Sarca, http://www.arhipac.ro
See Also:
  • Constructor Details

    • MPPProductBOM

      public MPPProductBOM(Properties ctx, String PP_Product_BOM_UU, String trxName)
      UUID based Constructor
      Parameters:
      ctx - Context
      PP_Product_BOM_UU - UUID key
      trxName - Transaction
    • MPPProductBOM

      public MPPProductBOM(Properties ctx, int PP_Product_BOM_ID, String trxName)
      Parameters:
      ctx -
      PP_Product_BOM_ID -
      trxName -
    • MPPProductBOM

      public MPPProductBOM(Properties ctx, ResultSet rs, String trxName)
      Parameters:
      ctx -
      rs -
      trxName -
    • MPPProductBOM

      public MPPProductBOM(MPPProductBOM copy)
      Copy constructor
      Parameters:
      copy -
    • MPPProductBOM

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

      public MPPProductBOM(Properties ctx, MPPProductBOM copy, String trxName)
      Copy constructor
      Parameters:
      ctx -
      copy -
      trxName -
    • MPPProductBOM

      public MPPProductBOM(Properties ctx, int PP_Product_BOM_ID, String trxName, String... virtualColumns)
      Parameters:
      ctx -
      PP_Product_BOM_ID -
      trxName -
      virtualColumns -
  • Method Details

    • isProductMakeToOrder

      public static boolean isProductMakeToOrder(Properties ctx, int productId, String trxName)
      Is Product Make to Order
      Parameters:
      ctx -
      productId -
      trxName -
      Returns:
    • getProductBOMs

      public static List<MPPProductBOM> getProductBOMs(MProduct product)
      Get the Product BOM for a product
      Parameters:
      product -
      Returns:
      return List with MPPProductBOM
    • get

      public static MPPProductBOM get(int PP_Product_BOM_ID)
      Get Product BOM by ID (cached) (immutable)
      Parameters:
      PP_Product_BOM_ID -
      Returns:
      product bom
    • get

      public static MPPProductBOM get(Properties ctx, int PP_Product_BOM_ID)
      Get Product BOM by ID (cached) (immutable)
      Parameters:
      ctx -
      PP_Product_BOM_ID -
      Returns:
      product bom
    • getCopy

      public static MPPProductBOM getCopy(Properties ctx, int PP_Product_BOM_ID, String trxName)
      Get updateable copy of MPPProductBOM from cache
      Parameters:
      ctx -
      PP_Product_BOM_ID -
      trxName -
      Returns:
      MPPProductBOM
    • getBOMSearchKey

      public static int getBOMSearchKey(MProduct product)
      Get PP_Product_BOM_ID for given M_Product_ID
      Parameters:
      product -
      Returns:
      PP_Product_BOM_ID
    • getDefault

      public static MPPProductBOM getDefault(MProduct product, String trxName)
      Get BOM with Default Logic (Product = BOM Product and BOM Value = Product Value)
      Parameters:
      product -
      trxName -
      Returns:
      product BOM
    • get

      public static MPPProductBOM get(MProduct product, int ad_org_id, String trxName)
      Get BOM for Product
      Parameters:
      product - product
      ad_org_id - Organization ID
      trxName - Transaction Name
      Returns:
      BOM
    • get

      public static MPPProductBOM get(MProduct product, int ad_org_id, Timestamp valid, String trxName)
      Get BOM with valid dates for Product
      Parameters:
      product - product
      ad_org_id - Organization ID
      valid - Date to Validate
      trxName - Transaction Name
      Returns:
      BOM
    • getLines

      public MPPProductBOMLine[] getLines(Timestamp valid)
      Get valid BOM Lines for Product BOM
      Parameters:
      valid - Date to Validate
      Returns:
      BOM Lines
    • getLines

      public MPPProductBOMLine[] getLines()
      Get BOM Lines for Product BOM from cache
      Returns:
      BOM Lines
    • getLines

      public MPPProductBOMLine[] getLines(boolean reload)
      Get BOM Lines for Product BOM
      Parameters:
      reload - true to re-load from DB
      Returns:
      BOM Lines
    • isValidFromTo

      public boolean isValidFromTo(Timestamp date)
      Is BOM valid for date
      Parameters:
      date -
      Returns:
      true if BOM is valid for date
    • afterDelete

      protected boolean afterDelete(boolean success)
      Description copied from class: PO
      Execute after Delete operations.
      Default implementation is nop, to be implemented in sub-classes that needed it.
      Overrides:
      afterDelete in class PO
      Parameters:
      success - true if record deleted
      Returns:
      true if delete is a success
    • 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 MPPProductBOM markImmutable()
      Description copied from interface: ImmutablePOSupport
      mark PO as immutable
      Specified by:
      markImmutable in interface ImmutablePOSupport
      Returns:
      PO
    • toString

      public String toString()
      Description copied from class: PO
      String representation
      Overrides:
      toString in class X_PP_Product_BOM
      Returns:
      String representation