Class MMovementLineMA

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

public class MMovementLineMA extends X_M_MovementLineMA
Movement Line Material Allocation
Version:
$Id: MMovementLineMA.java,v 1.3 2006/07/30 00:51:05 jjanke Exp $
Author:
Jorg Janke
See Also:
  • Constructor Details

    • MMovementLineMA

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

      public MMovementLineMA(Properties ctx, int M_MovementLineMA_ID, String trxName)
      Standard Constructor
      Parameters:
      ctx - context
      M_MovementLineMA_ID - ignored
      trxName - trx
    • MMovementLineMA

      public MMovementLineMA(Properties ctx, ResultSet rs, String trxName)
      Load Constructor
      Parameters:
      ctx - context
      rs - result ser
      trxName - trx
    • MMovementLineMA

      public MMovementLineMA(MMovementLine parent, int M_AttributeSetInstance_ID, BigDecimal MovementQty, Timestamp DateMaterialPolicy)
      Parent Constructor
      Parameters:
      parent - parent
      M_AttributeSetInstance_ID - asi
      MovementQty - qty
      DateMaterialPolicy -
    • MMovementLineMA

      public MMovementLineMA(MMovementLine parent, int M_AttributeSetInstance_ID, BigDecimal MovementQty, Timestamp DateMaterialPolicy, boolean isAutoGenerated)
      Parameters:
      parent -
      M_AttributeSetInstance_ID -
      MovementQty -
      DateMaterialPolicy -
      isAutoGenerated -
  • Method Details

    • get

      public static MMovementLineMA[] get(Properties ctx, int M_MovementLine_ID, String trxName)
      Get Material Allocations for Line
      Parameters:
      ctx - context
      M_MovementLine_ID - line
      trxName - trx
      Returns:
      allocations
    • deleteMovementMA

      public static int deleteMovementMA(int M_Movement_ID, String trxName)
      Delete all Material Allocation for Movement
      Parameters:
      M_Movement_ID - movement
      trxName - transaction
      Returns:
      number of rows deleted or -1 for error
    • deleteMovementLineMA

      public static int deleteMovementLineMA(int M_MovementLine_ID, String trxName)
      Delete all Material Allocation for Movement Line
      Parameters:
      M_MovementLine_ID - movement line
      trxName - transaction
      Returns:
      number of rows deleted or -1 for error
    • setDateMaterialPolicy

      public void setDateMaterialPolicy(Timestamp DateMaterialPolicy)
      Description copied from class: X_M_MovementLineMA
      Set Date Material Policy.
      Specified by:
      setDateMaterialPolicy in interface I_M_MovementLineMA
      Overrides:
      setDateMaterialPolicy in class X_M_MovementLineMA
      Parameters:
      DateMaterialPolicy - Time used for LIFO and FIFO Material Policy
    • toString

      public String toString()
      String Representation
      Overrides:
      toString in class X_M_MovementLineMA
      Returns:
      info
    • addOrCreate

      public static MMovementLineMA addOrCreate(MMovementLine line, int M_AttributeSetInstance_ID, BigDecimal MovementQty, Timestamp DateMaterialPolicy)
      Add movement quantity to existing MMovementLineMA or create new MMovementLineMA record.
      Parameters:
      line -
      M_AttributeSetInstance_ID -
      MovementQty -
      DateMaterialPolicy -
      Returns:
      MMovementLineMA instance
    • addOrCreate

      public static MMovementLineMA addOrCreate(MMovementLine line, int M_AttributeSetInstance_ID, BigDecimal MovementQty, Timestamp DateMaterialPolicy, boolean isAutoGenerated)
      Add movement quantity to existing MMovementLineMA or create new MMovementLineMA record.
      Parameters:
      line -
      M_AttributeSetInstance_ID -
      MovementQty -
      DateMaterialPolicy -
      isAutoGenerated - true if created by application instead of created by user manually
      Returns:
      MMovementLineMA instance
    • getManualQty

      public static BigDecimal getManualQty(int M_MovementLine_ID, String trxName)
      Get total movement qty for LineMA created manually by user
      Parameters:
      M_MovementLine_ID -
      trxName -
      Returns:
      total movement qty from MMovementLineMA created by user
    • beforeSave

      protected boolean beforeSave(boolean newRecord)
      Before Save
      Overrides:
      beforeSave in class PO
      Parameters:
      newRecord - new
      Returns:
      save